PartSet_OperationEditLine::PartSet_OperationEditLine(const QString& theId,
QObject* theParent,
- boost::shared_ptr<ModelAPI_Feature> theFeature)
+ FeaturePtr theFeature)
: PartSet_OperationSketchBase(theId, theParent), mySketch(theFeature), myIsBlockedSelection(false)
{
}
return theOperation->getDescription()->operationId().toStdString() == PartSet_OperationSketch::Type();
}
-std::list<int> PartSet_OperationEditLine::getSelectionModes(boost::shared_ptr<ModelAPI_Feature> theFeature) const
+std::list<int> PartSet_OperationEditLine::getSelectionModes(FeaturePtr theFeature) const
{
return PartSet_OperationSketchBase::getSelectionModes(theFeature);
}
-void PartSet_OperationEditLine::init(boost::shared_ptr<ModelAPI_Feature> theFeature,
+void PartSet_OperationEditLine::init(FeaturePtr theFeature,
const std::list<XGUI_ViewerPrs>& theSelected,
const std::list<XGUI_ViewerPrs>& theHighlighted)
{
myFeatures = theSelected;
}
-boost::shared_ptr<ModelAPI_Feature> PartSet_OperationEditLine::sketch() const
+FeaturePtr PartSet_OperationEditLine::sketch() const
{
return mySketch;
}
{
if (myFeatures.size() == 1)
{
- boost::shared_ptr<ModelAPI_Feature> aFeature;
+ FeaturePtr aFeature;
if (!theHighlighted.empty())
aFeature = theHighlighted.front().feature();
std::list<XGUI_ViewerPrs>::const_iterator anIt = myFeatures.begin(), aLast = myFeatures.end();
for (; anIt != aLast; anIt++) {
- boost::shared_ptr<ModelAPI_Feature> aFeature = (*anIt).feature();
+ FeaturePtr aFeature = (*anIt).feature();
if (!aFeature || aFeature == feature())
continue;
moveLinePoint(aFeature, aDeltaX, aDeltaY, LINE_ATTR_START);
commit();
std::list<XGUI_ViewerPrs>::const_iterator anIt = aFeatures.begin(), aLast = aFeatures.end();
for (; anIt != aLast; anIt++) {
- boost::shared_ptr<ModelAPI_Feature> aFeature = (*anIt).feature();
+ FeaturePtr aFeature = (*anIt).feature();
if (aFeature)
emit featureConstructed(aFeature, FM_Deactivation);
}
}
}
-boost::shared_ptr<ModelAPI_Feature> PartSet_OperationEditLine::createFeature(const bool /*theFlushMessage*/)
+FeaturePtr PartSet_OperationEditLine::createFeature(const bool /*theFlushMessage*/)
{
// do nothing in order to do not create a new feature
- return boost::shared_ptr<ModelAPI_Feature>();
+ return FeaturePtr();
}
-void PartSet_OperationEditLine::moveLinePoint(boost::shared_ptr<ModelAPI_Feature> theFeature,
+void PartSet_OperationEditLine::moveLinePoint(FeaturePtr theFeature,
double theDeltaX, double theDeltaY,
const std::string& theAttribute)
{
{
static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_MOVED);
- std::list<boost::shared_ptr<ModelAPI_Feature> > aFeatures;
+ std::list<FeaturePtr > aFeatures;
std::list<XGUI_ViewerPrs>::const_iterator anIt = myFeatures.begin(), aLast = myFeatures.end();
for (; anIt != aLast; anIt++) {
- boost::shared_ptr<ModelAPI_Feature> aFeature = (*anIt).feature();
+ FeaturePtr aFeature = (*anIt).feature();
if (!aFeature)
continue;