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