Salome HOME
Fix for the issue #2753 : error when dump/load script
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetFileSelector.h
index 8cfbe91ff2769acf45e2a47dadfda0c8805a7936..28e31619a6ff321ee4b89bcbf8241d2716d16914 100644 (file)
@@ -28,8 +28,9 @@
 #include <QString>
 #include <QStringList>
 
-class QWidget;
+class QFileDialog;
 class QLineEdit;
+class QWidget;
 
 /**
 * \ingroup GUI
@@ -65,7 +66,7 @@ class MODULEBASE_EXPORT ModuleBase_WidgetFileSelector : public ModuleBase_ModelW
   /// exists and has supported format
   bool isCurrentPathValid();
 
- public slots:
+public slots:
    /// Processing of path selection button press
   void onPathSelectionBtn();
 
@@ -73,6 +74,9 @@ class MODULEBASE_EXPORT ModuleBase_WidgetFileSelector : public ModuleBase_ModelW
   void onPathChanged();
 
 protected:
+  /// Reject the current editor dialog if it is shown and returns true.
+  virtual bool processEscape();
+
   /// Saves the internal parameters to the given feature
   /// \return True in success
   virtual bool storeValueCustom();
@@ -104,6 +108,7 @@ protected:
 protected:
    /// A control for path input
   QLineEdit* myPathField;
+  QFileDialog* myFileDialog; ///< started dialog
 
   /// A title of open file dialog box
   QString myTitle;
@@ -116,9 +121,6 @@ protected:
     WFS_OPEN, ///< open file
     WFS_SAVE ///< save file
   } myType; ///< type of dialog
-
-  /// Default path
-  QString myDefaultPath;
 };
 
 #endif /* MODULEBASE_WIDGETFILESELECTOR_H_ */