X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_OperationSketchBase.cpp;h=997a96b1217e16b3d1e5dd55e0b530e7b589eac8;hb=867dffeb10c41d0619372c56a54ea888da7bd60d;hp=519c97f76d5335d3def922e4158b77de59982c2f;hpb=88f6ce164eff7f5100ae97559e1bc225444706cd;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_OperationSketchBase.cpp b/src/PartSet/PartSet_OperationSketchBase.cpp index 519c97f76..997a96b12 100644 --- a/src/PartSet/PartSet_OperationSketchBase.cpp +++ b/src/PartSet/PartSet_OperationSketchBase.cpp @@ -5,6 +5,9 @@ #include #include +#include + +#include #ifdef _DEBUG #include @@ -14,7 +17,7 @@ using namespace std; PartSet_OperationSketchBase::PartSet_OperationSketchBase(const QString& theId, QObject* theParent) -: ModuleBase_PropPanelOperation(theId, theParent) +: ModuleBase_Operation(theId, theParent) { } @@ -22,9 +25,49 @@ PartSet_OperationSketchBase::~PartSet_OperationSketchBase() { } -const TopoDS_Shape& PartSet_OperationSketchBase::preview() const +boost::shared_ptr PartSet_OperationSketchBase::preview( + boost::shared_ptr theFeature) const { boost::shared_ptr aFeature = - boost::dynamic_pointer_cast(feature()); - return aFeature->preview()->impl(); + boost::dynamic_pointer_cast(theFeature); + if (!aFeature) { // if it is reference to a object feature + boost::shared_ptr anObj = + boost::dynamic_pointer_cast(theFeature); + if (anObj) + aFeature = boost::dynamic_pointer_cast(anObj->featureRef()); + } + return aFeature->preview(); +} + +std::map, boost::shared_ptr > + PartSet_OperationSketchBase::preview() const +{ + return std::map, boost::shared_ptr >(); +} + +std::list PartSet_OperationSketchBase::getSelectionModes(boost::shared_ptr theFeature) const +{ + std::list aModes; + aModes.push_back(TopAbs_VERTEX); + aModes.push_back(TopAbs_EDGE); + return aModes; +} +boost::shared_ptr PartSet_OperationSketchBase::createFeature() +{ + boost::shared_ptr aFeature = ModuleBase_Operation::createFeature(); + emit featureConstructed(aFeature, FM_Activation); + return aFeature; +} + + +void PartSet_OperationSketchBase::mousePressed(QMouseEvent* theEvent, Handle_V3d_View theView, + const std::list& theSelected) +{ +} +void PartSet_OperationSketchBase::mouseReleased(QMouseEvent* theEvent, Handle_V3d_View theView, + const std::list& theSelected) +{ +} +void PartSet_OperationSketchBase::mouseMoved(QMouseEvent* theEvent, Handle(V3d_View) theView) +{ }