Salome HOME
Working with folders which can not be shown empty
[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 #include <QToolBox>
15
16 class ModuleBase_PageBase;
17
18 class MODULEBASE_EXPORT ModuleBase_WidgetToolbox : public ModuleBase_PagedContainer
19 {
20   Q_OBJECT
21  public:
22   ModuleBase_WidgetToolbox(QWidget* theParent, const Config_WidgetAPI* theData,
23                            const std::string& theParentId);
24   virtual ~ModuleBase_WidgetToolbox();
25
26   /// Defines if it is supported to set the value in this widget
27   /// It returns false because this is an info widget
28   virtual bool canSetValue() const { return false; };
29
30   /// Overrides ModuleBase_PagedContainer
31   int addPage(ModuleBase_PageBase* theWidget,
32               const QString& theName, const QString& theCaseId);
33
34  protected:
35   /// Implements ModuleBase_PagedContainer
36   virtual int currentPageIndex() const;
37   /// Implements ModuleBase_PagedContainer
38   virtual void setCurrentPageIndex(int);
39
40  private:
41   QToolBox* myToolBox;
42 };
43
44 #endif /* MODULEBASE_WIDGETTOOLBOX_H_ */