1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
4 * PartSet_WidgetFileSelector.h
6 * Created on: May 18, 2015
10 #ifndef PARTSET_WIDGETFILESELECTOR_H_
11 #define PARTSET_WIDGETFILESELECTOR_H_
15 #include <ModuleBase_WidgetFileSelector.h>
17 class ModuleBase_IWorkshop;
21 * Customization of ModuleBase_WidgetFileSelector in order to write
22 * format of exported file.
24 class PARTSET_EXPORT PartSet_WidgetFileSelector : public ModuleBase_WidgetFileSelector
29 /// \param theParent the parent object
30 /// \param theWorkshop instance of workshop interface
31 /// \param theData the widget configuration. The attribute of the model widget is obtained from
32 /// \param theParentId is Id of a parent of the current attribute
33 PartSet_WidgetFileSelector(QWidget* theParent,
34 ModuleBase_IWorkshop* theWorkshop,
35 const Config_WidgetAPI* theData,
36 const std::string& theParentId);
38 virtual ~PartSet_WidgetFileSelector() {}
40 /// Reimplemented from ModuleBase_WidgetFileSelector::restoreValue()
41 virtual bool restoreValue();
44 /// Reimplemented from ModuleBase_WidgetFileSelector::storeValueCustom()
45 virtual bool storeValueCustom() const;
47 /// Returns a short format string of theFilter string
48 static QString filterToShortFormat( const QString & theFilter );
50 /// Returns a full format string for the short format
51 QString shortFormatToFullFormat( const QString & theShortFormat ) const;
54 ModuleBase_IWorkshop* myWorkshop; // the current workshop
57 #endif /* PARTSET_WIDGETFILESELECTOR_H_ */