From 5da451a5cecb894ebd5fa8a3453f1b2c857c8d94 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 6 Feb 2015 20:05:52 +0200 Subject: [PATCH] Save tool color attribute to xml. --HG-- branch : feature --- src/app/tools/drawTools/vtoolalongline.cpp | 1 + src/app/tools/drawTools/vtoolarc.cpp | 1 + src/app/tools/drawTools/vtoolbisector.cpp | 1 + src/app/tools/drawTools/vtoolcurveintersectaxis.cpp | 1 + src/app/tools/drawTools/vtoolheight.cpp | 1 + src/app/tools/drawTools/vtoolline.cpp | 1 + src/app/tools/drawTools/vtoollineintersectaxis.cpp | 1 + src/app/tools/drawTools/vtoolnormal.cpp | 1 + src/app/tools/drawTools/vtoolshoulderpoint.cpp | 1 + src/app/tools/drawTools/vtoolspline.cpp | 1 + src/app/tools/drawTools/vtoolsplinepath.cpp | 1 + 11 files changed, 11 insertions(+) diff --git a/src/app/tools/drawTools/vtoolalongline.cpp b/src/app/tools/drawTools/vtoolalongline.cpp index 1fea80e95..7a6c3dd4b 100644 --- a/src/app/tools/drawTools/vtoolalongline.cpp +++ b/src/app/tools/drawTools/vtoolalongline.cpp @@ -157,6 +157,7 @@ void VToolAlongLine::SaveOptions(QDomElement &tag, QSharedPointer &obj doc->SetAttribute(tag, AttrMy, qApp->fromPixel(point->my())); doc->SetAttribute(tag, AttrTypeLine, typeLine); + doc->SetAttribute(tag, AttrLineColor, lineColor); doc->SetAttribute(tag, AttrLength, formulaLength); doc->SetAttribute(tag, AttrFirstPoint, basePointId); doc->SetAttribute(tag, AttrSecondPoint, secondPointId); diff --git a/src/app/tools/drawTools/vtoolarc.cpp b/src/app/tools/drawTools/vtoolarc.cpp index 7e3643941..403ffdf11 100644 --- a/src/app/tools/drawTools/vtoolarc.cpp +++ b/src/app/tools/drawTools/vtoolarc.cpp @@ -367,6 +367,7 @@ void VToolArc::SaveOptions(QDomElement &tag, QSharedPointer &obj) doc->SetAttribute(tag, AttrRadius, arc->GetFormulaRadius()); doc->SetAttribute(tag, AttrAngle1, arc->GetFormulaF1()); doc->SetAttribute(tag, AttrAngle2, arc->GetFormulaF2()); + doc->SetAttribute(tag, AttrColor, lineColor); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/tools/drawTools/vtoolbisector.cpp b/src/app/tools/drawTools/vtoolbisector.cpp index eee05465e..90d8e6f52 100644 --- a/src/app/tools/drawTools/vtoolbisector.cpp +++ b/src/app/tools/drawTools/vtoolbisector.cpp @@ -310,6 +310,7 @@ void VToolBisector::SaveOptions(QDomElement &tag, QSharedPointer &obj) doc->SetAttribute(tag, AttrMy, qApp->fromPixel(point->my())); doc->SetAttribute(tag, AttrTypeLine, typeLine); + doc->SetAttribute(tag, AttrLineColor, lineColor); doc->SetAttribute(tag, AttrLength, formulaLength); doc->SetAttribute(tag, AttrFirstPoint, firstPointId); doc->SetAttribute(tag, AttrSecondPoint, basePointId); diff --git a/src/app/tools/drawTools/vtoolcurveintersectaxis.cpp b/src/app/tools/drawTools/vtoolcurveintersectaxis.cpp index bfb0ccc19..0c45d57c0 100644 --- a/src/app/tools/drawTools/vtoolcurveintersectaxis.cpp +++ b/src/app/tools/drawTools/vtoolcurveintersectaxis.cpp @@ -304,6 +304,7 @@ void VToolCurveIntersectAxis::SaveOptions(QDomElement &tag, QSharedPointerSetAttribute(tag, AttrMy, qApp->fromPixel(point->my())); doc->SetAttribute(tag, AttrTypeLine, typeLine); + doc->SetAttribute(tag, AttrLineColor, lineColor); doc->SetAttribute(tag, AttrAngle, formulaAngle); doc->SetAttribute(tag, AttrBasePoint, basePointId); doc->SetAttribute(tag, AttrCurve, curveId); diff --git a/src/app/tools/drawTools/vtoolheight.cpp b/src/app/tools/drawTools/vtoolheight.cpp index 841fd3d6b..7598b8aa0 100644 --- a/src/app/tools/drawTools/vtoolheight.cpp +++ b/src/app/tools/drawTools/vtoolheight.cpp @@ -258,6 +258,7 @@ void VToolHeight::SaveOptions(QDomElement &tag, QSharedPointer &obj) doc->SetAttribute(tag, AttrMy, qApp->fromPixel(point->my())); doc->SetAttribute(tag, AttrTypeLine, typeLine); + doc->SetAttribute(tag, AttrLineColor, lineColor); doc->SetAttribute(tag, AttrBasePoint, basePointId); doc->SetAttribute(tag, AttrP1Line, p1LineId); doc->SetAttribute(tag, AttrP2Line, p2LineId); diff --git a/src/app/tools/drawTools/vtoolline.cpp b/src/app/tools/drawTools/vtoolline.cpp index 4bc7d1f95..46104b05a 100644 --- a/src/app/tools/drawTools/vtoolline.cpp +++ b/src/app/tools/drawTools/vtoolline.cpp @@ -385,6 +385,7 @@ void VToolLine::SaveOptions(QDomElement &tag, QSharedPointer &obj) doc->SetAttribute(tag, AttrFirstPoint, firstPoint); doc->SetAttribute(tag, AttrSecondPoint, secondPoint); doc->SetAttribute(tag, AttrTypeLine, typeLine); + doc->SetAttribute(tag, AttrLineColor, lineColor); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/tools/drawTools/vtoollineintersectaxis.cpp b/src/app/tools/drawTools/vtoollineintersectaxis.cpp index 7393426ad..cba8df816 100644 --- a/src/app/tools/drawTools/vtoollineintersectaxis.cpp +++ b/src/app/tools/drawTools/vtoollineintersectaxis.cpp @@ -322,6 +322,7 @@ void VToolLineIntersectAxis::SaveOptions(QDomElement &tag, QSharedPointerSetAttribute(tag, AttrMy, qApp->fromPixel(point->my())); doc->SetAttribute(tag, AttrTypeLine, typeLine); + doc->SetAttribute(tag, AttrLineColor, lineColor); doc->SetAttribute(tag, AttrAngle, formulaAngle); doc->SetAttribute(tag, AttrBasePoint, basePointId); doc->SetAttribute(tag, AttrP1Line, firstPointId); diff --git a/src/app/tools/drawTools/vtoolnormal.cpp b/src/app/tools/drawTools/vtoolnormal.cpp index 8e051143f..253482fb8 100644 --- a/src/app/tools/drawTools/vtoolnormal.cpp +++ b/src/app/tools/drawTools/vtoolnormal.cpp @@ -287,6 +287,7 @@ void VToolNormal::SaveOptions(QDomElement &tag, QSharedPointer &obj) doc->SetAttribute(tag, AttrMy, qApp->fromPixel(point->my())); doc->SetAttribute(tag, AttrTypeLine, typeLine); + doc->SetAttribute(tag, AttrLineColor, lineColor); doc->SetAttribute(tag, AttrLength, formulaLength); doc->SetAttribute(tag, AttrAngle, angle); doc->SetAttribute(tag, AttrFirstPoint, basePointId); diff --git a/src/app/tools/drawTools/vtoolshoulderpoint.cpp b/src/app/tools/drawTools/vtoolshoulderpoint.cpp index 7c425afe9..7f5c09764 100644 --- a/src/app/tools/drawTools/vtoolshoulderpoint.cpp +++ b/src/app/tools/drawTools/vtoolshoulderpoint.cpp @@ -314,6 +314,7 @@ void VToolShoulderPoint::SaveOptions(QDomElement &tag, QSharedPointer doc->SetAttribute(tag, AttrMy, qApp->fromPixel(point->my())); doc->SetAttribute(tag, AttrTypeLine, typeLine); + doc->SetAttribute(tag, AttrLineColor, lineColor); doc->SetAttribute(tag, AttrLength, formulaLength); doc->SetAttribute(tag, AttrP1Line, basePointId); doc->SetAttribute(tag, AttrP2Line, p2Line); diff --git a/src/app/tools/drawTools/vtoolspline.cpp b/src/app/tools/drawTools/vtoolspline.cpp index 1c80cdfd2..70e951d32 100644 --- a/src/app/tools/drawTools/vtoolspline.cpp +++ b/src/app/tools/drawTools/vtoolspline.cpp @@ -350,6 +350,7 @@ void VToolSpline::SaveOptions(QDomElement &tag, QSharedPointer &obj) doc->SetAttribute(tag, AttrKAsm1, spl->GetKasm1()); doc->SetAttribute(tag, AttrKAsm2, spl->GetKasm2()); doc->SetAttribute(tag, AttrKCurve, spl->GetKcurve()); + doc->SetAttribute(tag, AttrColor, lineColor); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/tools/drawTools/vtoolsplinepath.cpp b/src/app/tools/drawTools/vtoolsplinepath.cpp index 6701fe483..a45f68163 100644 --- a/src/app/tools/drawTools/vtoolsplinepath.cpp +++ b/src/app/tools/drawTools/vtoolsplinepath.cpp @@ -403,6 +403,7 @@ void VToolSplinePath::SaveOptions(QDomElement &tag, QSharedPointer &ob doc->SetAttribute(tag, VDomDocument::AttrId, id); doc->SetAttribute(tag, AttrType, ToolType); doc->SetAttribute(tag, AttrKCurve, splPath->GetKCurve()); + doc->SetAttribute(tag, AttrColor, lineColor); doc->RemoveAllChild(tag); for (qint32 i = 0; i < splPath->CountPoint(); ++i)