const std::string& theParentId);
virtual ~ModuleBase_WidgetFileSelector();
- virtual bool restoreValue();
-
virtual QList<QWidget*> getControls() const;
/// Returns true if a file on the current path in the line edit
/// \return True in success
virtual bool storeValueCustom() const;
+ virtual bool restoreValueCustom();
+
protected:
/// Converts format to filter string
static QString formatToFilter(const QString & theFormat);
/// Returns string containing formats
QString filterString() const;
+ /// Add an extension to file name if the extension is not defined
+ /// \param theFileName a file name
+ /// \param theFilter a file filter
+ /// \return the file name with extension
static QString applyExtension(const QString& theFileName, const QString& theFilter);
protected:
QString mySelectedFilter;
/// A title of open file dialog box
- enum { WFS_OPEN, WFS_SAVE } myType;
+ enum {
+ WFS_OPEN, ///< open file
+ WFS_SAVE ///< save file
+ } myType; ///< type of dialog
/// Default path
QString myDefaultPath;