copy all toXML() from master commit 4b82c3a0c4 into the current branch, because the new concept will be used only for user properties

This commit is contained in:
Martin Marmsoler
2021-03-07 10:09:45 +01:00
parent 058824f29a
commit 5d3710c4b2
26 changed files with 267 additions and 294 deletions

View File

@@ -130,19 +130,17 @@ bool PartPolygon::fromXmlPriv(const QDomElement &qde)
Export this polygin in xml
@param e: properties get part of this DomElement
*/
void PartPolygon::toXmlPriv(QDomElement& e) const
void PartPolygon::toXmlPriv(QDomElement& xml_element) const
{
int i = 1;
foreach(QPointF point, m_polygon) {
point = mapToScene(point);
e.appendChild(QETXML::createXmlProperty(QString("x%1").arg(i), point.x()));
e.appendChild(QETXML::createXmlProperty(QString("y%1").arg(i), point.y()));
++ i;
}
e.appendChild(QETXML::createXmlProperty("closed", m_closed));
stylesToXml(e);
int i = 1;
foreach(QPointF point, m_polygon) {
point = mapToScene(point);
xml_element.setAttribute(QString("x%1").arg(i), QString("%1").arg(point.x()));
xml_element.setAttribute(QString("y%1").arg(i), QString("%1").arg(point.y()));
++ i;
}
if (!m_closed) xml_element.setAttribute("closed", "false");
stylesToXml(xml_element);
}
bool PartPolygon::valideXml(QDomElement& element) {