Salome HOME
Add tools
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetToolbox.h
1 /*
2  * ModuleBase_WidgetToolbox.h
3  *
4  *  Created on: Feb 27, 2015
5  *      Author: sbh
6  */
7
8 #ifndef MODULEBASE_WIDGETTOOLBOX_H_
9 #define MODULEBASE_WIDGETTOOLBOX_H_
10
11 #include <ModuleBase.h>
12 #include <ModuleBase_PagedContainer.h>
13
14 class ModuleBase_PageBase;
15 class ModuleBase_ToolBox;
16
17 /**
18 * \ingroup GUI
19 * Implements a model widget for switch as a container widget. It can be defined in XML with "toolbox" keyword
20 */
21 class MODULEBASE_EXPORT ModuleBase_WidgetToolbox : public ModuleBase_PagedContainer
22 {
23   Q_OBJECT
24  public:
25   ModuleBase_WidgetToolbox(QWidget* theParent, const Config_WidgetAPI* theData,
26                            const std::string& theParentId);
27   virtual ~ModuleBase_WidgetToolbox();
28
29   /// Defines if it is supported to set the value in this widget
30   /// \return false because this is an info widget
31   virtual bool canSetValue() const { return false; };
32
33   /// Overrides ModuleBase_PagedContainer
34   virtual int addPage( ModuleBase_PageBase* theWidget,
35                        const QString& theName,
36                        const QString& theCaseId,
37                        const QPixmap& theIcon );
38
39  protected:
40   /// Implements ModuleBase_PagedContainer
41   virtual int currentPageIndex() const;
42   /// Implements ModuleBase_PagedContainer
43   virtual void setCurrentPageIndex(int);
44
45  private:
46   ModuleBase_ToolBox* myToolBox;
47 };
48
49 #endif /* MODULEBASE_WIDGETTOOLBOX_H_ */