Setter and getter for options VToolLineIntersect.

--HG--
branch : feature
This commit is contained in:
dismine 2014-09-01 18:32:28 +03:00
parent 1d33304de4
commit eb6eff3486
2 changed files with 86 additions and 0 deletions

View file

@ -279,3 +279,76 @@ void VToolLineIntersect::SaveOptions(QDomElement &tag, QSharedPointer<VGObject>
doc->SetAttribute(tag, AttrP1Line2, p1Line2);
doc->SetAttribute(tag, AttrP2Line2, p2Line2);
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolLineIntersect::getP2Line2() const
{
return p2Line2;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolLineIntersect::setP2Line2(const quint32 &value)
{
if (value != NULL_ID)
{
p2Line2 = value;
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(id);
SaveOption(obj);
}
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolLineIntersect::getP1Line2() const
{
return p1Line2;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolLineIntersect::setP1Line2(const quint32 &value)
{
if (value != NULL_ID)
{
p1Line2 = value;
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(id);
SaveOption(obj);
}
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolLineIntersect::getP2Line1() const
{
return p2Line1;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolLineIntersect::setP2Line1(const quint32 &value)
{
if (value != NULL_ID)
{
p2Line1 = value;
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(id);
SaveOption(obj);
}
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolLineIntersect::getP1Line1() const
{
return p1Line1;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolLineIntersect::setP1Line1(const quint32 &value)
{
if (value != NULL_ID)
{
p1Line1 = value;
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(id);
SaveOption(obj);
}
}

View file

@ -50,6 +50,19 @@ public:
static const QString ToolType;
virtual int type() const {return Type;}
enum { Type = UserType + static_cast<int>(Tool::LineIntersect)};
quint32 getP1Line1() const;
void setP1Line1(const quint32 &value);
quint32 getP2Line1() const;
void setP2Line1(const quint32 &value);
quint32 getP1Line2() const;
void setP1Line2(const quint32 &value);
quint32 getP2Line2() const;
void setP2Line2(const quint32 &value);
public slots:
virtual void FullUpdateFromFile();
virtual void SetFactor(qreal factor);