Salome HOME
Issue #1278 In the sketch the creation line is not functional when I check the box...
[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   /// Constructor
26   /// \param theParent the parent object
27   /// \param theData the widget configuration. The attribute of the model widget is obtained from
28   ModuleBase_WidgetToolbox(QWidget* theParent, const Config_WidgetAPI* theData);
29   virtual ~ModuleBase_WidgetToolbox();
30
31   /// Defines if it is supported to set the value in this widget
32   /// \return false because this is an info widget
33   virtual bool canAcceptFocus() const { return false; };
34
35   /// Add a page to the widget
36   /// \param theWidget a page widget
37   /// \param theName a name of page
38   /// \param theCaseId an Id of the page
39   /// \param theIcon an icon of the page
40   virtual int addPage( ModuleBase_PageBase* theWidget,
41                        const QString& theName,
42                        const QString& theCaseId,
43                        const QPixmap& theIcon );
44
45  protected:
46   /// Implements ModuleBase_PagedContainer
47   virtual int currentPageIndex() const;
48
49   /// Implements ModuleBase_PagedContainer
50   virtual void setCurrentPageIndex(int);
51
52  private:
53   ModuleBase_ToolBox* myToolBox;
54 };
55
56 #endif /* MODULEBASE_WIDGETTOOLBOX_H_ */