]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
NRI : Merge from V1_2.
authornri <nri@opencascade.com>
Thu, 10 Jul 2003 17:12:52 +0000 (17:12 +0000)
committernri <nri@opencascade.com>
Thu, 10 Jul 2003 17:12:52 +0000 (17:12 +0000)
src/VISUGUI/VisuGUI.cxx
src/VISUGUI/VisuGUI_IsoSurfacesDlg.cxx
src/VISUGUI/VisuGUI_ScalarBarDlg.cxx

index 78af7a0d806d8a06fb216e7f8bf0372c7a20d117..104eb6f32f4bc2162108b26965b843565690fbca 100644 (file)
@@ -371,7 +371,7 @@ bool VisuGUI::OnGUIEvent(int theCommandID,  QAD_Desktop* parent)
 
     case 122:
       {
-       visuGUI->ExportToFile();
+       //visuGUI->ExportToFile();
        break;
       }
 
@@ -2503,7 +2503,7 @@ bool VisuGUI::CustomPopup(QAD_Desktop* parent, QPopupMenu* thePopup, const QStri
 
       case VISU::TRESULT:
        //thePopup->insertItem("Create Mesh", visuGUI, SLOT(CreateMesh()));    
-       thePopup->insertItem("Export To File", visuGUI, SLOT(ExportToFile()));    
+       //thePopup->insertItem("Export To File", visuGUI, SLOT(ExportToFile()));    
        //thePopup->insertItem("Delete", visuGUI, SLOT(DeletePrs()));
        break;
        
@@ -3187,12 +3187,13 @@ void VisuGUI::ImportFromFile(){
   //flt.append( "Exportable Files (*.med *.dat)" );
   //flt.append( "Dat Files (*.dat)" );
   flt.append( "Med Files (*.med)" );
+  flt.append( "Dat Files (*.xls)" );
   QString aDir = getVisuInputDir();
-  QString aFile = QAD_FileDlg::getFileName(QAD_Application::getDesktop(),
-                                         aDir,flt,tr("Import From File"),true);
-  if(!aFile.isEmpty()){
-    QAD_Application::getDesktop()->putInfo( "Importing From File " + aFile + "..." );
-    aDir = QAD_Tools::getDirFromPath(aFile);
+  QFileInfo aFileInfo = QAD_FileDlg::getFileName(QAD_Application::getDesktop(),
+                                                aDir,flt,tr("Import From File"),true);
+  if(aFileInfo.exists()){
+    QAD_Application::getDesktop()->putInfo( "Importing From File " + aFileInfo.filePath() + "..." );
+    aDir = QAD_Tools::getDirFromPath(aFileInfo.filePath());
     QAD_CONFIG->addSetting("Visu:InputDir",aDir);
     QAD_WaitCursor wc;
 
@@ -3242,7 +3243,7 @@ void VisuGUI::ExportToFile(){
       QAD_CONFIG->addSetting("Visu:OutputDir",aDir);
       if(VISU::Result_i* aResult = dynamic_cast<VISU::Result_i*>(aBase)){
        try{
-         aResult->GetInput()->ToFile(aFile.latin1());
+         //APO - aResult->GetInput()->ToFile(aFile.latin1());
          QAD_Application::getDesktop()->putInfo(aFile+" exported.");
        }catch(...){
          QAD_MessageBox::warn1 ( QAD_Application::getDesktop(), tr ("VISU_WARNING"),
index 858902f48feab96753870ff33f482c00f39f1806..3b3f8e3e7c666a46008549432829ccf52aadb7ba 100644 (file)
@@ -28,6 +28,7 @@
 
 using namespace std;
 #include "VisuGUI_IsoSurfacesDlg.h"
+#include <limits.h>
 #include <qlayout.h>
 #include "QAD_Application.h"
 #include "QAD_Desktop.h"
index 8b6d6408f9e65993fef02b7a57f3b6f3c0793590..1694a48d0ac859d9d0d43c8017532451aa144f3c 100644 (file)
@@ -28,6 +28,7 @@
 
 using namespace std;
 #include "VisuGUI_ScalarBarDlg.h"
+#include <limits.h>
 #include <qlayout.h>
 #include <qvalidator.h>
 #include "QAD_Application.h"