Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / PartSet / PartSet_OperationSketchBase.cpp
index ec0d695d529d49eaf43aa6d4bb347b3663931221..c372bc72f96a4a174434649131e6c24e09691f2e 100644 (file)
@@ -1,3 +1,7 @@
+// File:        PartSet_OperationSketchBase.cpp
+// Created:     20 Apr 2014
+// Author:      Natalia ERMOLAEVA
+
 #include <PartSet_OperationSketchBase.h>
 
 #include <SketchPlugin_Feature.h>
 
 using namespace std;
 
-/*!
- \brief Constructor
-  \param theId an feature index
-  \param theParent the object parent
- */
 PartSet_OperationSketchBase::PartSet_OperationSketchBase(const QString& theId,
                                                             QObject* theParent)
 : ModuleBase_PropPanelOperation(theId, theParent)
 {
+  setEditMode(false);
 }
 
-/*!
- * \brief Destructor
- */
 PartSet_OperationSketchBase::~PartSet_OperationSketchBase()
 {
 }
 
-/**
- * Returns the feature preview shape
- */
-const TopoDS_Shape& PartSet_OperationSketchBase::preview() const
+boost::shared_ptr<GeomAPI_Shape> PartSet_OperationSketchBase::preview(
+                                      boost::shared_ptr<ModelAPI_Feature> theFeature) const
 {
-  boost::shared_ptr<SketchPlugin_Feature> aFeature = boost::dynamic_pointer_cast<SketchPlugin_Feature>(feature());
-  return *(static_cast<TopoDS_Shape*>(aFeature->preview()->implementation()));
-}
-
-/*!
- * Perform the operation start and emit signal about visualization of the operation preview
- */
-void PartSet_OperationSketchBase::startOperation()
-{
-  ModuleBase_PropPanelOperation::startOperation();
-
-  emit visualizePreview(true);
-}
-
-/*!
- * Perform the operation stop and emit signal about visualization stop of the operation preview
- */
-void PartSet_OperationSketchBase::stopOperation()
-{
-  ModuleBase_PropPanelOperation::stopOperation();
-
-  emit visualizePreview(false);
+  boost::shared_ptr<SketchPlugin_Feature> aFeature = 
+                              boost::dynamic_pointer_cast<SketchPlugin_Feature>(theFeature);
+  return aFeature->preview();
 }