Setter and getter for options VToolPointOfIntersection.

--HG--
branch : feature
This commit is contained in:
dismine 2014-09-01 19:21:42 +03:00
parent bf79d8f0bd
commit 5e304e8415
3 changed files with 43 additions and 1 deletions

View File

@ -370,4 +370,3 @@ void VToolPointOfContact::setArcRadius(const VFormula &value)
SaveOption(obj);
}
}

View File

@ -232,3 +232,39 @@ void VToolPointOfIntersection::SaveOptions(QDomElement &tag, QSharedPointer<VGOb
doc->SetAttribute(tag, AttrFirstPoint, firstPointId);
doc->SetAttribute(tag, AttrSecondPoint, secondPointId);
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolPointOfIntersection::getSecondPointId() const
{
return secondPointId;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolPointOfIntersection::setSecondPointId(const quint32 &value)
{
if (value != NULL_ID)
{
secondPointId = value;
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(id);
SaveOption(obj);
}
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolPointOfIntersection::getFirstPointId() const
{
return firstPointId;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolPointOfIntersection::setFirstPointId(const quint32 &value)
{
if (value != NULL_ID)
{
firstPointId = value;
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(id);
SaveOption(obj);
}
}

View File

@ -51,6 +51,13 @@ public:
static const QString ToolType;
virtual int type() const {return Type;}
enum { Type = UserType + static_cast<int>(Tool::PointOfIntersection) };
quint32 getFirstPointId() const;
void setFirstPointId(const quint32 &value);
quint32 getSecondPointId() const;
void setSecondPointId(const quint32 &value);
public slots:
virtual void FullUpdateFromFile();
virtual void ShowContextMenu(QGraphicsSceneContextMenuEvent *event);