X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetFileSelector.h;h=2ddc684acc015d75b8320b8f51d3b2a5f7d84157;hb=ec091ee8278311fb7a69c54a68670b66edd8db2d;hp=3b183d7031a83f71c86059d3143d45d99fd09382;hpb=83b022b15cfd77512967f4328484371e46c525ae;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetFileSelector.h b/src/ModuleBase/ModuleBase_WidgetFileSelector.h index 3b183d703..2ddc684ac 100644 --- a/src/ModuleBase/ModuleBase_WidgetFileSelector.h +++ b/src/ModuleBase/ModuleBase_WidgetFileSelector.h @@ -27,6 +27,7 @@ class QLineEdit; * \code * * @@ -46,12 +47,8 @@ class MODULEBASE_EXPORT ModuleBase_WidgetFileSelector : public ModuleBase_ModelW const std::string& theParentId); virtual ~ModuleBase_WidgetFileSelector(); - virtual bool storeValue() const; - virtual bool restoreValue(); - QWidget* getControl() const; - virtual QList getControls() const; /// Returns true if a file on the current path in the line edit @@ -65,23 +62,34 @@ class MODULEBASE_EXPORT ModuleBase_WidgetFileSelector : public ModuleBase_ModelW /// Processing of path changing void onPathChanged(); - protected: - /// Returns string containing formats - QString formatsString() const; +protected: + /// Saves the internal parameters to the given feature + /// \return True in success + virtual bool storeValueCustom() const; - /// Return list of validator formats +protected: + /// Converts format to filter string + static QString formatToFilter( const QString & theFormat ); + + /// Returns list of validator formats QStringList getValidatorFormats() const; - private: + /// Returns string containing formats + QString filterString() const; + +protected: /// A control for path input QLineEdit* myPathField; - /// Container - QWidget* myMainWidget; - /// A title of open file dialog box QString myTitle; + /// A current format + QString mySelectedFilter; + + /// A title of open file dialog box + enum { WFS_OPEN, WFS_SAVE } myType; + /// Default path QString myDefaultPath; };