Salome HOME
New features processing in SketchSolver (stage 1)
[modules/shaper.git] / src / XGUI / XGUI_MainMenu.h
index 028f73b12a87c24c5225017196633afc41044f08..48d97459135f78be9f26e3f2b6a6d7450e10f833 100644 (file)
@@ -1,8 +1,10 @@
 #ifndef XGUI_MainMenu_H
 #define XGUI_MainMenu_H
 
+#include "XGUI.h"
 #include <QObject>
 #include <QList>
+#include <QMap>
 
 class XGUI_Command;
 class XGUI_MainWindow;
@@ -13,12 +15,14 @@ class QTabWidget;
 class QLabel;
 class QAction;
 class QDockWidget;
+class QEvent;
+
 
 /**\class XGUI_MainMenu
  * \ingroup GUI
  * \brief Class for creation of main menu (set of workbenches)
  */
-class XGUI_MainMenu: public QObject
+class XGUI_EXPORT XGUI_MainMenu: public QObject
 {
 Q_OBJECT
 public:
@@ -37,10 +41,20 @@ public:
   //! Rerturns last created workbench in dock widget container
   QDockWidget* getLastDockWindow() const { return myMenuTabs.last(); }
 
+  //! Returns already created command by its ID
+  XGUI_Command* feature(const QString& theId) const;
+
+  //! Returns list of created commands
+  QList<XGUI_Command*> features() const;
+
+  virtual bool eventFilter(QObject *theWatched, QEvent *theEvent);
+
 private:
   XGUI_MainWindow* myDesktop;
   QList<QDockWidget*> myMenuTabs;
   XGUI_Workbench* myGeneralPage;
+
+  QMap<XGUI_Command*, bool> myCommandState;
 };
 
 #endif