Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / XGUI / XGUI_Workshop.h
index 922a4dd89726886200b87b5e1ebbedaa8bbf3aca..cd77d3b13a29f56584cbca2bba009767b65366de 100644 (file)
@@ -2,6 +2,7 @@
 #define XGUI_WORKSHOP_H
 
 #include "XGUI.h"
+#include "XGUI_Constants.h"
 #include <Events_Listener.h>
 
 #include <QObject>
@@ -23,6 +24,7 @@ class XGUI_ErrorDialog;
 class XGUI_SalomeViewer;
 class XGUI_ViewerProxy;
 class XGUI_PropertyPanel;
+class XGUI_ContextMenuMgr;
 
 class ModuleBase_Operation;
 
@@ -68,6 +70,9 @@ public:
   //! Returns property panel widget
   XGUI_PropertyPanel* propertyPanel() const { return myPropertyPanel; }
 
+  //! Returns context menu manager object
+  XGUI_ContextMenuMgr* contextMenuMgr() const { return myContextMenuMgr; }
+
   //! Creates and adds a new workbench (menu group) with the given name and returns it
   XGUI_Workbench* addWorkbench(const QString& theName);
 
@@ -114,7 +119,7 @@ public slots:
   void hideObjectBrowser();
 
   void onFeatureTriggered();
-  void changeCurrentDocument();
+  void changeCurrentDocument(FeaturePtr thePart);
 
 signals:
   void errorOccurred(const QString&);
@@ -134,6 +139,8 @@ protected slots:
   /// \param theOpertion a stopped operation
   void onOperationStopped(ModuleBase_Operation* theOperation);
 
+  void onContextMenuCommand(const QString& theId, bool isChecked);
+
 private:
   void initMenu();
 
@@ -146,6 +153,9 @@ private:
   // Creates Dock widgets: Object browser and Property panel
   void createDockWidgets();
 
+  //! Activates or deactivates currently selected part
+  void activatePart(bool toActivate);
+
   QString myCurrentFile;
   XGUI_MainWindow* myMainWindow;
   XGUI_Module* myPartSetModule;
@@ -158,6 +168,7 @@ private:
   XGUI_SalomeConnector* mySalomeConnector;
   XGUI_ErrorDialog* myErrorDlg;
   XGUI_ViewerProxy* myViewerProxy;
+  XGUI_ContextMenuMgr* myContextMenuMgr;
 
   static QMap<QString, QString> myIcons;