Salome HOME
Merge branch 'Dev_1.1.0' of newgeom:newgeom.git into Dev_1.1.0
[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_ModelWidget.h>
12
13 #include <QToolBox>
14
15 class ModuleBase_PageBase;
16
17 class ModuleBase_WidgetToolbox : public ModuleBase_ModelWidget
18 {
19   Q_OBJECT
20  public:
21   ModuleBase_WidgetToolbox(QWidget* theParent, const Config_WidgetAPI* theData,
22                            const std::string& theParentId);
23   virtual ~ModuleBase_WidgetToolbox();
24
25   virtual bool restoreValue();
26   virtual QList<QWidget*> getControls() const;
27   virtual bool focusTo();
28
29   int addPage(ModuleBase_PageBase* theWidget,
30               const QString& theName, const QString& theCaseId);
31
32  protected:
33   virtual void activateCustom();
34   virtual bool storeValueCustom() const;
35
36  protected slots:
37   void onPageChanged();
38
39  private:
40   QToolBox* myToolBox;
41   QStringList myCaseIds;
42   QList<ModuleBase_PageBase*> myPages;
43 };
44
45 #endif /* MODULEBASE_WIDGETTOOLBOX_H_ */