From 1563193662888e5d097334a7cec6f2aaca9a452d Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 6 Feb 2015 19:50:33 +0200 Subject: [PATCH] Save color from tool option dialog 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 27c624a55..1fea80e95 100644 --- a/src/app/tools/drawTools/vtoolalongline.cpp +++ b/src/app/tools/drawTools/vtoolalongline.cpp @@ -138,6 +138,7 @@ void VToolAlongLine::SaveDialog(QDomElement &domElement) SCASSERT(dialogTool != nullptr); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); + doc->SetAttribute(domElement, AttrLineColor, dialogTool->GetLineColor()); doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula()); doc->SetAttribute(domElement, AttrFirstPoint, dialogTool->GetFirstPointId()); doc->SetAttribute(domElement, AttrSecondPoint, dialogTool->GetSecondPointId()); diff --git a/src/app/tools/drawTools/vtoolarc.cpp b/src/app/tools/drawTools/vtoolarc.cpp index e4509da86..7e3643941 100644 --- a/src/app/tools/drawTools/vtoolarc.cpp +++ b/src/app/tools/drawTools/vtoolarc.cpp @@ -352,6 +352,7 @@ void VToolArc::SaveDialog(QDomElement &domElement) doc->SetAttribute(domElement, AttrRadius, dialogTool->GetRadius()); doc->SetAttribute(domElement, AttrAngle1, dialogTool->GetF1()); doc->SetAttribute(domElement, AttrAngle2, dialogTool->GetF2()); + doc->SetAttribute(domElement, AttrColor, dialogTool->GetColor()); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/tools/drawTools/vtoolbisector.cpp b/src/app/tools/drawTools/vtoolbisector.cpp index 580a84872..eee05465e 100644 --- a/src/app/tools/drawTools/vtoolbisector.cpp +++ b/src/app/tools/drawTools/vtoolbisector.cpp @@ -290,6 +290,7 @@ void VToolBisector::SaveDialog(QDomElement &domElement) SCASSERT(dialogTool != nullptr); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); + doc->SetAttribute(domElement, AttrLineColor, dialogTool->GetLineColor()); doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula()); doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->GetFirstPointId())); doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->GetSecondPointId())); diff --git a/src/app/tools/drawTools/vtoolcurveintersectaxis.cpp b/src/app/tools/drawTools/vtoolcurveintersectaxis.cpp index e2953eaf5..bfb0ccc19 100644 --- a/src/app/tools/drawTools/vtoolcurveintersectaxis.cpp +++ b/src/app/tools/drawTools/vtoolcurveintersectaxis.cpp @@ -285,6 +285,7 @@ void VToolCurveIntersectAxis::SaveDialog(QDomElement &domElement) SCASSERT(dialogTool != nullptr); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); + doc->SetAttribute(domElement, AttrLineColor, dialogTool->GetLineColor()); doc->SetAttribute(domElement, AttrAngle, dialogTool->GetAngle()); doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->GetBasePointId())); doc->SetAttribute(domElement, AttrCurve, QString().setNum(dialogTool->getCurveId())); diff --git a/src/app/tools/drawTools/vtoolheight.cpp b/src/app/tools/drawTools/vtoolheight.cpp index 29742d1f3..841fd3d6b 100644 --- a/src/app/tools/drawTools/vtoolheight.cpp +++ b/src/app/tools/drawTools/vtoolheight.cpp @@ -239,6 +239,7 @@ void VToolHeight::SaveDialog(QDomElement &domElement) SCASSERT(dialogTool != nullptr); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); + doc->SetAttribute(domElement, AttrLineColor, dialogTool->GetLineColor()); doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->GetBasePointId())); doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->GetP1LineId())); doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->GetP2LineId())); diff --git a/src/app/tools/drawTools/vtoolline.cpp b/src/app/tools/drawTools/vtoolline.cpp index 17f89f14b..4bc7d1f95 100644 --- a/src/app/tools/drawTools/vtoolline.cpp +++ b/src/app/tools/drawTools/vtoolline.cpp @@ -373,6 +373,7 @@ void VToolLine::SaveDialog(QDomElement &domElement) doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->GetFirstPoint())); doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->GetSecondPoint())); doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); + doc->SetAttribute(domElement, AttrLineColor, dialogTool->GetLineColor()); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/tools/drawTools/vtoollineintersectaxis.cpp b/src/app/tools/drawTools/vtoollineintersectaxis.cpp index 6d6d37c69..7393426ad 100644 --- a/src/app/tools/drawTools/vtoollineintersectaxis.cpp +++ b/src/app/tools/drawTools/vtoollineintersectaxis.cpp @@ -302,6 +302,7 @@ void VToolLineIntersectAxis::SaveDialog(QDomElement &domElement) SCASSERT(dialogTool != nullptr); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); + doc->SetAttribute(domElement, AttrLineColor, dialogTool->GetLineColor()); doc->SetAttribute(domElement, AttrAngle, dialogTool->GetAngle()); doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->GetBasePointId())); doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->GetFirstPointId())); diff --git a/src/app/tools/drawTools/vtoolnormal.cpp b/src/app/tools/drawTools/vtoolnormal.cpp index 74aee8e78..8e051143f 100644 --- a/src/app/tools/drawTools/vtoolnormal.cpp +++ b/src/app/tools/drawTools/vtoolnormal.cpp @@ -267,6 +267,7 @@ void VToolNormal::SaveDialog(QDomElement &domElement) SCASSERT(dialogTool != nullptr); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); + doc->SetAttribute(domElement, AttrLineColor, dialogTool->GetLineColor()); doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula()); doc->SetAttribute(domElement, AttrAngle, QString().setNum(dialogTool->GetAngle())); doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->GetFirstPointId())); diff --git a/src/app/tools/drawTools/vtoolshoulderpoint.cpp b/src/app/tools/drawTools/vtoolshoulderpoint.cpp index 9c926387f..7c425afe9 100644 --- a/src/app/tools/drawTools/vtoolshoulderpoint.cpp +++ b/src/app/tools/drawTools/vtoolshoulderpoint.cpp @@ -294,6 +294,7 @@ void VToolShoulderPoint::SaveDialog(QDomElement &domElement) SCASSERT(dialogTool != nullptr); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); + doc->SetAttribute(domElement, AttrLineColor, dialogTool->GetLineColor()); doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula()); doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->GetP1Line())); doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->GetP2Line())); diff --git a/src/app/tools/drawTools/vtoolspline.cpp b/src/app/tools/drawTools/vtoolspline.cpp index 5a28e58dc..1c80cdfd2 100644 --- a/src/app/tools/drawTools/vtoolspline.cpp +++ b/src/app/tools/drawTools/vtoolspline.cpp @@ -332,6 +332,7 @@ void VToolSpline::SaveDialog(QDomElement &domElement) doc->SetAttribute(domElement, AttrKAsm1, spl.GetKasm1()); doc->SetAttribute(domElement, AttrKAsm2, spl.GetKasm2()); doc->SetAttribute(domElement, AttrKCurve, spl.GetKcurve()); + doc->SetAttribute(domElement, AttrColor, dialogTool->GetColor()); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/tools/drawTools/vtoolsplinepath.cpp b/src/app/tools/drawTools/vtoolsplinepath.cpp index fad8c6745..6701fe483 100644 --- a/src/app/tools/drawTools/vtoolsplinepath.cpp +++ b/src/app/tools/drawTools/vtoolsplinepath.cpp @@ -390,6 +390,7 @@ void VToolSplinePath::SaveDialog(QDomElement &domElement) VSplinePath splPath = dialogTool->GetPath(); RefreshSplinePath(splPath); doc->SetAttribute(domElement, AttrKCurve, QString().setNum(splPath.GetKCurve())); + doc->SetAttribute(domElement, AttrColor, dialogTool->GetColor()); UpdatePathPoint(doc, domElement, splPath); }