Salome HOME
d7916351a706cdec9a5687e5b38f6d79e294eae3
[modules/shaper.git] / src / XGUI / XGUI_Workbench.h
1
2 #ifndef XGUI_Workbench_H
3 #define XGUI_Workbench_H
4
5 #include <QWidget>
6 #include <QScrollArea>
7 #include <QList>
8
9 class QHBoxLayout;
10 class XGUI_MenuGroupPanel;
11 class QPushButton;
12 class CommandsArea;
13 class XGUI_Command;
14
15
16 class XGUI_Workbench : public QWidget
17 {
18     Q_OBJECT
19 public:
20     XGUI_Workbench(QWidget* theParent);
21
22     int addGroup();
23
24     void addCommand(int theGroupId, XGUI_Command* theCommand);
25
26 private slots:
27     void onLeftScroll();
28     void onRightScroll();
29
30 protected:
31     virtual void resizeEvent(QResizeEvent * theEvent);
32
33 private:
34     void addSeparator();
35     bool isExceedsLeft();
36     bool isExceedsRight();
37
38
39     QWidget* myChildWidget;
40     QHBoxLayout* myLayout;
41     QList<XGUI_MenuGroupPanel*> myGroups;
42
43     CommandsArea* myCommandsArea;
44     QPushButton* myRightButton;
45     QPushButton* myLeftButton;
46 };
47
48 #endif;