Salome HOME
Adaptation of the application to SALOME interface (issue #31)
[modules/shaper.git] / src / PartSet / PartSet_OperationSketchBase.h
index b30f29935ba303eae52adcf9576b3e45ba1de2b0..62de3116be461513ee152639edc724378ec645e6 100644 (file)
@@ -15,6 +15,8 @@
 #include <ModuleBase_Operation.h>
 #include <QObject>
 
+#include <map>
+
 class Handle_V3d_View;
 class QMouseEvent;
 class GeomAPI_Shape;
@@ -43,6 +45,10 @@ public:
   /// \param theFeature the feature object to obtain the preview
   boost::shared_ptr<GeomAPI_Shape> preview(boost::shared_ptr<ModelAPI_Feature> theFeature) const;
 
+  /// Returns the map of the operation previews including the nested feature previews
+  /// \return the map of feature to the feature preview
+  virtual std::map<boost::shared_ptr<ModelAPI_Feature>, boost::shared_ptr<GeomAPI_Shape> > preview() const;
+
   /// Returns the operation local selection mode
   /// \param theFeature the feature object to get the selection mode
   /// \return the selection mode
@@ -50,12 +56,16 @@ public:
 
   /// Initializes some fields accorging to the feature
   /// \param theFeature the feature
-  virtual void init(boost::shared_ptr<ModelAPI_Feature> theFeature) {}
+  /// \param thePresentations the list of additional presentations
+  virtual void init(boost::shared_ptr<ModelAPI_Feature> theFeature,
+                    const std::list<XGUI_ViewerPrs>& thePresentations) {}
 
   /// Processes the mouse pressed in the point
   /// \param thePoint a point clicked in the viewer
   /// \param theEvent the mouse event
-  virtual void mousePressed(QMouseEvent* theEvent, Handle_V3d_View theView);
+  /// \param theSelected the list of selected presentations
+  virtual void mousePressed(QMouseEvent* theEvent, Handle_V3d_View theView,
+                            const std::list<XGUI_ViewerPrs>& theSelected);
 
   /// Processes the mouse release in the point
   /// \param thePoint a point clicked in the viewer
@@ -67,9 +77,7 @@ public:
   /// Processes the mouse move in the point
   /// \param thePoint a 3D point clicked in the viewer
   /// \param theEvent the mouse event
-  /// \param theSelected the list of selected presentations
-  virtual void mouseMoved(QMouseEvent* theEvent, Handle_V3d_View theView,
-                          const std::list<XGUI_ViewerPrs>& theSelected);
+  virtual void mouseMoved(QMouseEvent* theEvent, Handle_V3d_View theView);
 
   /// Processes the key pressed in the view
   /// \param theKey a key value
@@ -81,6 +89,9 @@ signals:
   /// \param theMode the mode of the feature modification
   void featureConstructed(boost::shared_ptr<ModelAPI_Feature> theFeature,
                           int theMode);
+  /// Signal about the features should be selected
+  /// \param theSelected the list of selected presentations
+  void featureSelected(const std::list<XGUI_ViewerPrs>& theSelected);
   /// signal about the request to launch operation
   /// theName the operation name
   /// theFeature the operation argument