Setter and getter for options VToolHeight.

--HG--
branch : feature
This commit is contained in:
dismine 2014-09-01 18:27:20 +03:00
parent 109b071134
commit 80d5637bcb
2 changed files with 44 additions and 0 deletions

View File

@ -257,3 +257,40 @@ void VToolHeight::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
doc->SetAttribute(tag, AttrP1Line, p1LineId);
doc->SetAttribute(tag, AttrP2Line, p2LineId);
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolHeight::getP2LineId() const
{
return p2LineId;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolHeight::setP2LineId(const quint32 &value)
{
if (value != NULL_ID)
{
p2LineId = value;
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(id);
SaveOption(obj);
}
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolHeight::getP1LineId() const
{
return p1LineId;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolHeight::setP1LineId(const quint32 &value)
{
if (value != NULL_ID)
{
p1LineId = value;
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(id);
SaveOption(obj);
}
}

View File

@ -52,6 +52,13 @@ public:
static const QString ToolType;
virtual int type() const {return Type;}
enum { Type = UserType + static_cast<int>(Tool::Height)};
quint32 getP1LineId() const;
void setP1LineId(const quint32 &value);
quint32 getP2LineId() const;
void setP2LineId(const quint32 &value);
public slots:
virtual void FullUpdateFromFile();
virtual void ShowContextMenu(QGraphicsSceneContextMenuEvent *event);