Setter and getter for options VToolPointOfIntersection.
--HG-- branch : feature
This commit is contained in:
parent
bf79d8f0bd
commit
5e304e8415
|
@ -370,4 +370,3 @@ void VToolPointOfContact::setArcRadius(const VFormula &value)
|
|||
SaveOption(obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user