Setter and getter for options VToolNormal.
--HG-- branch : feature
This commit is contained in:
parent
eb6eff3486
commit
4a6a3f3cc9
|
@ -108,6 +108,20 @@ void VToolLinePoint::SetFactor(qreal factor)
|
|||
RefreshGeometry();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
qreal VToolLinePoint::getAngle() const
|
||||
{
|
||||
return angle;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolLinePoint::setAngle(const qreal &value)
|
||||
{
|
||||
angle = value;
|
||||
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(id);
|
||||
SaveOption(obj);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
quint32 VToolLinePoint::getBasePointId() const
|
||||
{
|
||||
|
|
|
@ -49,6 +49,9 @@ public:
|
|||
quint32 getBasePointId() const;
|
||||
void setBasePointId(const quint32 &value);
|
||||
|
||||
qreal getAngle() const;
|
||||
void setAngle(const qreal &value);
|
||||
|
||||
public slots:
|
||||
virtual void ChangedActivDraw(const QString &newName);
|
||||
virtual void SetFactor(qreal factor);
|
||||
|
|
|
@ -287,3 +287,22 @@ void VToolNormal::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
|
|||
doc->SetAttribute(tag, AttrFirstPoint, basePointId);
|
||||
doc->SetAttribute(tag, AttrSecondPoint, secondPointId);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
quint32 VToolNormal::getSecondPointId() const
|
||||
{
|
||||
return secondPointId;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolNormal::setSecondPointId(const quint32 &value)
|
||||
{
|
||||
if (value != NULL_ID)
|
||||
{
|
||||
secondPointId = value;
|
||||
|
||||
QSharedPointer<VGObject> obj = VAbstractTool::data.GetGObject(id);
|
||||
SaveOption(obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -52,6 +52,10 @@ public:
|
|||
static const QString ToolType;
|
||||
virtual int type() const {return Type;}
|
||||
enum { Type = UserType + static_cast<int>(Tool::Normal)};
|
||||
|
||||
quint32 getSecondPointId() const;
|
||||
void setSecondPointId(const quint32 &value);
|
||||
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile();
|
||||
virtual void SetFactor(qreal factor);
|
||||
|
|
Loading…
Reference in New Issue
Block a user