Save color from tool option dialog to xml.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2015-02-06 19:50:33 +02:00
parent f687105905
commit 1563193662
11 changed files with 11 additions and 0 deletions

View File

@ -138,6 +138,7 @@ void VToolAlongLine::SaveDialog(QDomElement &domElement)
SCASSERT(dialogTool != nullptr); SCASSERT(dialogTool != nullptr);
doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName());
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine());
doc->SetAttribute(domElement, AttrLineColor, dialogTool->GetLineColor());
doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula()); doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula());
doc->SetAttribute(domElement, AttrFirstPoint, dialogTool->GetFirstPointId()); doc->SetAttribute(domElement, AttrFirstPoint, dialogTool->GetFirstPointId());
doc->SetAttribute(domElement, AttrSecondPoint, dialogTool->GetSecondPointId()); doc->SetAttribute(domElement, AttrSecondPoint, dialogTool->GetSecondPointId());

View File

@ -352,6 +352,7 @@ void VToolArc::SaveDialog(QDomElement &domElement)
doc->SetAttribute(domElement, AttrRadius, dialogTool->GetRadius()); doc->SetAttribute(domElement, AttrRadius, dialogTool->GetRadius());
doc->SetAttribute(domElement, AttrAngle1, dialogTool->GetF1()); doc->SetAttribute(domElement, AttrAngle1, dialogTool->GetF1());
doc->SetAttribute(domElement, AttrAngle2, dialogTool->GetF2()); doc->SetAttribute(domElement, AttrAngle2, dialogTool->GetF2());
doc->SetAttribute(domElement, AttrColor, dialogTool->GetColor());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -290,6 +290,7 @@ void VToolBisector::SaveDialog(QDomElement &domElement)
SCASSERT(dialogTool != nullptr); SCASSERT(dialogTool != nullptr);
doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName());
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine());
doc->SetAttribute(domElement, AttrLineColor, dialogTool->GetLineColor());
doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula()); doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula());
doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->GetFirstPointId())); doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->GetFirstPointId()));
doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->GetSecondPointId())); doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->GetSecondPointId()));

View File

@ -285,6 +285,7 @@ void VToolCurveIntersectAxis::SaveDialog(QDomElement &domElement)
SCASSERT(dialogTool != nullptr); SCASSERT(dialogTool != nullptr);
doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName());
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine());
doc->SetAttribute(domElement, AttrLineColor, dialogTool->GetLineColor());
doc->SetAttribute(domElement, AttrAngle, dialogTool->GetAngle()); doc->SetAttribute(domElement, AttrAngle, dialogTool->GetAngle());
doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->GetBasePointId())); doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->GetBasePointId()));
doc->SetAttribute(domElement, AttrCurve, QString().setNum(dialogTool->getCurveId())); doc->SetAttribute(domElement, AttrCurve, QString().setNum(dialogTool->getCurveId()));

View File

@ -239,6 +239,7 @@ void VToolHeight::SaveDialog(QDomElement &domElement)
SCASSERT(dialogTool != nullptr); SCASSERT(dialogTool != nullptr);
doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName());
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine());
doc->SetAttribute(domElement, AttrLineColor, dialogTool->GetLineColor());
doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->GetBasePointId())); doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->GetBasePointId()));
doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->GetP1LineId())); doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->GetP1LineId()));
doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->GetP2LineId())); doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->GetP2LineId()));

View File

@ -373,6 +373,7 @@ void VToolLine::SaveDialog(QDomElement &domElement)
doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->GetFirstPoint())); doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->GetFirstPoint()));
doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->GetSecondPoint())); doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->GetSecondPoint()));
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine());
doc->SetAttribute(domElement, AttrLineColor, dialogTool->GetLineColor());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -302,6 +302,7 @@ void VToolLineIntersectAxis::SaveDialog(QDomElement &domElement)
SCASSERT(dialogTool != nullptr); SCASSERT(dialogTool != nullptr);
doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName());
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine());
doc->SetAttribute(domElement, AttrLineColor, dialogTool->GetLineColor());
doc->SetAttribute(domElement, AttrAngle, dialogTool->GetAngle()); doc->SetAttribute(domElement, AttrAngle, dialogTool->GetAngle());
doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->GetBasePointId())); doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->GetBasePointId()));
doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->GetFirstPointId())); doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->GetFirstPointId()));

View File

@ -267,6 +267,7 @@ void VToolNormal::SaveDialog(QDomElement &domElement)
SCASSERT(dialogTool != nullptr); SCASSERT(dialogTool != nullptr);
doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName());
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine());
doc->SetAttribute(domElement, AttrLineColor, dialogTool->GetLineColor());
doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula()); doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula());
doc->SetAttribute(domElement, AttrAngle, QString().setNum(dialogTool->GetAngle())); doc->SetAttribute(domElement, AttrAngle, QString().setNum(dialogTool->GetAngle()));
doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->GetFirstPointId())); doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->GetFirstPointId()));

View File

@ -294,6 +294,7 @@ void VToolShoulderPoint::SaveDialog(QDomElement &domElement)
SCASSERT(dialogTool != nullptr); SCASSERT(dialogTool != nullptr);
doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName());
doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine());
doc->SetAttribute(domElement, AttrLineColor, dialogTool->GetLineColor());
doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula()); doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula());
doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->GetP1Line())); doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->GetP1Line()));
doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->GetP2Line())); doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->GetP2Line()));

View File

@ -332,6 +332,7 @@ void VToolSpline::SaveDialog(QDomElement &domElement)
doc->SetAttribute(domElement, AttrKAsm1, spl.GetKasm1()); doc->SetAttribute(domElement, AttrKAsm1, spl.GetKasm1());
doc->SetAttribute(domElement, AttrKAsm2, spl.GetKasm2()); doc->SetAttribute(domElement, AttrKAsm2, spl.GetKasm2());
doc->SetAttribute(domElement, AttrKCurve, spl.GetKcurve()); doc->SetAttribute(domElement, AttrKCurve, spl.GetKcurve());
doc->SetAttribute(domElement, AttrColor, dialogTool->GetColor());
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -390,6 +390,7 @@ void VToolSplinePath::SaveDialog(QDomElement &domElement)
VSplinePath splPath = dialogTool->GetPath(); VSplinePath splPath = dialogTool->GetPath();
RefreshSplinePath(splPath); RefreshSplinePath(splPath);
doc->SetAttribute(domElement, AttrKCurve, QString().setNum(splPath.GetKCurve())); doc->SetAttribute(domElement, AttrKCurve, QString().setNum(splPath.GetKCurve()));
doc->SetAttribute(domElement, AttrColor, dialogTool->GetColor());
UpdatePathPoint(doc, domElement, splPath); UpdatePathPoint(doc, domElement, splPath);
} }