Salome HOME
Bugfixes for focus processing in the property panel
[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   virtual void setHighlighted(bool isHighlighted);
29   virtual void enableFocusProcessing();
30
31   int addPage(ModuleBase_PageBase* theWidget,
32               const QString& theName, const QString& theCaseId);
33
34  protected:
35   virtual void activateCustom();
36   virtual bool storeValueCustom() const;
37
38  protected slots:
39   void onPageChanged();
40
41  private:
42   bool myIsPassFocusToCurrentPage;
43   QToolBox* myToolBox;
44   QStringList myCaseIds;
45   QList<ModuleBase_PageBase*> myPages;
46 };
47
48 #endif /* MODULEBASE_WIDGETTOOLBOX_H_ */