]> SALOME platform Git repositories - modules/shaper.git/blob - src/ModuleBase/ModuleBase_WidgetBoolValue.h
Salome HOME
Issue #1368: Creation of a Qt panel. Code improvement.
[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 * \ingroup GUI
19 * Implementation of widget for boolean input (check box)
20 */ 
21 class MODULEBASE_EXPORT ModuleBase_WidgetBoolValue : public ModuleBase_ModelWidget
22 {
23 Q_OBJECT
24  public:
25   /// Constructor
26   /// \param theParent the parent object
27   /// \param theData the widget configuation. The attribute of the model widget is obtained from
28   ModuleBase_WidgetBoolValue(QWidget* theParent, const Config_WidgetAPI* theData);
29
30   virtual ~ModuleBase_WidgetBoolValue();
31
32   virtual QList<QWidget*> getControls() const;
33
34   virtual void setHighlighted(bool isHighlighted);
35
36 protected:
37   /// Saves the internal parameters to the given feature
38   /// \return True in success
39   virtual bool storeValueCustom() const;
40
41   virtual bool restoreValueCustom();
42
43  private:
44    /// The check box
45   QCheckBox* myCheckBox;
46 };
47
48 #endif