]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/PartSet/PartSet_WidgetSubShapeSelector.h
Salome HOME
Issue #1664: In the Sketcher, add the function Split a segment. Validator for selecti...
[modules/shaper.git] / src / PartSet / PartSet_WidgetSubShapeSelector.h
index 34e7b371a4cc6fd6135f2e4e175730dc5b1a1267..feee61b01ee6d6ad9670b05638214a1033d2a3dd 100644 (file)
 
 #include "PartSet.h"
 
-#include <PartSet_WidgetShapeSelector.h>
+#include <ModuleBase_WidgetShapeSelector.h>
 #include <PartSet_MouseProcessor.h>
 
+#include <ModelAPI_CompositeFeature.h>
+
 #include <QObject>
 
 #include <set>
@@ -32,7 +34,7 @@ class QMouseEvent;
 * by mouse move over shape in the viewer. Split of the object is performed by
 * coincident points to the object. Segment between nearest coincidence is highlighted
 */
-class PARTSET_EXPORT PartSet_WidgetSubShapeSelector: public PartSet_WidgetShapeSelector,
+class PARTSET_EXPORT PartSet_WidgetSubShapeSelector: public ModuleBase_WidgetShapeSelector,
                                                      public PartSet_MouseProcessor
 {
 Q_OBJECT
@@ -46,6 +48,13 @@ Q_OBJECT
 
   virtual ~PartSet_WidgetSubShapeSelector();
 
+  /// Set sketcher
+  /// \param theSketch a sketcher object
+  void setSketcher(CompositeFeaturePtr theSketch) { mySketch = theSketch; }
+
+  /// Retrurns installed sketcher
+  CompositeFeaturePtr sketch() const { return mySketch; }
+
   /// The methiod called when widget is deactivated
   virtual void deactivate();
 
@@ -80,6 +89,9 @@ protected:
 protected:
   std::shared_ptr<ModuleBase_ViewerPrs> myCurrentSubShape;
   std::map<ObjectPtr, std::set<GeomShapePtr> > myCashedShapes;
+
+  /// Pointer to a sketch 
+  CompositeFeaturePtr mySketch;
 };
 
 #endif
\ No newline at end of file