]> SALOME platform Git repositories - modules/shaper.git/blob - src/XGUI/XGUI_Workbench.h
Salome HOME
Merge branch 'master' into BR_PYTHON_PLUGIN
[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  private:
40   void addSeparator();
41   bool isExceedsLeft();
42   bool isExceedsRight();
43
44   QWidget* myChildWidget;
45   QHBoxLayout* myLayout;
46   QList<XGUI_MenuGroupPanel*> myGroups;
47
48   CommandsArea* myCommandsArea;
49   QPushButton* myRightButton;
50   QPushButton* myLeftButton;
51 };
52
53 #endif