1 // File: PartSet_OperationSketchBase.cpp
2 // Created: 20 Apr 2014
3 // Author: Natalia ERMOLAEVA
5 #include <PartSet_OperationSketchBase.h>
7 #include <SketchPlugin_Feature.h>
9 #include <V3d_View.hxx>
17 PartSet_OperationSketchBase::PartSet_OperationSketchBase(const QString& theId,
19 : ModuleBase_Operation(theId, theParent)
23 PartSet_OperationSketchBase::~PartSet_OperationSketchBase()
27 boost::shared_ptr<GeomAPI_Shape> PartSet_OperationSketchBase::preview(
28 boost::shared_ptr<ModelAPI_Feature> theFeature) const
30 boost::shared_ptr<SketchPlugin_Feature> aFeature =
31 boost::dynamic_pointer_cast<SketchPlugin_Feature>(theFeature);
32 return aFeature->preview();
35 std::map<boost::shared_ptr<ModelAPI_Feature>, boost::shared_ptr<GeomAPI_Shape> >
36 PartSet_OperationSketchBase::preview() const
38 return std::map<boost::shared_ptr<ModelAPI_Feature>, boost::shared_ptr<GeomAPI_Shape> >();
41 std::list<int> PartSet_OperationSketchBase::getSelectionModes(boost::shared_ptr<ModelAPI_Feature> theFeature) const
43 std::list<int> aModes;
44 aModes.push_back(TopAbs_VERTEX);
45 aModes.push_back(TopAbs_EDGE);
48 boost::shared_ptr<ModelAPI_Feature> PartSet_OperationSketchBase::createFeature()
50 boost::shared_ptr<ModelAPI_Feature> aFeature = ModuleBase_Operation::createFeature();
51 emit featureConstructed(aFeature, FM_Activation);
56 void PartSet_OperationSketchBase::mousePressed(QMouseEvent* theEvent, Handle_V3d_View theView,
57 const std::list<XGUI_ViewerPrs>& theSelected)
60 void PartSet_OperationSketchBase::mouseReleased(QMouseEvent* theEvent, Handle_V3d_View theView,
61 const std::list<XGUI_ViewerPrs>& theSelected)
64 void PartSet_OperationSketchBase::mouseMoved(QMouseEvent* theEvent, Handle(V3d_View) theView)