Salome HOME
85c0a2c30297b796bc0e6f4b7dcce66843cbf2c9
[modules/shaper.git] / src / PartSet / PartSet_OperationSketchBase.cpp
1 // File:        PartSet_OperationSketchBase.cpp
2 // Created:     20 Apr 2014
3 // Author:      Natalia ERMOLAEVA
4
5 #include <PartSet_OperationSketchBase.h>
6
7 #include <SketchPlugin_Feature.h>
8
9 #include <V3d_View.hxx>
10
11 #ifdef _DEBUG
12 #include <QDebug>
13 #endif
14
15 using namespace std;
16
17 PartSet_OperationSketchBase::PartSet_OperationSketchBase(const QString& theId,
18                                                              QObject* theParent)
19 : ModuleBase_Operation(theId, theParent)
20 {
21 }
22
23 PartSet_OperationSketchBase::~PartSet_OperationSketchBase()
24 {
25 }
26
27 boost::shared_ptr<GeomAPI_Shape> PartSet_OperationSketchBase::preview(
28                                       boost::shared_ptr<ModelAPI_Feature> theFeature) const
29 {
30   boost::shared_ptr<SketchPlugin_Feature> aFeature = 
31                               boost::dynamic_pointer_cast<SketchPlugin_Feature>(theFeature);
32   return aFeature->preview();
33 }
34
35 boost::shared_ptr<ModelAPI_Feature> PartSet_OperationSketchBase::createFeature()
36 {
37   boost::shared_ptr<ModelAPI_Feature> aFeature = ModuleBase_Operation::createFeature();
38   emit featureConstructed(aFeature, FM_Activation);
39   return aFeature;
40 }
41
42
43 void PartSet_OperationSketchBase::mousePressed(QMouseEvent* theEvent, Handle_V3d_View theView)
44 {
45 }
46 void PartSet_OperationSketchBase::mouseReleased(QMouseEvent* theEvent, Handle_V3d_View theView,
47                                                 const std::list<XGUI_ViewerPrs>& theSelected)
48 {
49 }
50 void PartSet_OperationSketchBase::mouseMoved(QMouseEvent* theEvent, Handle(V3d_View) theView)
51 {
52 }