1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: ModuleBase_WidgetCheckGroupBox.h
4 // Created: 13 Dec 2015
5 // Author: Natalia ERMOLAEVA
7 #ifndef ModuleBase_WidgetCheckGroupBox_H_
8 #define ModuleBase_WidgetCheckGroupBox_H_
10 #include <ModuleBase.h>
11 #include <ModuleBase_PageBase.h>
12 #include <ModuleBase_ModelWidget.h>
19 * Implements a model widget for switch as a container widget. It can be defined in XML with "toolbox" keyword
21 class MODULEBASE_EXPORT ModuleBase_WidgetCheckGroupBox : public ModuleBase_ModelWidget,
22 public ModuleBase_PageBase
27 /// \param theParent the parent object
28 /// \param theData the widget configuration. The attribute of the model widget is obtained from
29 ModuleBase_WidgetCheckGroupBox(QWidget* theParent, const Config_WidgetAPI* theData);
30 virtual ~ModuleBase_WidgetCheckGroupBox();
32 void setTitle(const QString& theTitle);
34 /// Methods to be redefined from ModuleBase_PageBase: start
35 /// Cast the page to regular QWidget
36 virtual QWidget* pageWidget();
37 /// Methods to be redefined from ModuleBase_PageBase: end
39 /// Methods to be redefined from ModuleBase_ModelWidget: start
40 /// Returns list of widget controls
41 /// \return a control list
42 virtual QList<QWidget*> getControls() const;
43 /// Methods to be redefined from ModuleBase_ModelWidget: end
46 // store value to the model
50 /// Methods to be redefined from ModuleBase_PageBase: start
51 /// Adds the given widget to page's layout
52 virtual void placeModelWidget(ModuleBase_ModelWidget* theWidget);
53 /// Adds the given page to page's layout
54 virtual void placeWidget(QWidget* theWidget);
55 /// Returns page's layout (QGridLayout)
56 virtual QLayout* pageLayout();
57 /// Adds a stretch to page's layout
58 virtual void addPageStretch();
59 /// Methods to be redefined from ModuleBase_PageBase: end
62 /// Methods to be redefined from ModuleBase_ModelWidget: start
63 /// Saves the internal parameters to the given feature
64 /// \return True in success
65 virtual bool storeValueCustom();
66 /// Restore value from attribute data to the widget's control
67 virtual bool restoreValueCustom();
68 /// Methods to be redefined from ModuleBase_ModelWidget: end
71 QGroupBox* myGroupBox;
72 QGridLayout* myMainLayout; ///< page's layout
75 #endif /* ModuleBase_WidgetCheckGroupBox_H_ */