* \code
* <file_selector
* id="import_file_selector"
+* type="open"
* title="Import file"
* path="">
* <validator id="ExchangePlugin_ImportFormat" parameters="BREP:BREPImport,STEP:STEPImport" />
const std::string& theParentId);
virtual ~ModuleBase_WidgetFileSelector();
- virtual bool storeValue() const;
-
virtual bool restoreValue();
- QWidget* getControl() const;
-
virtual QList<QWidget*> getControls() const;
/// Returns true if a file on the current path in the line edit
/// 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;
};