Salome HOME
Issue #1037 : do not find model indices for the same result. If selection mode is...
[modules/shaper.git] / src / XGUI / XGUI_ModuleConnector.h
index 266967988e30ac953518ffa2c47e704f02e3d26f..6fc335412048cec2f0445f3057b1f509607bc8d9 100644 (file)
@@ -10,7 +10,6 @@
 #include "XGUI.h"
 #include <ModuleBase_Definitions.h>
 #include <ModuleBase_IWorkshop.h>
-#include <ModuleBase_ViewerFilters.h>
 
 class Handle_AIS_InteractiveContext;
 class XGUI_Workshop;
@@ -18,7 +17,7 @@ class XGUI_Displayer;
 
 /**
  * \ingroup GUI
- * Implementation of IWorkshop interface which provides access to Workshop sevices at module level
+ * Implementation of IWorkshop interface which provides access to Workshop services at module level
  */
 class XGUI_EXPORT XGUI_ModuleConnector : public ModuleBase_IWorkshop
 {
@@ -37,6 +36,9 @@ Q_OBJECT
   /// Types has to be dined according to TopAbs_ShapeEnum
   virtual void activateSubShapesSelection(const QIntList& theTypes);
 
+  /// Activate objects in the module selection modes(opens local context)
+  virtual void activateModuleSelectionModes();
+
   /// Deactivate sub-shapes selection (closes local context)
   virtual void deactivateSubShapesSelection();
 
@@ -46,13 +48,30 @@ Q_OBJECT
   //! Returns current viewer
   virtual ModuleBase_IViewer* viewer() const;
 
+  //! Returns property panel
+  virtual ModuleBase_IPropertyPanel* propertyPanel() const;
+
   //! Returns currently active operation
   virtual ModuleBase_Operation* currentOperation() const;
 
   //! Returns true if the operation with id theId can be started
   virtual bool canStartOperation(QString theId);
 
-  //! Returns AIS opbject by data object
+  //! Returns started operation by the operation identifier. The operation manager is called.
+  //! \param theId an operation id
+  //! \return an operation instance or NULL
+  virtual ModuleBase_Operation* findStartedOperation(const QString& theId);
+
+  //! Returns true if the operation with id theId can be stopped. The operation manager is called.
+  //! \param theOperation a stopped operation
+  //! \return boolean result
+  virtual bool canStopOperation(ModuleBase_Operation* theOperation);
+
+  //! Aborts the operation. The operation manager is called.
+  //! \param theOperation an aborted operation
+  void abortOperation(ModuleBase_Operation* theOperation);
+
+  //! Returns AIS object by data object
   virtual AISObjectPtr findPresentation(const ObjectPtr& theObject) const;
 
   //! Returns data object by AIS
@@ -60,17 +79,27 @@ Q_OBJECT
 
   //! Select features clearing previous selection. 
   //! If the list is empty then selection will be cleared
-  virtual void setSelected(const QObjectPtrList& theFeatures);
+  virtual void setSelected(const QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues);
+
+   /// Update of commands status
+  virtual void updateCommandStatus();
+
+  /// Returns Information about feature defined in corresponded XML
+  /// \param theId - id of the feature
+  virtual std::shared_ptr<Config_FeatureMessage> featureInfo(const QString& theId) const;
+
+  /// Return application main window
+  virtual QMainWindow* desktop() const;
+
 
   //! Returns workshop
   XGUI_Workshop* workshop() const { return myWorkshop; }
 
 private:
+  QObjectPtrList activeObjects(const QObjectPtrList& theObjList) const;
+
   /// Reference to workshop
   XGUI_Workshop* myWorkshop;
-
-  /// A filter which provides selection within a current document or whole PartSet
-  Handle(ModuleBase_ShapeDocumentFilter) myDocumentShapeFilter;
 };
 
 #endif