X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_Workbench.h;h=7ede0b98faa4ff12a4095878697b81d8d73236ba;hb=4fcd5da2d972334e887716499b0ea75d9d6c51c2;hp=e44b60b87d8f461eb88fcb82410595d75f091733;hpb=24a99a1363325ac341314c3f2e18326841940fb7;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_Workbench.h b/src/XGUI/XGUI_Workbench.h index e44b60b87..7ede0b98f 100644 --- a/src/XGUI/XGUI_Workbench.h +++ b/src/XGUI/XGUI_Workbench.h @@ -1,49 +1,53 @@ - #ifndef XGUI_Workbench_H #define XGUI_Workbench_H -#include "XGUI_Interfaces.h" - +#include "XGUI.h" #include #include #include -class QHBoxLayout; +class XGUI_Command; class XGUI_MenuGroupPanel; -class QPushButton; class CommandsArea; -class XGUI_Command; +class QHBoxLayout; +class QPushButton; -class XGUI_Workbench : public QWidget, public IWorkbench +class XGUI_EXPORT XGUI_Workbench : public QWidget { - Q_OBJECT -public: - XGUI_Workbench(QWidget* theParent); +Q_OBJECT + public: + XGUI_Workbench(QWidget* theParent); + + XGUI_MenuGroupPanel* addGroup(const QString& theId); + XGUI_MenuGroupPanel* findGroup(const QString& theName); - virtual IMenuGroup* addGroup(const QString& theName = ""); - virtual IMenuGroup* findGroup(const QString& theName); + //! Returns already created command by its ID + XGUI_Command* feature(const QString& theId) const; -private slots: - void onLeftScroll(); - void onRightScroll(); + //! Returns list of created commands + QList features() const; -protected: - virtual void resizeEvent(QResizeEvent * theEvent); + private slots: + void onLeftScroll(); + void onRightScroll(); -private: - void addSeparator(); - bool isExceedsLeft(); - bool isExceedsRight(); + protected: + virtual void resizeEvent(QResizeEvent * theEvent); + virtual bool eventFilter(QObject *theObj, QEvent *theEvent); + 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