X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_Workbench.h;h=144a23a2d2fe8ffa84965b6b1facfe2f8346e150;hb=d86c77d1c6210bbe04fbc3e5b00f9e212e1ec930;hp=26d7d6918bb486860d3b69eecd5a82521a46d00f;hpb=5bd491bf7444d3859f91ed88142e6186d8881f6e;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_Workbench.h b/src/XGUI/XGUI_Workbench.h index 26d7d6918..144a23a2d 100644 --- a/src/XGUI/XGUI_Workbench.h +++ b/src/XGUI/XGUI_Workbench.h @@ -1,7 +1,7 @@ - #ifndef XGUI_Workbench_H #define XGUI_Workbench_H +#include "XGUI.h" #include #include #include @@ -13,37 +13,42 @@ class CommandsArea; class QHBoxLayout; class QPushButton; - - -class XGUI_Workbench : public QWidget +class XGUI_EXPORT XGUI_Workbench: public QWidget { - Q_OBJECT +Q_OBJECT public: - XGUI_Workbench(QWidget* theParent); + XGUI_Workbench(QWidget* theParent); + + XGUI_MenuGroupPanel* addGroup(const QString& theId); + XGUI_MenuGroupPanel* findGroup(const QString& theName); - XGUI_MenuGroupPanel* addGroup(const QString& theName = ""); - XGUI_MenuGroupPanel* findGroup(const QString& theName); + //! Returns already created command by its ID + XGUI_Command* feature(const QString& theId) const; + + //! Returns list of created commands + QList features() const; private slots: - void onLeftScroll(); - void onRightScroll(); + void onLeftScroll(); + void onRightScroll(); protected: - virtual void resizeEvent(QResizeEvent * theEvent); + virtual void resizeEvent(QResizeEvent * theEvent); + virtual bool eventFilter(QObject *theObj, QEvent *theEvent); -private: - void addSeparator(); - bool isExceedsLeft(); - bool isExceedsRight(); +private: + void addSeparator(); + bool isExceedsLeft(); + bool isExceedsRight(); - QWidget* myChildWidget; - QHBoxLayout* myLayout; - QList myGroups; + QWidget* myChildWidget; + QHBoxLayout* myLayout; + QList myGroups; - CommandsArea* myCommandsArea; - QPushButton* myRightButton; - QPushButton* myLeftButton; + CommandsArea* myCommandsArea; + QPushButton* myRightButton; + QPushButton* myLeftButton; }; -#endif; +#endif