Salome HOME
Merge branch 'Dev_0.6.1' of newgeom:newgeom into Dev_0.6.1
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetBoolValue.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        ModuleBase_WidgetBoolValue.h
4 // Created:     04 June 2014
5 // Author:      Vitaly Smetannikov
6
7 #ifndef ModuleBase_WidgetBoolValue_H
8 #define ModuleBase_WidgetBoolValue_H
9
10 #include "ModuleBase.h"
11 #include "ModuleBase_ModelWidget.h"
12
13 class Config_WidgetAPI;
14 class QWidget;
15 class QCheckBox;
16
17 class MODULEBASE_EXPORT ModuleBase_WidgetBoolValue : public ModuleBase_ModelWidget
18 {
19 Q_OBJECT
20  public:
21   /// Constructor
22   /// \theParent the parent object
23   /// \theData the widget configuation. The attribute of the model widget is obtained from
24   ModuleBase_WidgetBoolValue(QWidget* theParent, const Config_WidgetAPI* theData,
25                              const std::string& theParentId);
26
27   virtual ~ModuleBase_WidgetBoolValue();
28
29   /// Saves the internal parameters to the given feature
30   /// \param theObject a model feature to be changed
31   virtual bool storeValue() const;
32
33   virtual bool restoreValue();
34
35   /// Returns list of widget controls
36   /// \return a control list
37   virtual QList<QWidget*> getControls() const;
38
39   /// Returns the internal parent wiget control, that can be shown anywhere
40   /// \returns the widget
41   QWidget* getControl() const;
42
43  private:
44   QCheckBox* myCheckBox;
45 };
46
47 #endif