X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_OperationSketchLine.cpp;h=bd24b954a4e52f5c1afe980c9147c62e5c522a03;hb=f581964034f8df715c46a07c5ecb762492d6b4cf;hp=cd7e1497a926926f16fc37200eb542e726215a14;hpb=e884d8b11e3cde0d41d80bb39e3108f4725c3917;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_OperationSketchLine.cpp b/src/PartSet/PartSet_OperationSketchLine.cpp index cd7e1497a..bd24b954a 100644 --- a/src/PartSet/PartSet_OperationSketchLine.cpp +++ b/src/PartSet/PartSet_OperationSketchLine.cpp @@ -45,7 +45,7 @@ using namespace std; PartSet_OperationSketchLine::PartSet_OperationSketchLine(const QString& theId, QObject* theParent, - boost::shared_ptr theFeature) + FeaturePtr theFeature) : PartSet_OperationSketchBase(theId, theParent), mySketch(theFeature), myPointSelectionMode(SM_FirstPoint) { @@ -65,7 +65,7 @@ bool PartSet_OperationSketchLine::isGranted(ModuleBase_IOperation* theOperation) return theOperation->getDescription()->operationId().toStdString() == PartSet_OperationSketch::Type(); } -std::list PartSet_OperationSketchLine::getSelectionModes(boost::shared_ptr theFeature) const +std::list PartSet_OperationSketchLine::getSelectionModes(FeaturePtr theFeature) const { std::list aModes; if (theFeature != feature()) @@ -73,7 +73,7 @@ std::list PartSet_OperationSketchLine::getSelectionModes(boost::shared_ptr< return aModes; } -void PartSet_OperationSketchLine::init(boost::shared_ptr theFeature, +void PartSet_OperationSketchLine::init(FeaturePtr theFeature, const std::list& /*theSelected*/, const std::list& /*theHighlighted*/) { @@ -84,7 +84,7 @@ void PartSet_OperationSketchLine::init(boost::shared_ptr theFe myInitPoint = boost::dynamic_pointer_cast(aData->attribute(LINE_ATTR_END)); } -boost::shared_ptr PartSet_OperationSketchLine::sketch() const +FeaturePtr PartSet_OperationSketchLine::sketch() const { return mySketch; } @@ -127,7 +127,7 @@ void PartSet_OperationSketchLine::mouseReleased(QMouseEvent* theEvent, Handle(V3 } else if (aShape.ShapeType() == TopAbs_EDGE) // the line is selected { - boost::shared_ptr aFeature = aPrs.feature(); + FeaturePtr aFeature = aPrs.feature(); if (aFeature) { double X0, X1, X2, X3; double Y0, Y1, Y2, Y3; @@ -233,7 +233,7 @@ void PartSet_OperationSketchLine::keyReleased(const int theKey) } //else // abort(); - //emit launchOperation(PartSet_OperationSketchLine::Type(), boost::shared_ptr()); + //emit launchOperation(PartSet_OperationSketchLine::Type(), FeaturePtr()); } break; case Qt::Key_Escape: { @@ -275,9 +275,9 @@ void PartSet_OperationSketchLine::afterCommitOperation() emit featureConstructed(feature(), FM_Deactivation); } -boost::shared_ptr PartSet_OperationSketchLine::createFeature(const bool theFlushMessage) +FeaturePtr PartSet_OperationSketchLine::createFeature(const bool theFlushMessage) { - boost::shared_ptr aNewFeature = ModuleBase_Operation::createFeature(false); + FeaturePtr aNewFeature = ModuleBase_Operation::createFeature(false); if (sketch()) { boost::shared_ptr aFeature = boost::dynamic_pointer_cast(sketch()); @@ -304,7 +304,7 @@ void PartSet_OperationSketchLine::createConstraint(boost::shared_ptr thePoint2) { boost::shared_ptr aDoc = document(); - boost::shared_ptr aFeature = aDoc->addFeature(SKETCH_CONSTRAINT_COINCIDENCE_KIND); + FeaturePtr aFeature = aDoc->addFeature(SKETCH_CONSTRAINT_COINCIDENCE_KIND); if (sketch()) { boost::shared_ptr aSketch = @@ -341,7 +341,7 @@ void PartSet_OperationSketchLine::setConstraints(double theX, double theY) break; } - boost::shared_ptr aSkFeature = feature(); + FeaturePtr aSkFeature = feature(); boost::shared_ptr aData = feature()->data(); boost::shared_ptr aPoint = boost::dynamic_pointer_cast @@ -350,18 +350,18 @@ void PartSet_OperationSketchLine::setConstraints(double theX, double theY) boost::shared_ptr aRefList = boost::dynamic_pointer_cast(aData->attribute(SKETCH_ATTR_FEATURES)); - std::list > aFeatures = aRefList->list(); - std::list >::const_iterator anIt = aFeatures.begin(), + std::list aFeatures = aRefList->list(); + std::list::const_iterator anIt = aFeatures.begin(), aLast = aFeatures.end(); for (; anIt != aLast; anIt++) { - boost::shared_ptr aFeature = *anIt; + FeaturePtr aFeature = *anIt; boost::shared_ptr aFPoint = findLinePoint(aFeature, theX, theY); if (aFPoint) createConstraint(aFPoint, aPoint); } } -void PartSet_OperationSketchLine::getLinePoint(boost::shared_ptr theFeature, +void PartSet_OperationSketchLine::getLinePoint(FeaturePtr theFeature, const std::string& theAttribute, double& theX, double& theY) { @@ -375,7 +375,7 @@ void PartSet_OperationSketchLine::getLinePoint(boost::shared_ptr PartSet_OperationSketchLine::findLinePoint( - boost::shared_ptr theFeature, + FeaturePtr theFeature, double theX, double theY) { boost::shared_ptr aPoint2D; @@ -395,7 +395,7 @@ boost::shared_ptr PartSet_OperationSketchLine::findLinePoin return aPoint2D; } -void PartSet_OperationSketchLine::setLinePoint(boost::shared_ptr theFeature, +void PartSet_OperationSketchLine::setLinePoint(FeaturePtr theFeature, double theX, double theY, const std::string& theAttribute) {