Setter and getter for options VToolShoulderPoint.

--HG--
branch : feature
This commit is contained in:
dismine 2014-09-01 19:25:04 +03:00
parent 5e304e8415
commit 754901bff1
2 changed files with 44 additions and 0 deletions

View File

@ -313,3 +313,40 @@ void VToolShoulderPoint::SaveOptions(QDomElement &tag, QSharedPointer<VGObject>
doc->SetAttribute(tag, AttrP2Line, p2Line); doc->SetAttribute(tag, AttrP2Line, p2Line);
doc->SetAttribute(tag, AttrPShoulder, pShoulder); doc->SetAttribute(tag, AttrPShoulder, pShoulder);
} }
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolShoulderPoint::getPShoulder() const
{
return pShoulder;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolShoulderPoint::setPShoulder(const quint32 &value)
{
if (value != NULL_ID)
{
pShoulder = value;
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(id);
SaveOption(obj);
}
}
//---------------------------------------------------------------------------------------------------------------------
quint32 VToolShoulderPoint::getP2Line() const
{
return p2Line;
}
//---------------------------------------------------------------------------------------------------------------------
void VToolShoulderPoint::setP2Line(const quint32 &value)
{
if (value != NULL_ID)
{
p2Line = value;
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(id);
SaveOption(obj);
}
}

View File

@ -53,6 +53,13 @@ public:
static const QString ToolType; static const QString ToolType;
virtual int type() const {return Type;} virtual int type() const {return Type;}
enum { Type = UserType + static_cast<int>(Tool::ShoulderPoint) }; enum { Type = UserType + static_cast<int>(Tool::ShoulderPoint) };
quint32 getP2Line() const;
void setP2Line(const quint32 &value);
quint32 getPShoulder() const;
void setPShoulder(const quint32 &value);
public slots: public slots:
virtual void FullUpdateFromFile(); virtual void FullUpdateFromFile();
virtual void SetFactor(qreal factor); virtual void SetFactor(qreal factor);