Save tool color attribute to xml.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2015-02-06 20:05:52 +02:00
parent 1563193662
commit 5da451a5ce
11 changed files with 11 additions and 0 deletions

View File

@ -157,6 +157,7 @@ void VToolAlongLine::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj
doc->SetAttribute(tag, AttrMy, qApp->fromPixel(point->my())); doc->SetAttribute(tag, AttrMy, qApp->fromPixel(point->my()));
doc->SetAttribute(tag, AttrTypeLine, typeLine); doc->SetAttribute(tag, AttrTypeLine, typeLine);
doc->SetAttribute(tag, AttrLineColor, lineColor);
doc->SetAttribute(tag, AttrLength, formulaLength); doc->SetAttribute(tag, AttrLength, formulaLength);
doc->SetAttribute(tag, AttrFirstPoint, basePointId); doc->SetAttribute(tag, AttrFirstPoint, basePointId);
doc->SetAttribute(tag, AttrSecondPoint, secondPointId); doc->SetAttribute(tag, AttrSecondPoint, secondPointId);

View File

@ -367,6 +367,7 @@ void VToolArc::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
doc->SetAttribute(tag, AttrRadius, arc->GetFormulaRadius()); doc->SetAttribute(tag, AttrRadius, arc->GetFormulaRadius());
doc->SetAttribute(tag, AttrAngle1, arc->GetFormulaF1()); doc->SetAttribute(tag, AttrAngle1, arc->GetFormulaF1());
doc->SetAttribute(tag, AttrAngle2, arc->GetFormulaF2()); doc->SetAttribute(tag, AttrAngle2, arc->GetFormulaF2());
doc->SetAttribute(tag, AttrColor, lineColor);
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -310,6 +310,7 @@ void VToolBisector::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
doc->SetAttribute(tag, AttrMy, qApp->fromPixel(point->my())); doc->SetAttribute(tag, AttrMy, qApp->fromPixel(point->my()));
doc->SetAttribute(tag, AttrTypeLine, typeLine); doc->SetAttribute(tag, AttrTypeLine, typeLine);
doc->SetAttribute(tag, AttrLineColor, lineColor);
doc->SetAttribute(tag, AttrLength, formulaLength); doc->SetAttribute(tag, AttrLength, formulaLength);
doc->SetAttribute(tag, AttrFirstPoint, firstPointId); doc->SetAttribute(tag, AttrFirstPoint, firstPointId);
doc->SetAttribute(tag, AttrSecondPoint, basePointId); doc->SetAttribute(tag, AttrSecondPoint, basePointId);

View File

@ -304,6 +304,7 @@ void VToolCurveIntersectAxis::SaveOptions(QDomElement &tag, QSharedPointer<VGObj
doc->SetAttribute(tag, AttrMy, qApp->fromPixel(point->my())); doc->SetAttribute(tag, AttrMy, qApp->fromPixel(point->my()));
doc->SetAttribute(tag, AttrTypeLine, typeLine); doc->SetAttribute(tag, AttrTypeLine, typeLine);
doc->SetAttribute(tag, AttrLineColor, lineColor);
doc->SetAttribute(tag, AttrAngle, formulaAngle); doc->SetAttribute(tag, AttrAngle, formulaAngle);
doc->SetAttribute(tag, AttrBasePoint, basePointId); doc->SetAttribute(tag, AttrBasePoint, basePointId);
doc->SetAttribute(tag, AttrCurve, curveId); doc->SetAttribute(tag, AttrCurve, curveId);

View File

@ -258,6 +258,7 @@ void VToolHeight::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
doc->SetAttribute(tag, AttrMy, qApp->fromPixel(point->my())); doc->SetAttribute(tag, AttrMy, qApp->fromPixel(point->my()));
doc->SetAttribute(tag, AttrTypeLine, typeLine); doc->SetAttribute(tag, AttrTypeLine, typeLine);
doc->SetAttribute(tag, AttrLineColor, lineColor);
doc->SetAttribute(tag, AttrBasePoint, basePointId); doc->SetAttribute(tag, AttrBasePoint, basePointId);
doc->SetAttribute(tag, AttrP1Line, p1LineId); doc->SetAttribute(tag, AttrP1Line, p1LineId);
doc->SetAttribute(tag, AttrP2Line, p2LineId); doc->SetAttribute(tag, AttrP2Line, p2LineId);

View File

@ -385,6 +385,7 @@ void VToolLine::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
doc->SetAttribute(tag, AttrFirstPoint, firstPoint); doc->SetAttribute(tag, AttrFirstPoint, firstPoint);
doc->SetAttribute(tag, AttrSecondPoint, secondPoint); doc->SetAttribute(tag, AttrSecondPoint, secondPoint);
doc->SetAttribute(tag, AttrTypeLine, typeLine); doc->SetAttribute(tag, AttrTypeLine, typeLine);
doc->SetAttribute(tag, AttrLineColor, lineColor);
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -322,6 +322,7 @@ void VToolLineIntersectAxis::SaveOptions(QDomElement &tag, QSharedPointer<VGObje
doc->SetAttribute(tag, AttrMy, qApp->fromPixel(point->my())); doc->SetAttribute(tag, AttrMy, qApp->fromPixel(point->my()));
doc->SetAttribute(tag, AttrTypeLine, typeLine); doc->SetAttribute(tag, AttrTypeLine, typeLine);
doc->SetAttribute(tag, AttrLineColor, lineColor);
doc->SetAttribute(tag, AttrAngle, formulaAngle); doc->SetAttribute(tag, AttrAngle, formulaAngle);
doc->SetAttribute(tag, AttrBasePoint, basePointId); doc->SetAttribute(tag, AttrBasePoint, basePointId);
doc->SetAttribute(tag, AttrP1Line, firstPointId); doc->SetAttribute(tag, AttrP1Line, firstPointId);

View File

@ -287,6 +287,7 @@ void VToolNormal::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
doc->SetAttribute(tag, AttrMy, qApp->fromPixel(point->my())); doc->SetAttribute(tag, AttrMy, qApp->fromPixel(point->my()));
doc->SetAttribute(tag, AttrTypeLine, typeLine); doc->SetAttribute(tag, AttrTypeLine, typeLine);
doc->SetAttribute(tag, AttrLineColor, lineColor);
doc->SetAttribute(tag, AttrLength, formulaLength); doc->SetAttribute(tag, AttrLength, formulaLength);
doc->SetAttribute(tag, AttrAngle, angle); doc->SetAttribute(tag, AttrAngle, angle);
doc->SetAttribute(tag, AttrFirstPoint, basePointId); doc->SetAttribute(tag, AttrFirstPoint, basePointId);

View File

@ -314,6 +314,7 @@ void VToolShoulderPoint::SaveOptions(QDomElement &tag, QSharedPointer<VGObject>
doc->SetAttribute(tag, AttrMy, qApp->fromPixel(point->my())); doc->SetAttribute(tag, AttrMy, qApp->fromPixel(point->my()));
doc->SetAttribute(tag, AttrTypeLine, typeLine); doc->SetAttribute(tag, AttrTypeLine, typeLine);
doc->SetAttribute(tag, AttrLineColor, lineColor);
doc->SetAttribute(tag, AttrLength, formulaLength); doc->SetAttribute(tag, AttrLength, formulaLength);
doc->SetAttribute(tag, AttrP1Line, basePointId); doc->SetAttribute(tag, AttrP1Line, basePointId);
doc->SetAttribute(tag, AttrP2Line, p2Line); doc->SetAttribute(tag, AttrP2Line, p2Line);

View File

@ -350,6 +350,7 @@ void VToolSpline::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &obj)
doc->SetAttribute(tag, AttrKAsm1, spl->GetKasm1()); doc->SetAttribute(tag, AttrKAsm1, spl->GetKasm1());
doc->SetAttribute(tag, AttrKAsm2, spl->GetKasm2()); doc->SetAttribute(tag, AttrKAsm2, spl->GetKasm2());
doc->SetAttribute(tag, AttrKCurve, spl->GetKcurve()); doc->SetAttribute(tag, AttrKCurve, spl->GetKcurve());
doc->SetAttribute(tag, AttrColor, lineColor);
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -403,6 +403,7 @@ void VToolSplinePath::SaveOptions(QDomElement &tag, QSharedPointer<VGObject> &ob
doc->SetAttribute(tag, VDomDocument::AttrId, id); doc->SetAttribute(tag, VDomDocument::AttrId, id);
doc->SetAttribute(tag, AttrType, ToolType); doc->SetAttribute(tag, AttrType, ToolType);
doc->SetAttribute(tag, AttrKCurve, splPath->GetKCurve()); doc->SetAttribute(tag, AttrKCurve, splPath->GetKCurve());
doc->SetAttribute(tag, AttrColor, lineColor);
doc->RemoveAllChild(tag); doc->RemoveAllChild(tag);
for (qint32 i = 0; i < splPath->CountPoint(); ++i) for (qint32 i = 0; i < splPath->CountPoint(); ++i)