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
Merge remote-tracking branch 'origin/cgt/devCEA'
[modules/shaper.git]
/
src
/
ModuleBase
/
ModuleBase_WidgetFileSelector.h
diff --git
a/src/ModuleBase/ModuleBase_WidgetFileSelector.h
b/src/ModuleBase/ModuleBase_WidgetFileSelector.h
index 8b5987fa086a9e27c58fd559a7ba23754277d8ec..2f6612413951aabad827ffcb0c8e4be4c285c170 100644
(file)
--- a/
src/ModuleBase/ModuleBase_WidgetFileSelector.h
+++ b/
src/ModuleBase/ModuleBase_WidgetFileSelector.h
@@
-44,14
+44,10
@@
class MODULEBASE_EXPORT ModuleBase_WidgetFileSelector : public ModuleBase_ModelW
/// Constructor
/// \param theParent the parent object
/// \param theData the widget configuration. The attribute of the model widget is obtained from
/// Constructor
/// \param theParent the parent object
/// \param theData the widget configuration. The attribute of the model widget is obtained from
- /// \param theParentId is Id of a parent of the current attribute
ModuleBase_WidgetFileSelector(QWidget* theParent,
ModuleBase_WidgetFileSelector(QWidget* theParent,
- const Config_WidgetAPI* theData,
- const std::string& theParentId);
+ const Config_WidgetAPI* theData);
virtual ~ModuleBase_WidgetFileSelector();
virtual ~ModuleBase_WidgetFileSelector();
- virtual bool restoreValue();
-
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
@@
-68,7
+64,9
@@
class MODULEBASE_EXPORT ModuleBase_WidgetFileSelector : public ModuleBase_ModelW
protected:
/// Saves the internal parameters to the given feature
/// \return True in success
protected:
/// Saves the internal parameters to the given feature
/// \return True in success
- virtual bool storeValueCustom() const;
+ virtual bool storeValueCustom();
+
+ virtual bool restoreValueCustom();
protected:
/// Converts format to filter string
protected:
/// Converts format to filter string
@@
-86,6
+84,10
@@
protected:
/// Returns string containing formats
QString filterString() const;
/// 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:
static QString applyExtension(const QString& theFileName, const QString& theFilter);
protected:
@@
-99,7
+101,10
@@
protected:
QString mySelectedFilter;
/// A title of open file dialog box
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;
/// Default path
QString myDefaultPath;