diff --git a/src/app/tools/drawTools/vdrawtool.cpp b/src/app/tools/drawTools/vdrawtool.cpp index 02076e6a3..a510b940e 100644 --- a/src/app/tools/drawTools/vdrawtool.cpp +++ b/src/app/tools/drawTools/vdrawtool.cpp @@ -47,7 +47,7 @@ qreal VDrawTool::factor = 1; */ VDrawTool::VDrawTool(VPattern *doc, VContainer *data, quint32 id, QObject *parent) :VAbstractTool(doc, data, id, parent), ignoreFullUpdate(false), nameActivDraw(doc->GetNameActivPP()), - dialog(nullptr), typeLine(TypeLineLine) + dialog(nullptr), typeLine(TypeLineLine), lineColor(ColorBlack) { connect(this->doc, &VPattern::ChangedActivPP, this, &VDrawTool::ChangedActivDraw); connect(this->doc, &VPattern::ChangedNameDraw, this, &VDrawTool::ChangedNameDraw); @@ -300,3 +300,19 @@ void VDrawTool::SetTypeLine(const QString &value) QSharedPointer obj = VAbstractTool::data.GetGObject(id); SaveOption(obj); } + +//--------------------------------------------------------------------------------------------------------------------- +QString VDrawTool::GetLineColor() const +{ + return lineColor; +} + + +//--------------------------------------------------------------------------------------------------------------------- +void VDrawTool::SetLineColor(const QString &value) +{ + lineColor = value; + + QSharedPointer obj = VAbstractTool::data.GetGObject(id); + SaveOption(obj); +} diff --git a/src/app/tools/drawTools/vdrawtool.h b/src/app/tools/drawTools/vdrawtool.h index 85f2662bc..0f7576568 100644 --- a/src/app/tools/drawTools/vdrawtool.h +++ b/src/app/tools/drawTools/vdrawtool.h @@ -58,6 +58,10 @@ public: QString getLineType() const; virtual void SetTypeLine(const QString &value); + + QString GetLineColor() const; + void SetLineColor(const QString &value); + public slots: virtual void ShowTool(quint32 id, Qt::GlobalColor color, bool enable); virtual void ChangedActivDraw(const QString &newName); @@ -79,6 +83,9 @@ protected: /** @brief typeLine line type. */ QString typeLine; + /** @brief lineColor color line or curve, but not a point. */ + QString lineColor; + void AddToCalculation(const QDomElement &domElement); /** @brief SaveDialog save options into file after change in dialog. */