Salome HOME
Merge branch 'Dev_0.7.1' of newgeom:newgeom.git into Dev_0.7.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 /**
18 * Implementation of widget for boolean input (check box)
19 */ 
20 class MODULEBASE_EXPORT ModuleBase_WidgetBoolValue : public ModuleBase_ModelWidget
21 {
22 Q_OBJECT
23  public:
24   /// Constructor
25   /// \param theParent the parent object
26   /// \param theData the widget configuation. The attribute of the model widget is obtained from
27   /// \param theParentId is Id of a parent of the current attribute
28   ModuleBase_WidgetBoolValue(QWidget* theParent, const Config_WidgetAPI* theData,
29                              const std::string& theParentId);
30
31   virtual ~ModuleBase_WidgetBoolValue();
32
33   virtual bool storeValue() const;
34
35   virtual bool restoreValue();
36
37   virtual QList<QWidget*> getControls() const;
38
39   QWidget* getControl() const;
40
41  private:
42    /// The check box
43   QCheckBox* myCheckBox;
44 };
45
46 #endif