]> SALOME platform Git repositories - modules/shaper.git/blob - src/XGUI/XGUI_Workbench.h
Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / XGUI / XGUI_Workbench.h
1 #ifndef XGUI_Workbench_H
2 #define XGUI_Workbench_H
3
4 #include "XGUI.h"
5 #include <QWidget>
6 #include <QScrollArea>
7 #include <QList>
8
9 class XGUI_Command;
10 class XGUI_MenuGroupPanel;
11 class CommandsArea;
12
13 class QHBoxLayout;
14 class QPushButton;
15
16 class XGUI_EXPORT XGUI_Workbench: public QWidget
17 {
18 Q_OBJECT
19 public:
20   XGUI_Workbench(QWidget* theParent);
21
22   XGUI_MenuGroupPanel* addGroup(const QString& theId);
23   XGUI_MenuGroupPanel* findGroup(const QString& theName);
24
25   //! Returns already created command by its ID
26   XGUI_Command* feature(const QString& theId) const;
27
28   //! Returns list of created commands
29   QList<XGUI_Command*> features() const;
30
31 private slots:
32   void onLeftScroll();
33   void onRightScroll();
34
35 protected:
36   virtual void resizeEvent(QResizeEvent * theEvent);
37   virtual bool eventFilter(QObject *theObj, QEvent *theEvent);
38
39
40 private:
41   void addSeparator();
42   bool isExceedsLeft();
43   bool isExceedsRight();
44
45   QWidget* myChildWidget;
46   QHBoxLayout* myLayout;
47   QList<XGUI_MenuGroupPanel*> myGroups;
48
49   CommandsArea* myCommandsArea;
50   QPushButton* myRightButton;
51   QPushButton* myLeftButton;
52 };
53
54 #endif