]> SALOME platform Git repositories - modules/shaper.git/blob - src/PartSet/PartSet_OperationSketchBase.cpp
Salome HOME
3412a2e19bb8473595dfe3792fbbc3e6187db1c6
[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 std::map<boost::shared_ptr<ModelAPI_Feature>, boost::shared_ptr<GeomAPI_Shape> >
36                                                      PartSet_OperationSketchBase::preview() const
37 {
38   return std::map<boost::shared_ptr<ModelAPI_Feature>, boost::shared_ptr<GeomAPI_Shape> >();
39 }
40
41 std::list<int> PartSet_OperationSketchBase::getSelectionModes(boost::shared_ptr<ModelAPI_Feature> theFeature) const
42 {
43   std::list<int> aModes;
44   aModes.push_back(TopAbs_VERTEX);
45   aModes.push_back(TopAbs_EDGE);
46   return aModes;
47 }
48 boost::shared_ptr<ModelAPI_Feature> PartSet_OperationSketchBase::createFeature()
49 {
50   boost::shared_ptr<ModelAPI_Feature> aFeature = ModuleBase_Operation::createFeature();
51   emit featureConstructed(aFeature, FM_Activation);
52   return aFeature;
53 }
54
55
56 void PartSet_OperationSketchBase::mousePressed(QMouseEvent* theEvent, Handle_V3d_View theView,
57                                                const std::list<XGUI_ViewerPrs>& theSelected)
58 {
59 }
60 void PartSet_OperationSketchBase::mouseReleased(QMouseEvent* theEvent, Handle_V3d_View theView,
61                                                 const std::list<XGUI_ViewerPrs>& theSelected)
62 {
63 }
64 void PartSet_OperationSketchBase::mouseMoved(QMouseEvent* theEvent, Handle(V3d_View) theView)
65 {
66 }