1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 * ModuleBase_WidgetToolbox.h
5 * Created on: Feb 27, 2015
9 #ifndef MODULEBASE_WIDGETTOOLBOX_H_
10 #define MODULEBASE_WIDGETTOOLBOX_H_
12 #include <ModuleBase.h>
13 #include <ModuleBase_PagedContainer.h>
15 class ModuleBase_PageBase;
16 class ModuleBase_ToolBox;
20 * Implements a model widget for switch as a container widget. It can be defined in XML with "toolbox" keyword
22 class MODULEBASE_EXPORT ModuleBase_WidgetToolbox : public ModuleBase_PagedContainer
27 /// \param theParent the parent object
28 /// \param theData the widget configuration. The attribute of the model widget is obtained from
29 ModuleBase_WidgetToolbox(QWidget* theParent, const Config_WidgetAPI* theData);
30 virtual ~ModuleBase_WidgetToolbox();
32 /// Defines if it is supported to set the value in this widget
33 /// \return false because this is an info widget
34 virtual bool canAcceptFocus() const { return false; };
36 /// Add a page to the widget
37 /// \param theWidget a page widget
38 /// \param theName a name of page
39 /// \param theCaseId an Id of the page
40 /// \param theIcon an icon of the page
41 virtual int addPage( ModuleBase_PageBase* theWidget,
42 const QString& theName,
43 const QString& theCaseId,
44 const QPixmap& theIcon );
47 /// Implements ModuleBase_PagedContainer
48 virtual int currentPageIndex() const;
50 /// Implements ModuleBase_PagedContainer
51 virtual void setCurrentPageIndex(int);
54 ModuleBase_ToolBox* myToolBox;
57 #endif /* MODULEBASE_WIDGETTOOLBOX_H_ */