Salome HOME
Initial iteration for storage the back references and making concealment only on...
[modules/shaper.git] / src / XGUI / XGUI_Workbench.h
index d7916351a706cdec9a5687e5b38f6d79e294eae3..7ede0b98faa4ff12a4095878697b81d8d73236ba 100644 (file)
@@ -1,48 +1,53 @@
-
 #ifndef XGUI_Workbench_H
 #define XGUI_Workbench_H
 
+#include "XGUI.h"
 #include <QWidget>
 #include <QScrollArea>
 #include <QList>
 
-class QHBoxLayout;
+class XGUI_Command;
 class XGUI_MenuGroupPanel;
-class QPushButton;
 class CommandsArea;
-class XGUI_Command;
 
+class QHBoxLayout;
+class QPushButton;
 
-class XGUI_Workbench : public QWidget
+class XGUI_EXPORT XGUI_Workbench : public QWidget
 {
-    Q_OBJECT
-public:
-    XGUI_Workbench(QWidget* theParent);
+Q_OBJECT
+ public:
+  XGUI_Workbench(QWidget* theParent);
 
-    int addGroup();
+  XGUI_MenuGroupPanel* addGroup(const QString& theId);
+  XGUI_MenuGroupPanel* findGroup(const QString& theName);
 
-    void addCommand(int theGroupId, XGUI_Command* theCommand);
+  //! 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<XGUI_Command*> 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<XGUI_MenuGroupPanel*> myGroups;
+  QWidget* myChildWidget;
+  QHBoxLayout* myLayout;
+  QList<XGUI_MenuGroupPanel*> myGroups;
 
-    CommandsArea* myCommandsArea;
-    QPushButton* myRightButton;
-    QPushButton* myLeftButton;
+  CommandsArea* myCommandsArea;
+  QPushButton* myRightButton;
+  QPushButton* myLeftButton;
 };
 
-#endif;
\ No newline at end of file
+#endif