2 * ModuleBase_WidgetToolbox.h
4 * Created on: Feb 27, 2015
8 #ifndef MODULEBASE_WIDGETTOOLBOX_H_
9 #define MODULEBASE_WIDGETTOOLBOX_H_
11 #include <ModuleBase.h>
12 #include <ModuleBase_PagedContainer.h>
14 class ModuleBase_PageBase;
15 class ModuleBase_ToolBox;
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_WidgetToolbox : public ModuleBase_PagedContainer
26 /// \param theParent the parent object
27 /// \param theData the widget configuration. The attribute of the model widget is obtained from
28 /// \param theParentId is Id of a parent of the current attribute
29 ModuleBase_WidgetToolbox(QWidget* theParent, const Config_WidgetAPI* theData,
30 const std::string& theParentId);
31 virtual ~ModuleBase_WidgetToolbox();
33 /// Defines if it is supported to set the value in this widget
34 /// \return false because this is an info widget
35 virtual bool canSetValue() const { return false; };
37 /// Add a page to the widget
38 /// \param theWidget a page widget
39 /// \param theName a name of page
40 /// \param theCaseId an Id of the page
41 /// \param theIcon an icon of the page
42 virtual int addPage( ModuleBase_PageBase* theWidget,
43 const QString& theName,
44 const QString& theCaseId,
45 const QPixmap& theIcon );
48 /// Implements ModuleBase_PagedContainer
49 virtual int currentPageIndex() const;
51 /// Implements ModuleBase_PagedContainer
52 virtual void setCurrentPageIndex(int);
55 ModuleBase_ToolBox* myToolBox;
58 #endif /* MODULEBASE_WIDGETTOOLBOX_H_ */