Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
It provides a point attribute restore selection by activation of a shape selection...
[modules/shaper.git]
/
src
/
ModuleBase
/
ModuleBase_WidgetFileSelector.h
diff --git
a/src/ModuleBase/ModuleBase_WidgetFileSelector.h
b/src/ModuleBase/ModuleBase_WidgetFileSelector.h
index 3b183d7031a83f71c86059d3143d45d99fd09382..2ddc684acc015d75b8320b8f51d3b2a5f7d84157 100644
(file)
--- a/
src/ModuleBase/ModuleBase_WidgetFileSelector.h
+++ b/
src/ModuleBase/ModuleBase_WidgetFileSelector.h
@@
-27,6
+27,7
@@
class QLineEdit;
* \code
* <file_selector
* id="import_file_selector"
* \code
* <file_selector
* id="import_file_selector"
+* type="open"
* title="Import file"
* path="">
* <validator id="ExchangePlugin_ImportFormat" parameters="BREP:BREPImport,STEP:STEPImport" />
* title="Import file"
* path="">
* <validator id="ExchangePlugin_ImportFormat" parameters="BREP:BREPImport,STEP:STEPImport" />
@@
-46,12
+47,8
@@
class MODULEBASE_EXPORT ModuleBase_WidgetFileSelector : public ModuleBase_ModelW
const std::string& theParentId);
virtual ~ModuleBase_WidgetFileSelector();
const std::string& theParentId);
virtual ~ModuleBase_WidgetFileSelector();
- virtual bool storeValue() const;
-
virtual bool restoreValue();
virtual bool restoreValue();
- QWidget* getControl() const;
-
virtual QList<QWidget*> getControls() const;
/// Returns true if a file on the current path in the line edit
virtual QList<QWidget*> 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();
/// 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;
QStringList getValidatorFormats() const;
- private:
+ /// Returns string containing formats
+ QString filterString() const;
+
+protected:
/// A control for path input
QLineEdit* myPathField;
/// A control for path input
QLineEdit* myPathField;
- /// Container
- QWidget* myMainWidget;
-
/// A title of open file dialog box
QString myTitle;
/// 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;
};
/// Default path
QString myDefaultPath;
};