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 /// \param theParentId is Id of a parent of the current attribute
30 ModuleBase_WidgetCheckGroupBox(QWidget* theParent, const Config_WidgetAPI* theData,
31 const std::string& theParentId);
32 virtual ~ModuleBase_WidgetCheckGroupBox();
34 void setTitle(const QString& theTitle);
36 /// Methods to be redefined from ModuleBase_PageBase: start
37 /// Cast the page to regular QWidget
38 virtual QWidget* pageWidget();
39 /// Methods to be redefined from ModuleBase_PageBase: end
41 /// Methods to be redefined from ModuleBase_ModelWidget: start
42 /// Returns list of widget controls
43 /// \return a control list
44 virtual QList<QWidget*> getControls() const;
45 /// Methods to be redefined from ModuleBase_ModelWidget: end
48 // store value to the model
52 /// Methods to be redefined from ModuleBase_PageBase: start
53 /// Adds the given widget to page's layout
54 virtual void placeModelWidget(ModuleBase_ModelWidget* theWidget);
55 /// Adds the given page to page's layout
56 virtual void placePageWidget(ModuleBase_PageBase* theWidget);
57 /// Returns page's layout (QGridLayout)
58 virtual QLayout* pageLayout();
59 /// Adds a stretch to page's layout
60 virtual void addPageStretch();
61 /// Methods to be redefined from ModuleBase_PageBase: end
64 /// Methods to be redefined from ModuleBase_ModelWidget: start
65 /// Saves the internal parameters to the given feature
66 /// \return True in success
67 virtual bool storeValueCustom() const;
68 /// Restore value from attribute data to the widget's control
69 virtual bool restoreValueCustom();
70 /// Methods to be redefined from ModuleBase_ModelWidget: end
73 QGroupBox* myGroupBox;
74 QGridLayout* myMainLayout; ///< page's layout
77 #endif /* ModuleBase_WidgetCheckGroupBox_H_ */