Schema fixes.
--HG-- branch : feature
This commit is contained in:
parent
34de600fed
commit
d269e45858
|
@ -9,12 +9,12 @@
|
|||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="increment" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="ksize" type="xs:double"></xs:attribute>
|
||||
<xs:attribute name="id" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="description" type="xs:string"></xs:attribute>
|
||||
<xs:attribute name="kgrowth" type="xs:double"></xs:attribute>
|
||||
<xs:attribute name="name" type="xs:string"></xs:attribute>
|
||||
<xs:attribute name="base" type="xs:double"></xs:attribute>
|
||||
<xs:attribute name="ksize" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="id" type="xs:long" use="required"></xs:attribute>
|
||||
<xs:attribute name="description" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="kgrowth" type="xs:double" use="required"></xs:attribute>
|
||||
<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
|
||||
<xs:attribute name="base" type="xs:double" use="required"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
|
@ -26,9 +26,10 @@
|
|||
<xs:element name="calculation" minOccurs="1" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="point" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="id" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="id" type="xs:long" use="required"></xs:attribute>
|
||||
<xs:attribute name="x" type="xs:double"></xs:attribute>
|
||||
<xs:attribute name="y" type="xs:double"></xs:attribute>
|
||||
<xs:attribute name="mx" type="xs:double"></xs:attribute>
|
||||
|
@ -37,6 +38,7 @@
|
|||
<xs:attribute name="name" type="xs:string"></xs:attribute>
|
||||
<xs:attribute name="firstPoint" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="secondPoint" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="thirdPoint" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="basePoint" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="pShoulder" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="p1Line" type="xs:long"></xs:attribute>
|
||||
|
@ -45,11 +47,21 @@
|
|||
<xs:attribute name="angle" type="xs:double"></xs:attribute>
|
||||
<xs:attribute name="typeLine" type="xs:string"></xs:attribute>
|
||||
<xs:attribute name="splinePath" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="spline" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="p1Line1" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="p1Line2" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="p2Line1" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="p2Line2" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="center" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="radius" type="xs:string"></xs:attribute>
|
||||
<xs:attribute name="axisP1" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="axisP2" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="arc" type="xs:long"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="line" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="id" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="id" type="xs:long" use="required"></xs:attribute>
|
||||
<xs:attribute name="firstPoint" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="secondPoint" type="xs:long"></xs:attribute>
|
||||
</xs:complexType>
|
||||
|
@ -57,7 +69,7 @@
|
|||
<xs:element name="arc" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="angle1" type="xs:string"></xs:attribute>
|
||||
<xs:attribute name="id" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="id" type="xs:long" use="required"></xs:attribute>
|
||||
<xs:attribute name="angle2" type="xs:string"></xs:attribute>
|
||||
<xs:attribute name="radius" type="xs:string"></xs:attribute>
|
||||
<xs:attribute name="center" type="xs:long"></xs:attribute>
|
||||
|
@ -67,7 +79,7 @@
|
|||
<xs:element name="spline" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="pathPoint">
|
||||
<xs:element name="pathPoint" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="kAsm2" type="xs:string"></xs:attribute>
|
||||
<xs:attribute name="pSpline" type="xs:long"></xs:attribute>
|
||||
|
@ -76,7 +88,7 @@
|
|||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="id" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="id" type="xs:long" use="required"></xs:attribute>
|
||||
<xs:attribute name="kCurve" type="xs:double"></xs:attribute>
|
||||
<xs:attribute name="type" type="xs:string"></xs:attribute>
|
||||
<xs:attribute name="kAsm1" type="xs:double"></xs:attribute>
|
||||
|
@ -87,36 +99,41 @@
|
|||
<xs:attribute name="point4" type="xs:long"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:choice>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="modeling" minOccurs="1" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="point" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="id" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="id" type="xs:long" use="required"></xs:attribute>
|
||||
<xs:attribute name="idObject" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="mx" type="xs:string"></xs:attribute>
|
||||
<xs:attribute name="typeObject" type="xs:string"></xs:attribute>
|
||||
<xs:attribute name="my" type="xs:string"></xs:attribute>
|
||||
<xs:attribute name="type" type="xs:string"></xs:attribute>
|
||||
<xs:attribute name="idTool" type="xs:long"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="arc" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="id" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="id" type="xs:long" use="required"></xs:attribute>
|
||||
<xs:attribute name="idObject" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="typeObject" type="xs:string"></xs:attribute>
|
||||
<xs:attribute name="type" type="xs:string"></xs:attribute>
|
||||
<xs:attribute name="idTool" type="xs:long"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="spline" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="id" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="id" type="xs:long" use="required"></xs:attribute>
|
||||
<xs:attribute name="idObject" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="typeObject" type="xs:string"></xs:attribute>
|
||||
<xs:attribute name="type" type="xs:string"></xs:attribute>
|
||||
<xs:attribute name="idTool" type="xs:long"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="tools" minOccurs="0" maxOccurs="unbounded">
|
||||
|
@ -138,12 +155,13 @@
|
|||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="id" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="id" type="xs:long" use="required"></xs:attribute>
|
||||
<xs:attribute name="type" type="xs:string"></xs:attribute>
|
||||
<xs:attribute name="indexD1" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="indexD2" type="xs:long"></xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:choice>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
@ -163,7 +181,7 @@
|
|||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="id" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="id" type="xs:long" use="required"></xs:attribute>
|
||||
<xs:attribute name="supplement" type="xs:long"></xs:attribute>
|
||||
<xs:attribute name="mx" type="xs:double"></xs:attribute>
|
||||
<xs:attribute name="my" type="xs:double"></xs:attribute>
|
||||
|
|
|
@ -442,7 +442,7 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column )
|
|||
if (domElement.isElement())
|
||||
{
|
||||
bool ok = false;
|
||||
qreal value = item->text().toDouble(&ok);
|
||||
qreal value = item->text().replace(",", ".").toDouble(&ok);
|
||||
if (ok)
|
||||
{
|
||||
domElement.setAttribute("base", value);
|
||||
|
@ -462,7 +462,7 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column )
|
|||
domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute("ksize", item->text().toDouble());
|
||||
domElement.setAttribute("ksize", item->text().replace(",", ".").toDouble());
|
||||
this->column = 4;
|
||||
emit FullUpdateTree();
|
||||
}
|
||||
|
@ -474,7 +474,7 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column )
|
|||
domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute("kgrowth", item->text().toDouble());
|
||||
domElement.setAttribute("kgrowth", item->text().replace(",", ".").toDouble());
|
||||
this->column = 5;
|
||||
emit FullUpdateTree();
|
||||
}
|
||||
|
|
|
@ -69,11 +69,11 @@ void VToolAlongLine::FullUpdateFromGui(int result)
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, dialogAlongLine->getPointName());
|
||||
domElement.setAttribute(AttrTypeLine, dialogAlongLine->getTypeLine());
|
||||
domElement.setAttribute(AttrLength, dialogAlongLine->getFormula());
|
||||
domElement.setAttribute(AttrFirstPoint, QString().setNum(dialogAlongLine->getFirstPointId()));
|
||||
domElement.setAttribute(AttrSecondPoint, QString().setNum(dialogAlongLine->getSecondPointId()));
|
||||
SetAttribute(domElement, AttrName, dialogAlongLine->getPointName());
|
||||
SetAttribute(domElement, AttrTypeLine, dialogAlongLine->getTypeLine());
|
||||
SetAttribute(domElement, AttrLength, dialogAlongLine->getFormula());
|
||||
SetAttribute(domElement, AttrFirstPoint, dialogAlongLine->getFirstPointId());
|
||||
SetAttribute(domElement, AttrSecondPoint, dialogAlongLine->getSecondPointId());
|
||||
emit FullUpdateTree();
|
||||
}
|
||||
}
|
||||
|
@ -101,16 +101,16 @@ void VToolAlongLine::AddToFile()
|
|||
const VPointF *point = VAbstractTool::data.GeometricObject<const VPointF *>(id);
|
||||
QDomElement domElement = doc->createElement(TagName);
|
||||
|
||||
AddAttribute(domElement, AttrId, id);
|
||||
AddAttribute(domElement, AttrType, ToolType);
|
||||
AddAttribute(domElement, AttrName, point->name());
|
||||
AddAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
AddAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrId, id);
|
||||
SetAttribute(domElement, AttrType, ToolType);
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
|
||||
AddAttribute(domElement, AttrTypeLine, typeLine);
|
||||
AddAttribute(domElement, AttrLength, formula);
|
||||
AddAttribute(domElement, AttrFirstPoint, basePointId);
|
||||
AddAttribute(domElement, AttrSecondPoint, secondPointId);
|
||||
SetAttribute(domElement, AttrTypeLine, typeLine);
|
||||
SetAttribute(domElement, AttrLength, formula);
|
||||
SetAttribute(domElement, AttrFirstPoint, basePointId);
|
||||
SetAttribute(domElement, AttrSecondPoint, secondPointId);
|
||||
|
||||
AddToCalculation(domElement);
|
||||
}
|
||||
|
@ -121,13 +121,13 @@ void VToolAlongLine::RefreshDataInFile()
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrMx, toMM(point->mx()));
|
||||
domElement.setAttribute(AttrMy, toMM(point->my()));
|
||||
domElement.setAttribute(AttrName, point->name());
|
||||
domElement.setAttribute(AttrTypeLine, typeLine);
|
||||
domElement.setAttribute(AttrLength, formula);
|
||||
domElement.setAttribute(AttrFirstPoint, basePointId);
|
||||
domElement.setAttribute(AttrSecondPoint, secondPointId);
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrTypeLine, typeLine);
|
||||
SetAttribute(domElement, AttrLength, formula);
|
||||
SetAttribute(domElement, AttrFirstPoint, basePointId);
|
||||
SetAttribute(domElement, AttrSecondPoint, secondPointId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -144,10 +144,10 @@ void VToolArc::FullUpdateFromGui(int result)
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrCenter, QString().setNum(dialogArc->GetCenter()));
|
||||
domElement.setAttribute(AttrRadius, dialogArc->GetRadius());
|
||||
domElement.setAttribute(AttrAngle1, dialogArc->GetF1());
|
||||
domElement.setAttribute(AttrAngle2, dialogArc->GetF2());
|
||||
SetAttribute(domElement, AttrCenter, QString().setNum(dialogArc->GetCenter()));
|
||||
SetAttribute(domElement, AttrRadius, dialogArc->GetRadius());
|
||||
SetAttribute(domElement, AttrAngle1, dialogArc->GetF1());
|
||||
SetAttribute(domElement, AttrAngle2, dialogArc->GetF2());
|
||||
emit FullUpdateTree();
|
||||
}
|
||||
}
|
||||
|
@ -194,12 +194,12 @@ void VToolArc::AddToFile()
|
|||
const VArc *arc = VAbstractTool::data.GeometricObject<const VArc *>(id);
|
||||
QDomElement domElement = doc->createElement(TagName);
|
||||
|
||||
AddAttribute(domElement, AttrId, id);
|
||||
AddAttribute(domElement, AttrType, ToolType);
|
||||
AddAttribute(domElement, AttrCenter, arc->GetCenter().id());
|
||||
AddAttribute(domElement, AttrRadius, arc->GetFormulaRadius());
|
||||
AddAttribute(domElement, AttrAngle1, arc->GetFormulaF1());
|
||||
AddAttribute(domElement, AttrAngle2, arc->GetFormulaF2());
|
||||
SetAttribute(domElement, AttrId, id);
|
||||
SetAttribute(domElement, AttrType, ToolType);
|
||||
SetAttribute(domElement, AttrCenter, arc->GetCenter().id());
|
||||
SetAttribute(domElement, AttrRadius, arc->GetFormulaRadius());
|
||||
SetAttribute(domElement, AttrAngle1, arc->GetFormulaF1());
|
||||
SetAttribute(domElement, AttrAngle2, arc->GetFormulaF2());
|
||||
|
||||
AddToCalculation(domElement);
|
||||
}
|
||||
|
@ -210,10 +210,10 @@ void VToolArc::RefreshDataInFile()
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrCenter, arc->GetCenter().id());
|
||||
domElement.setAttribute(AttrRadius, arc->GetFormulaRadius());
|
||||
domElement.setAttribute(AttrAngle1, arc->GetFormulaF1());
|
||||
domElement.setAttribute(AttrAngle2, arc->GetFormulaF2());
|
||||
SetAttribute(domElement, AttrCenter, arc->GetCenter().id());
|
||||
SetAttribute(domElement, AttrRadius, arc->GetFormulaRadius());
|
||||
SetAttribute(domElement, AttrAngle1, arc->GetFormulaF1());
|
||||
SetAttribute(domElement, AttrAngle2, arc->GetFormulaF2());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -164,12 +164,12 @@ void VToolBisector::FullUpdateFromGui(int result)
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, dialogBisector->getPointName());
|
||||
domElement.setAttribute(AttrTypeLine, dialogBisector->getTypeLine());
|
||||
domElement.setAttribute(AttrLength, dialogBisector->getFormula());
|
||||
domElement.setAttribute(AttrFirstPoint, QString().setNum(dialogBisector->getFirstPointId()));
|
||||
domElement.setAttribute(AttrSecondPoint, QString().setNum(dialogBisector->getSecondPointId()));
|
||||
domElement.setAttribute(AttrThirdPoint, QString().setNum(dialogBisector->getThirdPointId()));
|
||||
SetAttribute(domElement, AttrName, dialogBisector->getPointName());
|
||||
SetAttribute(domElement, AttrTypeLine, dialogBisector->getTypeLine());
|
||||
SetAttribute(domElement, AttrLength, dialogBisector->getFormula());
|
||||
SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogBisector->getFirstPointId()));
|
||||
SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogBisector->getSecondPointId()));
|
||||
SetAttribute(domElement, AttrThirdPoint, QString().setNum(dialogBisector->getThirdPointId()));
|
||||
emit FullUpdateTree();
|
||||
}
|
||||
}
|
||||
|
@ -197,17 +197,17 @@ void VToolBisector::AddToFile()
|
|||
const VPointF *point = VAbstractTool::data.GeometricObject<const VPointF *>(id);
|
||||
QDomElement domElement = doc->createElement(TagName);
|
||||
|
||||
AddAttribute(domElement, AttrId, id);
|
||||
AddAttribute(domElement, AttrType, ToolType);
|
||||
AddAttribute(domElement, AttrName, point->name());
|
||||
AddAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
AddAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrId, id);
|
||||
SetAttribute(domElement, AttrType, ToolType);
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
|
||||
AddAttribute(domElement, AttrTypeLine, typeLine);
|
||||
AddAttribute(domElement, AttrLength, formula);
|
||||
AddAttribute(domElement, AttrFirstPoint, firstPointId);
|
||||
AddAttribute(domElement, AttrSecondPoint, basePointId);
|
||||
AddAttribute(domElement, AttrThirdPoint, thirdPointId);
|
||||
SetAttribute(domElement, AttrTypeLine, typeLine);
|
||||
SetAttribute(domElement, AttrLength, formula);
|
||||
SetAttribute(domElement, AttrFirstPoint, firstPointId);
|
||||
SetAttribute(domElement, AttrSecondPoint, basePointId);
|
||||
SetAttribute(domElement, AttrThirdPoint, thirdPointId);
|
||||
|
||||
AddToCalculation(domElement);
|
||||
}
|
||||
|
@ -218,14 +218,14 @@ void VToolBisector::RefreshDataInFile()
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrMx, toMM(point->mx()));
|
||||
domElement.setAttribute(AttrMy, toMM(point->my()));
|
||||
domElement.setAttribute(AttrName, point->name());
|
||||
domElement.setAttribute(AttrTypeLine, typeLine);
|
||||
domElement.setAttribute(AttrLength, formula);
|
||||
domElement.setAttribute(AttrFirstPoint, firstPointId);
|
||||
domElement.setAttribute(AttrSecondPoint, basePointId);
|
||||
domElement.setAttribute(AttrThirdPoint, thirdPointId);
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrTypeLine, typeLine);
|
||||
SetAttribute(domElement, AttrLength, formula);
|
||||
SetAttribute(domElement, AttrFirstPoint, firstPointId);
|
||||
SetAttribute(domElement, AttrSecondPoint, basePointId);
|
||||
SetAttribute(domElement, AttrThirdPoint, thirdPointId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -171,9 +171,9 @@ void VToolCutArc::FullUpdateFromGui(int result)
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, dialogCutArc->getPointName());
|
||||
domElement.setAttribute(AttrLength, dialogCutArc->getFormula());
|
||||
domElement.setAttribute(AttrArc, QString().setNum(dialogCutArc->getArcId()));
|
||||
SetAttribute(domElement, AttrName, dialogCutArc->getPointName());
|
||||
SetAttribute(domElement, AttrLength, dialogCutArc->getFormula());
|
||||
SetAttribute(domElement, AttrArc, QString().setNum(dialogCutArc->getArcId()));
|
||||
emit FullUpdateTree();
|
||||
}
|
||||
}
|
||||
|
@ -223,14 +223,14 @@ void VToolCutArc::AddToFile()
|
|||
const VPointF *point = VAbstractTool::data.GeometricObject<const VPointF *>(id);
|
||||
QDomElement domElement = doc->createElement(TagName);
|
||||
|
||||
AddAttribute(domElement, AttrId, id);
|
||||
AddAttribute(domElement, AttrType, ToolType);
|
||||
AddAttribute(domElement, AttrName, point->name());
|
||||
AddAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
AddAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrId, id);
|
||||
SetAttribute(domElement, AttrType, ToolType);
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
|
||||
AddAttribute(domElement, AttrLength, formula);
|
||||
AddAttribute(domElement, AttrArc, arcId);
|
||||
SetAttribute(domElement, AttrLength, formula);
|
||||
SetAttribute(domElement, AttrArc, arcId);
|
||||
|
||||
AddToCalculation(domElement);
|
||||
}
|
||||
|
@ -241,11 +241,11 @@ void VToolCutArc::RefreshDataInFile()
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, point->name());
|
||||
domElement.setAttribute(AttrMx, toMM(point->mx()));
|
||||
domElement.setAttribute(AttrMy, toMM(point->my()));
|
||||
domElement.setAttribute(AttrLength, formula);
|
||||
domElement.setAttribute(AttrArc, arcId);
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrLength, formula);
|
||||
SetAttribute(domElement, AttrArc, arcId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -172,9 +172,9 @@ void VToolCutSpline::FullUpdateFromGui(int result)
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, dialogCutSpline->getPointName());
|
||||
domElement.setAttribute(AttrLength, dialogCutSpline->getFormula());
|
||||
domElement.setAttribute(AttrSpline, QString().setNum(dialogCutSpline->getSplineId()));
|
||||
SetAttribute(domElement, AttrName, dialogCutSpline->getPointName());
|
||||
SetAttribute(domElement, AttrLength, dialogCutSpline->getFormula());
|
||||
SetAttribute(domElement, AttrSpline, QString().setNum(dialogCutSpline->getSplineId()));
|
||||
emit FullUpdateTree();
|
||||
}
|
||||
}
|
||||
|
@ -224,14 +224,14 @@ void VToolCutSpline::AddToFile()
|
|||
const VPointF *point = VAbstractTool::data.GeometricObject<const VPointF *>(id);
|
||||
QDomElement domElement = doc->createElement(TagName);
|
||||
|
||||
AddAttribute(domElement, AttrId, id);
|
||||
AddAttribute(domElement, AttrType, ToolType);
|
||||
AddAttribute(domElement, AttrName, point->name());
|
||||
AddAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
AddAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrId, id);
|
||||
SetAttribute(domElement, AttrType, ToolType);
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
|
||||
AddAttribute(domElement, AttrLength, formula);
|
||||
AddAttribute(domElement, AttrSpline, splineId);
|
||||
SetAttribute(domElement, AttrLength, formula);
|
||||
SetAttribute(domElement, AttrSpline, splineId);
|
||||
|
||||
AddToCalculation(domElement);
|
||||
}
|
||||
|
@ -242,11 +242,11 @@ void VToolCutSpline::RefreshDataInFile()
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, point->name());
|
||||
domElement.setAttribute(AttrMx, toMM(point->mx()));
|
||||
domElement.setAttribute(AttrMy, toMM(point->my()));
|
||||
domElement.setAttribute(AttrLength, formula);
|
||||
domElement.setAttribute(AttrSpline, splineId);
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrLength, formula);
|
||||
SetAttribute(domElement, AttrSpline, splineId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -249,9 +249,9 @@ void VToolCutSplinePath::FullUpdateFromGui(int result)
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, dialogCutSplinePath->getPointName());
|
||||
domElement.setAttribute(AttrLength, dialogCutSplinePath->getFormula());
|
||||
domElement.setAttribute(AttrSplinePath, QString().setNum(dialogCutSplinePath->getSplinePathId()));
|
||||
SetAttribute(domElement, AttrName, dialogCutSplinePath->getPointName());
|
||||
SetAttribute(domElement, AttrLength, dialogCutSplinePath->getFormula());
|
||||
SetAttribute(domElement, AttrSplinePath, QString().setNum(dialogCutSplinePath->getSplinePathId()));
|
||||
emit FullUpdateTree();
|
||||
}
|
||||
}
|
||||
|
@ -301,14 +301,14 @@ void VToolCutSplinePath::AddToFile()
|
|||
const VPointF *point = VAbstractTool::data.GeometricObject<const VPointF *>(id);
|
||||
QDomElement domElement = doc->createElement(TagName);
|
||||
|
||||
AddAttribute(domElement, AttrId, id);
|
||||
AddAttribute(domElement, AttrType, ToolType);
|
||||
AddAttribute(domElement, AttrName, point->name());
|
||||
AddAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
AddAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrId, id);
|
||||
SetAttribute(domElement, AttrType, ToolType);
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
|
||||
AddAttribute(domElement, AttrLength, formula);
|
||||
AddAttribute(domElement, AttrSplinePath, splinePathId);
|
||||
SetAttribute(domElement, AttrLength, formula);
|
||||
SetAttribute(domElement, AttrSplinePath, splinePathId);
|
||||
|
||||
AddToCalculation(domElement);
|
||||
}
|
||||
|
@ -319,11 +319,11 @@ void VToolCutSplinePath::RefreshDataInFile()
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, point->name());
|
||||
domElement.setAttribute(AttrMx, toMM(point->mx()));
|
||||
domElement.setAttribute(AttrMy, toMM(point->my()));
|
||||
domElement.setAttribute(AttrLength, formula);
|
||||
domElement.setAttribute(AttrSplinePath, splinePathId);
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrLength, formula);
|
||||
SetAttribute(domElement, AttrSplinePath, splinePathId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -140,11 +140,11 @@ void VToolEndLine::FullUpdateFromGui(int result)
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, dialogEndLine->getPointName());
|
||||
domElement.setAttribute(AttrTypeLine, dialogEndLine->getTypeLine());
|
||||
domElement.setAttribute(AttrLength, dialogEndLine->getFormula());
|
||||
domElement.setAttribute(AttrAngle, QString().setNum(dialogEndLine->getAngle()));
|
||||
domElement.setAttribute(AttrBasePoint, QString().setNum(dialogEndLine->getBasePointId()));
|
||||
SetAttribute(domElement, AttrName, dialogEndLine->getPointName());
|
||||
SetAttribute(domElement, AttrTypeLine, dialogEndLine->getTypeLine());
|
||||
SetAttribute(domElement, AttrLength, dialogEndLine->getFormula());
|
||||
SetAttribute(domElement, AttrAngle, QString().setNum(dialogEndLine->getAngle()));
|
||||
SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogEndLine->getBasePointId()));
|
||||
emit FullUpdateTree();
|
||||
}
|
||||
}
|
||||
|
@ -161,16 +161,16 @@ void VToolEndLine::AddToFile()
|
|||
const VPointF *point = VAbstractTool::data.GeometricObject<const VPointF *>(id);
|
||||
QDomElement domElement = doc->createElement(TagName);
|
||||
|
||||
AddAttribute(domElement, AttrId, id);
|
||||
AddAttribute(domElement, AttrType, ToolType);
|
||||
AddAttribute(domElement, AttrName, point->name());
|
||||
AddAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
AddAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrId, id);
|
||||
SetAttribute(domElement, AttrType, ToolType);
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
|
||||
AddAttribute(domElement, AttrTypeLine, typeLine);
|
||||
AddAttribute(domElement, AttrLength, formula);
|
||||
AddAttribute(domElement, AttrAngle, angle);
|
||||
AddAttribute(domElement, AttrBasePoint, basePointId);
|
||||
SetAttribute(domElement, AttrTypeLine, typeLine);
|
||||
SetAttribute(domElement, AttrLength, formula);
|
||||
SetAttribute(domElement, AttrAngle, angle);
|
||||
SetAttribute(domElement, AttrBasePoint, basePointId);
|
||||
|
||||
AddToCalculation(domElement);
|
||||
}
|
||||
|
@ -181,12 +181,12 @@ void VToolEndLine::RefreshDataInFile()
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, point->name());
|
||||
domElement.setAttribute(AttrMx, toMM(point->mx()));
|
||||
domElement.setAttribute(AttrMy, toMM(point->my()));
|
||||
domElement.setAttribute(AttrTypeLine, typeLine);
|
||||
domElement.setAttribute(AttrLength, formula);
|
||||
domElement.setAttribute(AttrAngle, angle);
|
||||
domElement.setAttribute(AttrBasePoint, basePointId);
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrTypeLine, typeLine);
|
||||
SetAttribute(domElement, AttrLength, formula);
|
||||
SetAttribute(domElement, AttrAngle, angle);
|
||||
SetAttribute(domElement, AttrBasePoint, basePointId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -155,11 +155,11 @@ void VToolHeight::FullUpdateFromGui(int result)
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, dialogHeight->getPointName());
|
||||
domElement.setAttribute(AttrTypeLine, dialogHeight->getTypeLine());
|
||||
domElement.setAttribute(AttrBasePoint, QString().setNum(dialogHeight->getBasePointId()));
|
||||
domElement.setAttribute(AttrP1Line, QString().setNum(dialogHeight->getP1LineId()));
|
||||
domElement.setAttribute(AttrP2Line, QString().setNum(dialogHeight->getP2LineId()));
|
||||
SetAttribute(domElement, AttrName, dialogHeight->getPointName());
|
||||
SetAttribute(domElement, AttrTypeLine, dialogHeight->getTypeLine());
|
||||
SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogHeight->getBasePointId()));
|
||||
SetAttribute(domElement, AttrP1Line, QString().setNum(dialogHeight->getP1LineId()));
|
||||
SetAttribute(domElement, AttrP2Line, QString().setNum(dialogHeight->getP2LineId()));
|
||||
emit FullUpdateTree();
|
||||
}
|
||||
}
|
||||
|
@ -181,16 +181,16 @@ void VToolHeight::AddToFile()
|
|||
const VPointF *point = VAbstractTool::data.GeometricObject<const VPointF *>(id);
|
||||
QDomElement domElement = doc->createElement(TagName);
|
||||
|
||||
AddAttribute(domElement, AttrId, id);
|
||||
AddAttribute(domElement, AttrType, ToolType);
|
||||
AddAttribute(domElement, AttrName, point->name());
|
||||
AddAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
AddAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrId, id);
|
||||
SetAttribute(domElement, AttrType, ToolType);
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
|
||||
AddAttribute(domElement, AttrTypeLine, typeLine);
|
||||
AddAttribute(domElement, AttrBasePoint, basePointId);
|
||||
AddAttribute(domElement, AttrP1Line, p1LineId);
|
||||
AddAttribute(domElement, AttrP2Line, p2LineId);
|
||||
SetAttribute(domElement, AttrTypeLine, typeLine);
|
||||
SetAttribute(domElement, AttrBasePoint, basePointId);
|
||||
SetAttribute(domElement, AttrP1Line, p1LineId);
|
||||
SetAttribute(domElement, AttrP2Line, p2LineId);
|
||||
|
||||
AddToCalculation(domElement);
|
||||
|
||||
|
@ -202,12 +202,12 @@ void VToolHeight::RefreshDataInFile()
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, point->name());
|
||||
domElement.setAttribute(AttrMx, toMM(point->mx()));
|
||||
domElement.setAttribute(AttrMy, toMM(point->my()));
|
||||
domElement.setAttribute(AttrTypeLine, typeLine);
|
||||
domElement.setAttribute(AttrBasePoint, basePointId);
|
||||
domElement.setAttribute(AttrP1Line, p1LineId);
|
||||
domElement.setAttribute(AttrP2Line, p2LineId);
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrTypeLine, typeLine);
|
||||
SetAttribute(domElement, AttrBasePoint, basePointId);
|
||||
SetAttribute(domElement, AttrP1Line, p1LineId);
|
||||
SetAttribute(domElement, AttrP2Line, p2LineId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,8 +118,8 @@ void VToolLine::FullUpdateFromGui(int result)
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrFirstPoint, QString().setNum(dialogLine->getFirstPoint()));
|
||||
domElement.setAttribute(AttrSecondPoint, QString().setNum(dialogLine->getSecondPoint()));
|
||||
SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogLine->getFirstPoint()));
|
||||
SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogLine->getSecondPoint()));
|
||||
emit FullUpdateTree();
|
||||
}
|
||||
}
|
||||
|
@ -163,9 +163,9 @@ void VToolLine::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
|
|||
void VToolLine::AddToFile()
|
||||
{
|
||||
QDomElement domElement = doc->createElement(TagName);
|
||||
AddAttribute(domElement, AttrId, id);
|
||||
AddAttribute(domElement, AttrFirstPoint, firstPoint);
|
||||
AddAttribute(domElement, AttrSecondPoint, secondPoint);
|
||||
SetAttribute(domElement, AttrId, id);
|
||||
SetAttribute(domElement, AttrFirstPoint, firstPoint);
|
||||
SetAttribute(domElement, AttrSecondPoint, secondPoint);
|
||||
|
||||
AddToCalculation(domElement);
|
||||
}
|
||||
|
@ -175,8 +175,8 @@ void VToolLine::RefreshDataInFile()
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrFirstPoint, firstPoint);
|
||||
domElement.setAttribute(AttrSecondPoint, secondPoint);
|
||||
SetAttribute(domElement, AttrFirstPoint, firstPoint);
|
||||
SetAttribute(domElement, AttrSecondPoint, secondPoint);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -146,11 +146,11 @@ void VToolLineIntersect::FullUpdateFromGui(int result)
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, dialogLineIntersect->getPointName());
|
||||
domElement.setAttribute(AttrP1Line1, QString().setNum(dialogLineIntersect->getP1Line1()));
|
||||
domElement.setAttribute(AttrP2Line1, QString().setNum(dialogLineIntersect->getP2Line1()));
|
||||
domElement.setAttribute(AttrP1Line2, QString().setNum(dialogLineIntersect->getP1Line2()));
|
||||
domElement.setAttribute(AttrP2Line2, QString().setNum(dialogLineIntersect->getP2Line2()));
|
||||
SetAttribute(domElement, AttrName, dialogLineIntersect->getPointName());
|
||||
SetAttribute(domElement, AttrP1Line1, QString().setNum(dialogLineIntersect->getP1Line1()));
|
||||
SetAttribute(domElement, AttrP2Line1, QString().setNum(dialogLineIntersect->getP2Line1()));
|
||||
SetAttribute(domElement, AttrP1Line2, QString().setNum(dialogLineIntersect->getP1Line2()));
|
||||
SetAttribute(domElement, AttrP2Line2, QString().setNum(dialogLineIntersect->getP2Line2()));
|
||||
emit FullUpdateTree();
|
||||
}
|
||||
}
|
||||
|
@ -178,16 +178,16 @@ void VToolLineIntersect::AddToFile()
|
|||
const VPointF *point = VAbstractTool::data.GeometricObject<const VPointF *>(id);
|
||||
QDomElement domElement = doc->createElement(TagName);
|
||||
|
||||
AddAttribute(domElement, AttrId, id);
|
||||
AddAttribute(domElement, AttrType, ToolType);
|
||||
AddAttribute(domElement, AttrName, point->name());
|
||||
AddAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
AddAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrId, id);
|
||||
SetAttribute(domElement, AttrType, ToolType);
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
|
||||
AddAttribute(domElement, AttrP1Line1, p1Line1);
|
||||
AddAttribute(domElement, AttrP2Line1, p2Line1);
|
||||
AddAttribute(domElement, AttrP1Line2, p1Line2);
|
||||
AddAttribute(domElement, AttrP2Line2, p2Line2);
|
||||
SetAttribute(domElement, AttrP1Line1, p1Line1);
|
||||
SetAttribute(domElement, AttrP2Line1, p2Line1);
|
||||
SetAttribute(domElement, AttrP1Line2, p1Line2);
|
||||
SetAttribute(domElement, AttrP2Line2, p2Line2);
|
||||
|
||||
AddToCalculation(domElement);
|
||||
}
|
||||
|
@ -198,13 +198,13 @@ void VToolLineIntersect::RefreshDataInFile()
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, point->name());
|
||||
domElement.setAttribute(AttrMx, toMM(point->mx()));
|
||||
domElement.setAttribute(AttrMy, toMM(point->my()));
|
||||
domElement.setAttribute(AttrP1Line1, p1Line1);
|
||||
domElement.setAttribute(AttrP2Line1, p2Line1);
|
||||
domElement.setAttribute(AttrP1Line2, p1Line2);
|
||||
domElement.setAttribute(AttrP2Line2, p2Line2);
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrP1Line1, p1Line1);
|
||||
SetAttribute(domElement, AttrP2Line1, p2Line1);
|
||||
SetAttribute(domElement, AttrP1Line2, p1Line2);
|
||||
SetAttribute(domElement, AttrP2Line2, p2Line2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -149,12 +149,12 @@ void VToolNormal::FullUpdateFromGui(int result)
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, dialogNormal->getPointName());
|
||||
domElement.setAttribute(AttrTypeLine, dialogNormal->getTypeLine());
|
||||
domElement.setAttribute(AttrLength, dialogNormal->getFormula());
|
||||
domElement.setAttribute(AttrAngle, QString().setNum(dialogNormal->getAngle()));
|
||||
domElement.setAttribute(AttrFirstPoint, QString().setNum(dialogNormal->getFirstPointId()));
|
||||
domElement.setAttribute(AttrSecondPoint, QString().setNum(dialogNormal->getSecondPointId()));
|
||||
SetAttribute(domElement, AttrName, dialogNormal->getPointName());
|
||||
SetAttribute(domElement, AttrTypeLine, dialogNormal->getTypeLine());
|
||||
SetAttribute(domElement, AttrLength, dialogNormal->getFormula());
|
||||
SetAttribute(domElement, AttrAngle, QString().setNum(dialogNormal->getAngle()));
|
||||
SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogNormal->getFirstPointId()));
|
||||
SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogNormal->getSecondPointId()));
|
||||
emit FullUpdateTree();
|
||||
}
|
||||
}
|
||||
|
@ -182,17 +182,17 @@ void VToolNormal::AddToFile()
|
|||
const VPointF *point = VAbstractTool::data.GeometricObject<const VPointF *>(id);
|
||||
QDomElement domElement = doc->createElement(TagName);
|
||||
|
||||
AddAttribute(domElement, AttrId, id);
|
||||
AddAttribute(domElement, AttrType, ToolType);
|
||||
AddAttribute(domElement, AttrName, point->name());
|
||||
AddAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
AddAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrId, id);
|
||||
SetAttribute(domElement, AttrType, ToolType);
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
|
||||
AddAttribute(domElement, AttrTypeLine, typeLine);
|
||||
AddAttribute(domElement, AttrLength, formula);
|
||||
AddAttribute(domElement, AttrAngle, angle);
|
||||
AddAttribute(domElement, AttrFirstPoint, basePointId);
|
||||
AddAttribute(domElement, AttrSecondPoint, secondPointId);
|
||||
SetAttribute(domElement, AttrTypeLine, typeLine);
|
||||
SetAttribute(domElement, AttrLength, formula);
|
||||
SetAttribute(domElement, AttrAngle, angle);
|
||||
SetAttribute(domElement, AttrFirstPoint, basePointId);
|
||||
SetAttribute(domElement, AttrSecondPoint, secondPointId);
|
||||
|
||||
AddToCalculation(domElement);
|
||||
}
|
||||
|
@ -203,14 +203,14 @@ void VToolNormal::RefreshDataInFile()
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, point->name());
|
||||
domElement.setAttribute(AttrMx, toMM(point->mx()));
|
||||
domElement.setAttribute(AttrMy, toMM(point->my()));
|
||||
domElement.setAttribute(AttrTypeLine, typeLine);
|
||||
domElement.setAttribute(AttrLength, formula);
|
||||
domElement.setAttribute(AttrAngle, angle);
|
||||
domElement.setAttribute(AttrFirstPoint, basePointId);
|
||||
domElement.setAttribute(AttrSecondPoint, secondPointId);
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrTypeLine, typeLine);
|
||||
SetAttribute(domElement, AttrLength, formula);
|
||||
SetAttribute(domElement, AttrAngle, angle);
|
||||
SetAttribute(domElement, AttrFirstPoint, basePointId);
|
||||
SetAttribute(domElement, AttrSecondPoint, secondPointId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -65,8 +65,8 @@ void VToolPoint::UpdateNamePosition(qreal mx, qreal my)
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrMx, toMM(mx));
|
||||
domElement.setAttribute(AttrMy, toMM(my));
|
||||
SetAttribute(domElement, AttrMx, toMM(mx));
|
||||
SetAttribute(domElement, AttrMy, toMM(my));
|
||||
emit toolhaveChange();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -169,11 +169,11 @@ void VToolPointOfContact::FullUpdateFromGui(int result)
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, dialogPointOfContact->getPointName());
|
||||
domElement.setAttribute(AttrRadius, dialogPointOfContact->getRadius());
|
||||
domElement.setAttribute(AttrCenter, QString().setNum(dialogPointOfContact->getCenter()));
|
||||
domElement.setAttribute(AttrFirstPoint, QString().setNum(dialogPointOfContact->getFirstPoint()));
|
||||
domElement.setAttribute(AttrSecondPoint, QString().setNum(dialogPointOfContact->getSecondPoint()));
|
||||
SetAttribute(domElement, AttrName, dialogPointOfContact->getPointName());
|
||||
SetAttribute(domElement, AttrRadius, dialogPointOfContact->getRadius());
|
||||
SetAttribute(domElement, AttrCenter, QString().setNum(dialogPointOfContact->getCenter()));
|
||||
SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogPointOfContact->getFirstPoint()));
|
||||
SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogPointOfContact->getSecondPoint()));
|
||||
emit FullUpdateTree();
|
||||
}
|
||||
}
|
||||
|
@ -201,16 +201,16 @@ void VToolPointOfContact::AddToFile()
|
|||
const VPointF *point = VAbstractTool::data.GeometricObject<const VPointF *>(id);
|
||||
QDomElement domElement = doc->createElement(TagName);
|
||||
|
||||
AddAttribute(domElement, AttrId, id);
|
||||
AddAttribute(domElement, AttrType, ToolType);
|
||||
AddAttribute(domElement, AttrName, point->name());
|
||||
AddAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
AddAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrId, id);
|
||||
SetAttribute(domElement, AttrType, ToolType);
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
|
||||
AddAttribute(domElement, AttrRadius, radius);
|
||||
AddAttribute(domElement, AttrCenter, center);
|
||||
AddAttribute(domElement, AttrFirstPoint, firstPointId);
|
||||
AddAttribute(domElement, AttrSecondPoint, secondPointId);
|
||||
SetAttribute(domElement, AttrRadius, radius);
|
||||
SetAttribute(domElement, AttrCenter, center);
|
||||
SetAttribute(domElement, AttrFirstPoint, firstPointId);
|
||||
SetAttribute(domElement, AttrSecondPoint, secondPointId);
|
||||
|
||||
AddToCalculation(domElement);
|
||||
}
|
||||
|
@ -221,13 +221,13 @@ void VToolPointOfContact::RefreshDataInFile()
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, point->name());
|
||||
domElement.setAttribute(AttrMx, toMM(point->mx()));
|
||||
domElement.setAttribute(AttrMy, toMM(point->my()));
|
||||
domElement.setAttribute(AttrRadius, radius);
|
||||
domElement.setAttribute(AttrCenter, center);
|
||||
domElement.setAttribute(AttrFirstPoint, firstPointId);
|
||||
domElement.setAttribute(AttrSecondPoint, secondPointId);
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrRadius, radius);
|
||||
SetAttribute(domElement, AttrCenter, center);
|
||||
SetAttribute(domElement, AttrFirstPoint, firstPointId);
|
||||
SetAttribute(domElement, AttrSecondPoint, secondPointId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -119,9 +119,9 @@ void VToolPointOfIntersection::FullUpdateFromGui(int result)
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, dialogPointOfIntersection->getPointName());
|
||||
domElement.setAttribute(AttrFirstPoint, QString().setNum(dialogPointOfIntersection->getFirstPointId()));
|
||||
domElement.setAttribute(AttrSecondPoint, QString().setNum(dialogPointOfIntersection->getSecondPointId()));
|
||||
SetAttribute(domElement, AttrName, dialogPointOfIntersection->getPointName());
|
||||
SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogPointOfIntersection->getFirstPointId()));
|
||||
SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogPointOfIntersection->getSecondPointId()));
|
||||
emit FullUpdateTree();
|
||||
}
|
||||
}
|
||||
|
@ -149,14 +149,14 @@ void VToolPointOfIntersection::AddToFile()
|
|||
const VPointF *point = VAbstractTool::data.GeometricObject<const VPointF *>(id);
|
||||
QDomElement domElement = doc->createElement(TagName);
|
||||
|
||||
AddAttribute(domElement, AttrId, id);
|
||||
AddAttribute(domElement, AttrType, ToolType);
|
||||
AddAttribute(domElement, AttrName, point->name());
|
||||
AddAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
AddAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrId, id);
|
||||
SetAttribute(domElement, AttrType, ToolType);
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
|
||||
AddAttribute(domElement, AttrFirstPoint, firstPointId);
|
||||
AddAttribute(domElement, AttrSecondPoint, secondPointId);
|
||||
SetAttribute(domElement, AttrFirstPoint, firstPointId);
|
||||
SetAttribute(domElement, AttrSecondPoint, secondPointId);
|
||||
|
||||
AddToCalculation(domElement);
|
||||
}
|
||||
|
@ -167,10 +167,10 @@ void VToolPointOfIntersection::RefreshDataInFile()
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, point->name());
|
||||
domElement.setAttribute(AttrName, toMM(point->mx()));
|
||||
domElement.setAttribute(AttrName, toMM(point->my()));
|
||||
domElement.setAttribute(AttrFirstPoint, firstPointId);
|
||||
domElement.setAttribute(AttrSecondPoint, secondPointId);
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrName, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrName, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrFirstPoint, firstPointId);
|
||||
SetAttribute(domElement, AttrSecondPoint, secondPointId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -172,12 +172,12 @@ void VToolShoulderPoint::FullUpdateFromGui(int result)
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, dialogShoulderPoint->getPointName());
|
||||
domElement.setAttribute(AttrTypeLine, dialogShoulderPoint->getTypeLine());
|
||||
domElement.setAttribute(AttrLength, dialogShoulderPoint->getFormula());
|
||||
domElement.setAttribute(AttrP1Line, QString().setNum(dialogShoulderPoint->getP1Line()));
|
||||
domElement.setAttribute(AttrP2Line, QString().setNum(dialogShoulderPoint->getP2Line()));
|
||||
domElement.setAttribute(AttrPShoulder, QString().setNum(dialogShoulderPoint->getPShoulder()));
|
||||
SetAttribute(domElement, AttrName, dialogShoulderPoint->getPointName());
|
||||
SetAttribute(domElement, AttrTypeLine, dialogShoulderPoint->getTypeLine());
|
||||
SetAttribute(domElement, AttrLength, dialogShoulderPoint->getFormula());
|
||||
SetAttribute(domElement, AttrP1Line, QString().setNum(dialogShoulderPoint->getP1Line()));
|
||||
SetAttribute(domElement, AttrP2Line, QString().setNum(dialogShoulderPoint->getP2Line()));
|
||||
SetAttribute(domElement, AttrPShoulder, QString().setNum(dialogShoulderPoint->getPShoulder()));
|
||||
emit FullUpdateTree();
|
||||
}
|
||||
}
|
||||
|
@ -205,17 +205,17 @@ void VToolShoulderPoint::AddToFile()
|
|||
const VPointF *point = VAbstractTool::data.GeometricObject<const VPointF *>(id);
|
||||
QDomElement domElement = doc->createElement(TagName);
|
||||
|
||||
AddAttribute(domElement, AttrId, id);
|
||||
AddAttribute(domElement, AttrType, ToolType);
|
||||
AddAttribute(domElement, AttrName, point->name());
|
||||
AddAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
AddAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrId, id);
|
||||
SetAttribute(domElement, AttrType, ToolType);
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
|
||||
AddAttribute(domElement, AttrTypeLine, typeLine);
|
||||
AddAttribute(domElement, AttrLength, formula);
|
||||
AddAttribute(domElement, AttrP1Line, basePointId);
|
||||
AddAttribute(domElement, AttrP2Line, p2Line);
|
||||
AddAttribute(domElement, AttrPShoulder, pShoulder);
|
||||
SetAttribute(domElement, AttrTypeLine, typeLine);
|
||||
SetAttribute(domElement, AttrLength, formula);
|
||||
SetAttribute(domElement, AttrP1Line, basePointId);
|
||||
SetAttribute(domElement, AttrP2Line, p2Line);
|
||||
SetAttribute(domElement, AttrPShoulder, pShoulder);
|
||||
|
||||
AddToCalculation(domElement);
|
||||
}
|
||||
|
@ -226,14 +226,14 @@ void VToolShoulderPoint::RefreshDataInFile()
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, point->name());
|
||||
domElement.setAttribute(AttrName, toMM(point->mx()));
|
||||
domElement.setAttribute(AttrName, toMM(point->my()));
|
||||
domElement.setAttribute(AttrTypeLine, typeLine);
|
||||
domElement.setAttribute(AttrLength, formula);
|
||||
domElement.setAttribute(AttrP1Line, basePointId);
|
||||
domElement.setAttribute(AttrP2Line, p2Line);
|
||||
domElement.setAttribute(AttrPShoulder, pShoulder);
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrName, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrName, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrTypeLine, typeLine);
|
||||
SetAttribute(domElement, AttrLength, formula);
|
||||
SetAttribute(domElement, AttrP1Line, basePointId);
|
||||
SetAttribute(domElement, AttrP2Line, p2Line);
|
||||
SetAttribute(domElement, AttrPShoulder, pShoulder);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -63,13 +63,13 @@ void VToolSinglePoint::AddToFile()
|
|||
const VPointF *point = VAbstractTool::data.GeometricObject<const VPointF *>(id);
|
||||
QDomElement domElement = doc->createElement(TagName);
|
||||
|
||||
AddAttribute(domElement, AttrId, id);
|
||||
AddAttribute(domElement, AttrType, ToolType);
|
||||
AddAttribute(domElement, AttrName, point->name());
|
||||
AddAttribute(domElement, AttrX, toMM(point->x()));
|
||||
AddAttribute(domElement, AttrY, toMM(point->y()));
|
||||
AddAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
AddAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrId, id);
|
||||
SetAttribute(domElement, AttrType, ToolType);
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrX, toMM(point->x()));
|
||||
SetAttribute(domElement, AttrY, toMM(point->y()));
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
|
||||
AddToCalculation(domElement);
|
||||
}
|
||||
|
@ -80,11 +80,11 @@ void VToolSinglePoint::RefreshDataInFile()
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, point->name());
|
||||
domElement.setAttribute(AttrX, QString().setNum(toMM(point->x())));
|
||||
domElement.setAttribute(AttrY, QString().setNum(toMM(point->y())));
|
||||
domElement.setAttribute(AttrMx, QString().setNum(toMM(point->mx())));
|
||||
domElement.setAttribute(AttrMy, QString().setNum(toMM(point->my())));
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrX, QString().setNum(toMM(point->x())));
|
||||
SetAttribute(domElement, AttrY, QString().setNum(toMM(point->y())));
|
||||
SetAttribute(domElement, AttrMx, QString().setNum(toMM(point->mx())));
|
||||
SetAttribute(domElement, AttrMy, QString().setNum(toMM(point->my())));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -110,8 +110,8 @@ QVariant VToolSinglePoint::itemChange(QGraphicsItem::GraphicsItemChange change,
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrX, QString().setNum(toMM(newPos.x())));
|
||||
domElement.setAttribute(AttrY, QString().setNum(toMM(newPos.y())));
|
||||
SetAttribute(domElement, AttrX, QString().setNum(toMM(newPos.x())));
|
||||
SetAttribute(domElement, AttrY, QString().setNum(toMM(newPos.y())));
|
||||
|
||||
QList<QGraphicsView*> list = this->scene()->views();
|
||||
VAbstractTool::NewSceneRect(this->scene(), list[0]);
|
||||
|
@ -157,9 +157,9 @@ void VToolSinglePoint::FullUpdateFromGui(int result)
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, name);
|
||||
domElement.setAttribute(AttrX, QString().setNum(toMM(p.x())));
|
||||
domElement.setAttribute(AttrY, QString().setNum(toMM(p.y())));
|
||||
SetAttribute(domElement, AttrName, name);
|
||||
SetAttribute(domElement, AttrX, QString().setNum(toMM(p.x())));
|
||||
SetAttribute(domElement, AttrY, QString().setNum(toMM(p.y())));
|
||||
//I don't now why but signal does not work.
|
||||
doc->FullUpdateTree();
|
||||
}
|
||||
|
|
|
@ -168,13 +168,13 @@ void VToolSpline::FullUpdateFromGui(int result)
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrPoint1, spl.GetP1().id());
|
||||
domElement.setAttribute(AttrPoint4, spl.GetP4().id());
|
||||
domElement.setAttribute(AttrAngle1, spl.GetAngle1());
|
||||
domElement.setAttribute(AttrAngle2, spl.GetAngle2());
|
||||
domElement.setAttribute(AttrKAsm1, spl.GetKasm1());
|
||||
domElement.setAttribute(AttrKAsm2, spl.GetKasm2());
|
||||
domElement.setAttribute(AttrKCurve, spl.GetKcurve());
|
||||
SetAttribute(domElement, AttrPoint1, spl.GetP1().id());
|
||||
SetAttribute(domElement, AttrPoint4, spl.GetP4().id());
|
||||
SetAttribute(domElement, AttrAngle1, spl.GetAngle1());
|
||||
SetAttribute(domElement, AttrAngle2, spl.GetAngle2());
|
||||
SetAttribute(domElement, AttrKAsm1, spl.GetKasm1());
|
||||
SetAttribute(domElement, AttrKAsm2, spl.GetKasm2());
|
||||
SetAttribute(domElement, AttrKCurve, spl.GetKcurve());
|
||||
emit FullUpdateTree();
|
||||
}
|
||||
}
|
||||
|
@ -198,11 +198,11 @@ void VToolSpline::ControlPointChangePosition(const qint32 &indexSpline, const Sp
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrAngle1, QString().setNum(spl.GetAngle1()));
|
||||
domElement.setAttribute(AttrAngle2, QString().setNum(spl.GetAngle2()));
|
||||
domElement.setAttribute(AttrKAsm1, QString().setNum(spl.GetKasm1()));
|
||||
domElement.setAttribute(AttrKAsm2, QString().setNum(spl.GetKasm2()));
|
||||
domElement.setAttribute(AttrKCurve, QString().setNum(spl.GetKcurve()));
|
||||
SetAttribute(domElement, AttrAngle1, QString().setNum(spl.GetAngle1()));
|
||||
SetAttribute(domElement, AttrAngle2, QString().setNum(spl.GetAngle2()));
|
||||
SetAttribute(domElement, AttrKAsm1, QString().setNum(spl.GetKasm1()));
|
||||
SetAttribute(domElement, AttrKAsm2, QString().setNum(spl.GetKasm2()));
|
||||
SetAttribute(domElement, AttrKCurve, QString().setNum(spl.GetKcurve()));
|
||||
emit FullUpdateTree();
|
||||
}
|
||||
}
|
||||
|
@ -217,15 +217,15 @@ void VToolSpline::AddToFile()
|
|||
const VSpline *spl = VAbstractTool::data.GeometricObject<const VSpline *>(id);
|
||||
QDomElement domElement = doc->createElement(TagName);
|
||||
|
||||
AddAttribute(domElement, AttrId, id);
|
||||
AddAttribute(domElement, AttrType, ToolType);
|
||||
AddAttribute(domElement, AttrPoint1, spl->GetP1().id());
|
||||
AddAttribute(domElement, AttrPoint4, spl->GetP4().id());
|
||||
AddAttribute(domElement, AttrAngle1, spl->GetAngle1());
|
||||
AddAttribute(domElement, AttrAngle2, spl->GetAngle2());
|
||||
AddAttribute(domElement, AttrKAsm1, spl->GetKasm1());
|
||||
AddAttribute(domElement, AttrKAsm2, spl->GetKasm2());
|
||||
AddAttribute(domElement, AttrKCurve, spl->GetKcurve());
|
||||
SetAttribute(domElement, AttrId, id);
|
||||
SetAttribute(domElement, AttrType, ToolType);
|
||||
SetAttribute(domElement, AttrPoint1, spl->GetP1().id());
|
||||
SetAttribute(domElement, AttrPoint4, spl->GetP4().id());
|
||||
SetAttribute(domElement, AttrAngle1, spl->GetAngle1());
|
||||
SetAttribute(domElement, AttrAngle2, spl->GetAngle2());
|
||||
SetAttribute(domElement, AttrKAsm1, spl->GetKasm1());
|
||||
SetAttribute(domElement, AttrKAsm2, spl->GetKasm2());
|
||||
SetAttribute(domElement, AttrKCurve, spl->GetKcurve());
|
||||
|
||||
AddToCalculation(domElement);
|
||||
}
|
||||
|
@ -236,13 +236,13 @@ void VToolSpline::RefreshDataInFile()
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrPoint1, spl->GetP1().id());
|
||||
domElement.setAttribute(AttrPoint4, spl->GetP4().id());
|
||||
domElement.setAttribute(AttrAngle1, spl->GetAngle1());
|
||||
domElement.setAttribute(AttrAngle2, spl->GetAngle2());
|
||||
domElement.setAttribute(AttrKAsm1, spl->GetKasm1());
|
||||
domElement.setAttribute(AttrKAsm2, spl->GetKasm2());
|
||||
domElement.setAttribute(AttrKCurve, spl->GetKcurve());
|
||||
SetAttribute(domElement, AttrPoint1, spl->GetP1().id());
|
||||
SetAttribute(domElement, AttrPoint4, spl->GetP4().id());
|
||||
SetAttribute(domElement, AttrAngle1, spl->GetAngle1());
|
||||
SetAttribute(domElement, AttrAngle2, spl->GetAngle2());
|
||||
SetAttribute(domElement, AttrKAsm1, spl->GetKasm1());
|
||||
SetAttribute(domElement, AttrKAsm2, spl->GetKasm2());
|
||||
SetAttribute(domElement, AttrKCurve, spl->GetKcurve());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ void VToolSplinePath::FullUpdateFromGui(int result)
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrKCurve, QString().setNum(splPath.getKCurve()));
|
||||
SetAttribute(domElement, AttrKCurve, QString().setNum(splPath.getKCurve()));
|
||||
UpdatePathPoint(domElement, splPath);
|
||||
emit FullUpdateTree();
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ void VToolSplinePath::ControlPointChangePosition(const qint32 &indexSpline, cons
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrKCurve, QString().setNum(splPath.getKCurve()));
|
||||
SetAttribute(domElement, AttrKCurve, QString().setNum(splPath.getKCurve()));
|
||||
UpdatePathPoint(domElement, splPath);
|
||||
emit FullUpdateTree();
|
||||
}
|
||||
|
@ -214,10 +214,10 @@ void VToolSplinePath::UpdatePathPoint(QDomNode& node, VSplinePath &path)
|
|||
if (domElement.isNull() == false)
|
||||
{
|
||||
VSplinePoint p = path[i];
|
||||
domElement.setAttribute(AttrPSpline, p.P().id());
|
||||
domElement.setAttribute(AttrKAsm1, p.KAsm1());
|
||||
domElement.setAttribute(AttrKAsm2, p.KAsm2());
|
||||
domElement.setAttribute(AttrAngle, p.Angle2());
|
||||
SetAttribute(domElement, AttrPSpline, p.P().id());
|
||||
SetAttribute(domElement, AttrKAsm1, p.KAsm1());
|
||||
SetAttribute(domElement, AttrKAsm2, p.KAsm2());
|
||||
SetAttribute(domElement, AttrAngle, p.Angle2());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -263,9 +263,9 @@ void VToolSplinePath::AddToFile()
|
|||
VSplinePath splPath = *VAbstractTool::data.GeometricObject<const VSplinePath *>(id);
|
||||
QDomElement domElement = doc->createElement(TagName);
|
||||
|
||||
AddAttribute(domElement, AttrId, id);
|
||||
AddAttribute(domElement, AttrType, ToolType);
|
||||
AddAttribute(domElement, AttrKCurve, splPath.getKCurve());
|
||||
SetAttribute(domElement, AttrId, id);
|
||||
SetAttribute(domElement, AttrType, ToolType);
|
||||
SetAttribute(domElement, AttrKCurve, splPath.getKCurve());
|
||||
|
||||
for (qint32 i = 0; i < splPath.CountPoint(); ++i)
|
||||
{
|
||||
|
@ -301,7 +301,7 @@ void VToolSplinePath::RefreshDataInFile()
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrKCurve, QString().setNum(splPath.getKCurve()));
|
||||
SetAttribute(domElement, AttrKCurve, QString().setNum(splPath.getKCurve()));
|
||||
UpdatePathPoint(domElement, splPath);
|
||||
}
|
||||
|
||||
|
@ -312,10 +312,10 @@ void VToolSplinePath::AddPathPoint(QDomElement &domElement, const VSplinePoint &
|
|||
{
|
||||
QDomElement pathPoint = doc->createElement(AttrPathPoint);
|
||||
|
||||
AddAttribute(pathPoint, AttrPSpline, splPoint.P().id());
|
||||
AddAttribute(pathPoint, AttrKAsm1, splPoint.KAsm1());
|
||||
AddAttribute(pathPoint, AttrKAsm2, splPoint.KAsm2());
|
||||
AddAttribute(pathPoint, AttrAngle, splPoint.Angle2());
|
||||
SetAttribute(pathPoint, AttrPSpline, splPoint.P().id());
|
||||
SetAttribute(pathPoint, AttrKAsm1, splPoint.KAsm1());
|
||||
SetAttribute(pathPoint, AttrKAsm2, splPoint.KAsm2());
|
||||
SetAttribute(pathPoint, AttrAngle, splPoint.Angle2());
|
||||
|
||||
domElement.appendChild(pathPoint);
|
||||
}
|
||||
|
|
|
@ -172,11 +172,11 @@ void VToolTriangle::FullUpdateFromGui(int result)
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, dialogTriangle->getPointName());
|
||||
domElement.setAttribute(AttrAxisP1, QString().setNum(dialogTriangle->getAxisP1Id()));
|
||||
domElement.setAttribute(AttrAxisP2, QString().setNum(dialogTriangle->getAxisP2Id()));
|
||||
domElement.setAttribute(AttrFirstPoint, QString().setNum(dialogTriangle->getFirstPointId()));
|
||||
domElement.setAttribute(AttrSecondPoint, QString().setNum(dialogTriangle->getSecondPointId()));
|
||||
SetAttribute(domElement, AttrName, dialogTriangle->getPointName());
|
||||
SetAttribute(domElement, AttrAxisP1, QString().setNum(dialogTriangle->getAxisP1Id()));
|
||||
SetAttribute(domElement, AttrAxisP2, QString().setNum(dialogTriangle->getAxisP2Id()));
|
||||
SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTriangle->getFirstPointId()));
|
||||
SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTriangle->getSecondPointId()));
|
||||
emit FullUpdateTree();
|
||||
}
|
||||
|
||||
|
@ -207,16 +207,16 @@ void VToolTriangle::AddToFile()
|
|||
const VPointF *point = VAbstractTool::data.GeometricObject<const VPointF *>(id);
|
||||
QDomElement domElement = doc->createElement(TagName);
|
||||
|
||||
AddAttribute(domElement, AttrId, id);
|
||||
AddAttribute(domElement, AttrType, ToolType);
|
||||
AddAttribute(domElement, AttrName, point->name());
|
||||
AddAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
AddAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrId, id);
|
||||
SetAttribute(domElement, AttrType, ToolType);
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
|
||||
AddAttribute(domElement, AttrAxisP1, axisP1Id);
|
||||
AddAttribute(domElement, AttrAxisP2, axisP2Id);
|
||||
AddAttribute(domElement, AttrFirstPoint, firstPointId);
|
||||
AddAttribute(domElement, AttrSecondPoint, secondPointId);
|
||||
SetAttribute(domElement, AttrAxisP1, axisP1Id);
|
||||
SetAttribute(domElement, AttrAxisP2, axisP2Id);
|
||||
SetAttribute(domElement, AttrFirstPoint, firstPointId);
|
||||
SetAttribute(domElement, AttrSecondPoint, secondPointId);
|
||||
|
||||
AddToCalculation(domElement);
|
||||
}
|
||||
|
@ -227,12 +227,12 @@ void VToolTriangle::RefreshDataInFile()
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrName, point->name());
|
||||
domElement.setAttribute(AttrMx, toMM(point->mx()));
|
||||
domElement.setAttribute(AttrMy, toMM(point->my()));
|
||||
domElement.setAttribute(AttrAxisP1, axisP1Id);
|
||||
domElement.setAttribute(AttrAxisP2, axisP2Id);
|
||||
domElement.setAttribute(AttrFirstPoint, firstPointId);
|
||||
domElement.setAttribute(AttrSecondPoint, secondPointId);
|
||||
SetAttribute(domElement, AttrName, point->name());
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrAxisP1, axisP1Id);
|
||||
SetAttribute(domElement, AttrAxisP2, axisP2Id);
|
||||
SetAttribute(domElement, AttrFirstPoint, firstPointId);
|
||||
SetAttribute(domElement, AttrSecondPoint, secondPointId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -93,12 +93,12 @@ void VNodeArc::AddToFile()
|
|||
{
|
||||
QDomElement domElement = doc->createElement(TagName);
|
||||
|
||||
AddAttribute(domElement, AttrId, id);
|
||||
AddAttribute(domElement, AttrType, ToolType);
|
||||
AddAttribute(domElement, AttrIdObject, idNode);
|
||||
SetAttribute(domElement, AttrId, id);
|
||||
SetAttribute(domElement, AttrType, ToolType);
|
||||
SetAttribute(domElement, AttrIdObject, idNode);
|
||||
if (idTool != 0)
|
||||
{
|
||||
AddAttribute(domElement, AttrIdTool, idTool);
|
||||
SetAttribute(domElement, AttrIdTool, idTool);
|
||||
}
|
||||
|
||||
AddToModeling(domElement);
|
||||
|
@ -109,10 +109,10 @@ void VNodeArc::RefreshDataInFile()
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrIdObject, idNode);
|
||||
SetAttribute(domElement, AttrIdObject, idNode);
|
||||
if (idTool != 0)
|
||||
{
|
||||
domElement.setAttribute(AttrIdTool, idTool);
|
||||
SetAttribute(domElement, AttrIdTool, idTool);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -105,14 +105,14 @@ void VNodePoint::AddToFile()
|
|||
const VPointF *point = VAbstractTool::data.GeometricObject<const VPointF *>(id);
|
||||
QDomElement domElement = doc->createElement(TagName);
|
||||
|
||||
AddAttribute(domElement, AttrId, id);
|
||||
AddAttribute(domElement, AttrType, ToolType);
|
||||
AddAttribute(domElement, AttrIdObject, idNode);
|
||||
AddAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
AddAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrId, id);
|
||||
SetAttribute(domElement, AttrType, ToolType);
|
||||
SetAttribute(domElement, AttrIdObject, idNode);
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
if (idTool != 0)
|
||||
{
|
||||
AddAttribute(domElement, AttrIdTool, idTool);
|
||||
SetAttribute(domElement, AttrIdTool, idTool);
|
||||
}
|
||||
|
||||
AddToModeling(domElement);
|
||||
|
@ -124,12 +124,12 @@ void VNodePoint::RefreshDataInFile()
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrIdObject, idNode);
|
||||
domElement.setAttribute(AttrMx, toMM(point->mx()));
|
||||
domElement.setAttribute(AttrMy, toMM(point->my()));
|
||||
SetAttribute(domElement, AttrIdObject, idNode);
|
||||
SetAttribute(domElement, AttrMx, toMM(point->mx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(point->my()));
|
||||
if (idTool != 0)
|
||||
{
|
||||
domElement.setAttribute(AttrIdTool, idTool);
|
||||
SetAttribute(domElement, AttrIdTool, idTool);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -172,8 +172,8 @@ void VNodePoint::UpdateNamePosition(qreal mx, qreal my)
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrMx, QString().setNum(toMM(mx)));
|
||||
domElement.setAttribute(AttrMy, QString().setNum(toMM(my)));
|
||||
SetAttribute(domElement, AttrMx, QString().setNum(toMM(mx)));
|
||||
SetAttribute(domElement, AttrMy, QString().setNum(toMM(my)));
|
||||
emit toolhaveChange();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,12 +96,12 @@ void VNodeSpline::AddToFile()
|
|||
{
|
||||
QDomElement domElement = doc->createElement(TagName);
|
||||
|
||||
AddAttribute(domElement, AttrId, id);
|
||||
AddAttribute(domElement, AttrType, ToolType);
|
||||
AddAttribute(domElement, AttrIdObject, idNode);
|
||||
SetAttribute(domElement, AttrId, id);
|
||||
SetAttribute(domElement, AttrType, ToolType);
|
||||
SetAttribute(domElement, AttrIdObject, idNode);
|
||||
if (idTool != 0)
|
||||
{
|
||||
AddAttribute(domElement, AttrIdTool, idTool);
|
||||
SetAttribute(domElement, AttrIdTool, idTool);
|
||||
}
|
||||
|
||||
AddToModeling(domElement);
|
||||
|
@ -112,10 +112,10 @@ void VNodeSpline::RefreshDataInFile()
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrIdObject, QString().setNum(idNode));
|
||||
SetAttribute(domElement, AttrIdObject, QString().setNum(idNode));
|
||||
if (idTool != 0)
|
||||
{
|
||||
domElement.setAttribute(AttrIdTool, idTool);
|
||||
SetAttribute(domElement, AttrIdTool, idTool);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,12 +100,12 @@ void VNodeSplinePath::AddToFile()
|
|||
{
|
||||
QDomElement domElement = doc->createElement(TagName);
|
||||
|
||||
AddAttribute(domElement, AttrId, id);
|
||||
AddAttribute(domElement, AttrType, ToolType);
|
||||
AddAttribute(domElement, AttrIdObject, idNode);
|
||||
SetAttribute(domElement, AttrId, id);
|
||||
SetAttribute(domElement, AttrType, ToolType);
|
||||
SetAttribute(domElement, AttrIdObject, idNode);
|
||||
if (idTool != 0)
|
||||
{
|
||||
AddAttribute(domElement, AttrIdTool, idTool);
|
||||
SetAttribute(domElement, AttrIdTool, idTool);
|
||||
}
|
||||
|
||||
AddToModeling(domElement);
|
||||
|
@ -116,10 +116,10 @@ void VNodeSplinePath::RefreshDataInFile()
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrIdObject, QString().setNum(idNode));
|
||||
SetAttribute(domElement, AttrIdObject, QString().setNum(idNode));
|
||||
if (idTool != 0)
|
||||
{
|
||||
domElement.setAttribute(AttrIdTool, idTool);
|
||||
SetAttribute(domElement, AttrIdTool, idTool);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -314,23 +314,19 @@ protected:
|
|||
* @param name
|
||||
* @param value
|
||||
*/
|
||||
void AddAttribute(QDomElement &domElement, const QString &name, const T &value)
|
||||
void SetAttribute(QDomElement &domElement, const QString &name, const T &value)
|
||||
{
|
||||
QDomAttr domAttr = doc->createAttribute(name);
|
||||
QString val = QString().setNum(value);
|
||||
val = val.replace(",", ".");
|
||||
domAttr.setValue(val);
|
||||
domElement.setAttributeNode(domAttr);
|
||||
domElement.setAttribute(name, val);
|
||||
}
|
||||
private:
|
||||
Q_DISABLE_COPY(VAbstractTool)
|
||||
};
|
||||
|
||||
template <>
|
||||
inline void VAbstractTool::AddAttribute<QString>(QDomElement &domElement, const QString &name, const QString &value)
|
||||
inline void VAbstractTool::SetAttribute<QString>(QDomElement &domElement, const QString &name, const QString &value)
|
||||
{
|
||||
QDomAttr domAttr = doc->createAttribute(name);
|
||||
domAttr.setValue(value);
|
||||
domElement.setAttributeNode(domAttr);
|
||||
domElement.setAttribute(name, value);
|
||||
}
|
||||
#endif // VABSTRACTTOOL_H
|
||||
|
|
|
@ -176,10 +176,10 @@ void VToolDetail::FullUpdateFromGui(int result)
|
|||
if (domElement.isElement())
|
||||
{
|
||||
VDetail det = dialogDetail->getDetails();
|
||||
domElement.setAttribute(AttrName, det.getName());
|
||||
domElement.setAttribute(AttrSupplement, QString().setNum(det.getSupplement()));
|
||||
domElement.setAttribute(AttrClosed, QString().setNum(det.getClosed()));
|
||||
domElement.setAttribute(AttrWidth, QString().setNum(det.getWidth()));
|
||||
SetAttribute(domElement, AttrName, det.getName());
|
||||
SetAttribute(domElement, AttrSupplement, QString().setNum(det.getSupplement()));
|
||||
SetAttribute(domElement, AttrClosed, QString().setNum(det.getClosed()));
|
||||
SetAttribute(domElement, AttrWidth, QString().setNum(det.getWidth()));
|
||||
RemoveAllChild(domElement);
|
||||
for (ptrdiff_t i = 0; i < det.CountNode(); ++i)
|
||||
{
|
||||
|
@ -207,13 +207,13 @@ void VToolDetail::AddToFile()
|
|||
VDetail detail = VAbstractTool::data.GetDetail(id);
|
||||
QDomElement domElement = doc->createElement(TagName);
|
||||
|
||||
AddAttribute(domElement, AttrId, id);
|
||||
AddAttribute(domElement, AttrName, detail.getName());
|
||||
AddAttribute(domElement, AttrMx, toMM(detail.getMx()));
|
||||
AddAttribute(domElement, AttrMy, toMM(detail.getMy()));
|
||||
AddAttribute(domElement, AttrSupplement, detail.getSupplement());
|
||||
AddAttribute(domElement, AttrClosed, detail.getClosed());
|
||||
AddAttribute(domElement, AttrWidth, detail.getWidth());
|
||||
SetAttribute(domElement, AttrId, id);
|
||||
SetAttribute(domElement, AttrName, detail.getName());
|
||||
SetAttribute(domElement, AttrMx, toMM(detail.getMx()));
|
||||
SetAttribute(domElement, AttrMy, toMM(detail.getMy()));
|
||||
SetAttribute(domElement, AttrSupplement, detail.getSupplement());
|
||||
SetAttribute(domElement, AttrClosed, detail.getClosed());
|
||||
SetAttribute(domElement, AttrWidth, detail.getWidth());
|
||||
|
||||
for (ptrdiff_t i = 0; i < detail.CountNode(); ++i)
|
||||
{
|
||||
|
@ -234,10 +234,10 @@ void VToolDetail::RefreshDataInFile()
|
|||
if (domElement.isElement())
|
||||
{
|
||||
VDetail det = VAbstractTool::data.GetDetail(id);
|
||||
domElement.setAttribute(AttrName, det.getName());
|
||||
domElement.setAttribute(AttrSupplement, QString().setNum(det.getSupplement()));
|
||||
domElement.setAttribute(AttrClosed, QString().setNum(det.getClosed()));
|
||||
domElement.setAttribute(AttrWidth, QString().setNum(det.getWidth()));
|
||||
SetAttribute(domElement, AttrName, det.getName());
|
||||
SetAttribute(domElement, AttrSupplement, QString().setNum(det.getSupplement()));
|
||||
SetAttribute(domElement, AttrClosed, QString().setNum(det.getClosed()));
|
||||
SetAttribute(domElement, AttrWidth, QString().setNum(det.getWidth()));
|
||||
RemoveAllChild(domElement);
|
||||
for (ptrdiff_t i = 0; i < det.CountNode(); ++i)
|
||||
{
|
||||
|
@ -256,8 +256,8 @@ QVariant VToolDetail::itemChange(QGraphicsItem::GraphicsItemChange change, const
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrMx, QString().setNum(toMM(newPos.x())));
|
||||
domElement.setAttribute(AttrMy, QString().setNum(toMM(newPos.y())));
|
||||
SetAttribute(domElement, AttrMx, QString().setNum(toMM(newPos.x())));
|
||||
SetAttribute(domElement, AttrMy, QString().setNum(toMM(newPos.y())));
|
||||
|
||||
QList<QGraphicsView*> list = this->scene()->views();
|
||||
VAbstractTool::NewSceneRect(this->scene(), list[0]);
|
||||
|
@ -346,30 +346,30 @@ void VToolDetail::AddNode(QDomElement &domElement, const VNodeDetail &node)
|
|||
{
|
||||
QDomElement nod = doc->createElement(TagNode);
|
||||
|
||||
AddAttribute(nod, AttrIdObject, node.getId());
|
||||
AddAttribute(nod, AttrMx, toMM(node.getMx()));
|
||||
AddAttribute(nod, AttrMy, toMM(node.getMy()));
|
||||
SetAttribute(nod, AttrIdObject, node.getId());
|
||||
SetAttribute(nod, AttrMx, toMM(node.getMx()));
|
||||
SetAttribute(nod, AttrMy, toMM(node.getMy()));
|
||||
if (node.getTypeNode() == NodeDetail::Contour)
|
||||
{
|
||||
AddAttribute(nod, AttrNodeType, NodeTypeContour);
|
||||
SetAttribute(nod, AttrNodeType, NodeTypeContour);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddAttribute(nod, AttrNodeType, NodeTypeModeling);
|
||||
SetAttribute(nod, AttrNodeType, NodeTypeModeling);
|
||||
}
|
||||
switch (node.getTypeTool())
|
||||
{
|
||||
case (Tool::NodeArc):
|
||||
AddAttribute(nod, AttrType, QStringLiteral("NodeArc"));
|
||||
SetAttribute(nod, AttrType, QStringLiteral("NodeArc"));
|
||||
break;
|
||||
case (Tool::NodePoint):
|
||||
AddAttribute(nod, AttrType, QStringLiteral("NodePoint"));
|
||||
SetAttribute(nod, AttrType, QStringLiteral("NodePoint"));
|
||||
break;
|
||||
case (Tool::NodeSpline):
|
||||
AddAttribute(nod, AttrType, QStringLiteral("NodeSpline"));
|
||||
SetAttribute(nod, AttrType, QStringLiteral("NodeSpline"));
|
||||
break;
|
||||
case (Tool::NodeSplinePath):
|
||||
AddAttribute(nod, AttrType, QStringLiteral("NodeSplinePath"));
|
||||
SetAttribute(nod, AttrType, QStringLiteral("NodeSplinePath"));
|
||||
break;
|
||||
default:
|
||||
qWarning()<<"May be wrong tool type!!! Ignoring."<<Q_FUNC_INFO;
|
||||
|
|
|
@ -670,10 +670,10 @@ void VToolUnionDetails::AddToFile()
|
|||
{
|
||||
QDomElement domElement = doc->createElement(TagName);
|
||||
|
||||
AddAttribute(domElement, AttrId, id);
|
||||
AddAttribute(domElement, AttrType, ToolType);
|
||||
AddAttribute(domElement, AttrIndexD1, indexD1);
|
||||
AddAttribute(domElement, AttrIndexD2, indexD2);
|
||||
SetAttribute(domElement, AttrId, id);
|
||||
SetAttribute(domElement, AttrType, ToolType);
|
||||
SetAttribute(domElement, AttrIndexD1, indexD1);
|
||||
SetAttribute(domElement, AttrIndexD2, indexD2);
|
||||
|
||||
AddDetail(domElement, d1);
|
||||
AddDetail(domElement, d2);
|
||||
|
@ -686,8 +686,8 @@ void VToolUnionDetails::RefreshDataInFile()
|
|||
QDomElement domElement = doc->elementById(QString().setNum(id));
|
||||
if (domElement.isElement())
|
||||
{
|
||||
domElement.setAttribute(AttrIndexD1, indexD1);
|
||||
domElement.setAttribute(AttrIndexD2, indexD2);
|
||||
SetAttribute(domElement, AttrIndexD1, indexD1);
|
||||
SetAttribute(domElement, AttrIndexD2, indexD2);
|
||||
|
||||
QDomNode domNode = domElement.firstChild();
|
||||
domNode = UpdateDetail(domNode, d1);
|
||||
|
@ -711,30 +711,30 @@ void VToolUnionDetails::AddNode(QDomElement &domElement, const VNodeDetail &node
|
|||
{
|
||||
QDomElement nod = doc->createElement(TagNode);
|
||||
|
||||
AddAttribute(nod, AttrIdObject, node.getId());
|
||||
AddAttribute(nod, AttrMx, toMM(node.getMx()));
|
||||
AddAttribute(nod, AttrMy, toMM(node.getMy()));
|
||||
SetAttribute(nod, AttrIdObject, node.getId());
|
||||
SetAttribute(nod, AttrMx, toMM(node.getMx()));
|
||||
SetAttribute(nod, AttrMy, toMM(node.getMy()));
|
||||
if (node.getTypeNode() == NodeDetail::Contour)
|
||||
{
|
||||
AddAttribute(nod, AttrNodeType, NodeTypeContour);
|
||||
SetAttribute(nod, AttrNodeType, NodeTypeContour);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddAttribute(nod, AttrNodeType, NodeTypeModeling);
|
||||
SetAttribute(nod, AttrNodeType, NodeTypeModeling);
|
||||
}
|
||||
switch (node.getTypeTool())
|
||||
{
|
||||
case (Tool::NodeArc):
|
||||
AddAttribute(nod, AttrType, QStringLiteral("NodeArc"));
|
||||
SetAttribute(nod, AttrType, QStringLiteral("NodeArc"));
|
||||
break;
|
||||
case (Tool::NodePoint):
|
||||
AddAttribute(nod, AttrType, QStringLiteral("NodePoint"));
|
||||
SetAttribute(nod, AttrType, QStringLiteral("NodePoint"));
|
||||
break;
|
||||
case (Tool::NodeSpline):
|
||||
AddAttribute(nod, AttrType, QStringLiteral("NodeSpline"));
|
||||
SetAttribute(nod, AttrType, QStringLiteral("NodeSpline"));
|
||||
break;
|
||||
case (Tool::NodeSplinePath):
|
||||
AddAttribute(nod, AttrType, QStringLiteral("NodeSplinePath"));
|
||||
SetAttribute(nod, AttrType, QStringLiteral("NodeSplinePath"));
|
||||
break;
|
||||
default:
|
||||
qWarning()<<"May be wrong tool type!!! Ignoring."<<Q_FUNC_INFO;
|
||||
|
|
Loading…
Reference in New Issue
Block a user