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