Setter and getter for options VToolLine.

--HG--
branch : feature
This commit is contained in:
dismine 2014-09-01 18:29:43 +03:00
parent 80d5637bcb
commit 1d33304de4
2 changed files with 42 additions and 0 deletions

View File

@ -383,6 +383,42 @@ void VToolLine::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
doc->SetAttribute(tag, AttrTypeLine, typeLine);
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolLine::getSecondPoint() const
{
return secondPoint;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolLine::setSecondPoint(const quint32 &value)
{
if (value != NULL_ID)
{
secondPoint = value;
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(id);
SaveOption(obj);
}
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolLine::getFirstPoint() const
{
return firstPoint;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolLine::setFirstPoint(const quint32 &value)
{
if (value != NULL_ID)
{
firstPoint = value;
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(id);
SaveOption(obj);
}
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief RefreshGeometry refresh item on scene.

View File

@ -51,6 +51,12 @@ public:
virtual int type() const {return Type;}
enum { Type = UserType + static_cast<int>(Tool::Line)};
virtual QString getTagName() const;
quint32 getFirstPoint() const;
void setFirstPoint(const quint32 &value);
quint32 getSecondPoint() const;
void setSecondPoint(const quint32 &value);
public slots:
virtual void FullUpdateFromFile();
virtual void ChangedActivDraw(const QString &newName);