Salome HOME
Working with pre-selection in all operations
[modules/shaper.git] / src / ModuleBase / ModuleBase_IWorkshop.h
index d9dcf5405fb4d8968a5f9259566a96080c2ff3b9..d4b9265ca1868233629abd8744451fc8eced7f5d 100644 (file)
@@ -7,31 +7,45 @@
 
 #include "ModuleBase.h"
 
-#include <ModelAPI_Feature.h>
-
-#include <AIS_InteractiveContext.hxx>
+#include <ModelAPI_Object.h>
 
 #include <QObject>
 
+class ModuleBase_IModule;
+class ModuleBase_ISelection;
+class ModuleBase_IViewer;
+class ModuleBase_Operation;
+
 /**
-* Class which provides access to Workshop object serveces
-*/
-class MODULEBASE_EXPORT ModuleBase_IWorkshop: public QObject
+ * Class which provides access to Workshop object serveces
+ */
+class MODULEBASE_EXPORT ModuleBase_IWorkshop : public QObject
 {
 Q_OBJECT
-public:
-  ModuleBase_IWorkshop(QObject* theParent):QObject(theParent) {}
+ public:
+  ModuleBase_IWorkshop(QObject* theParent)
+      : QObject(theParent)
+  {}
+
+  virtual ~ModuleBase_IWorkshop()
+  {}
 
-  virtual ~ModuleBase_IWorkshop() {};
+  virtual ModuleBase_ISelection* selection() const = 0;
 
-  //! Returns AIS_InteractiveContext from current OCCViewer
-  virtual Handle(AIS_InteractiveContext) AISContext() const = 0;
+  //! Returns instance of loaded module
+  virtual ModuleBase_IModule* module() const = 0;
 
-  //! Returns list of currently selected data objects
-  virtual QList<FeaturePtr> selectedFeatures() const = 0; 
+  //! Returns current viewer
+  virtual ModuleBase_IViewer* viewer() const = 0;
+
+  //! Returns currently active operation
+  virtual ModuleBase_Operation* currentOperation() const = 0;
 
 signals:
   void selectionChanged();
+
+  void operationStarted(ModuleBase_Operation*);
+  void operationStopped(ModuleBase_Operation*);
 };
 
-#endif
\ No newline at end of file
+#endif