29 QDomDocument doc = elem.ownerDocument();
31 QDomElement elemDataProperties = doc.createElement( QStringLiteral(
"data" ) );
34 elemDataProperties.setAttribute( QStringLiteral(
"height" ), mHeight );
35 elemDataProperties.setAttribute( QStringLiteral(
"extrusion-height" ), mExtrusionHeight );
36 elemDataProperties.setAttribute( QStringLiteral(
"simple-lines" ), mRenderAsSimpleLines ? QStringLiteral(
"1" ) : QStringLiteral(
"0" ) );
37 elemDataProperties.setAttribute( QStringLiteral(
"width" ), mWidth );
38 elem.appendChild( elemDataProperties );
40 QDomElement elemMaterial = doc.createElement( QStringLiteral(
"material" ) );
42 elem.appendChild( elemMaterial );
49 QDomElement elemDataProperties = elem.firstChildElement( QStringLiteral(
"data" ) );
52 mHeight = elemDataProperties.attribute( QStringLiteral(
"height" ) ).toFloat();
53 mExtrusionHeight = elemDataProperties.attribute( QStringLiteral(
"extrusion-height" ) ).toFloat();
54 mWidth = elemDataProperties.attribute( QStringLiteral(
"width" ) ).toFloat();
55 mRenderAsSimpleLines = elemDataProperties.attribute( QStringLiteral(
"simple-lines" ), QStringLiteral(
"0" ) ).toInt();
57 QDomElement elemMaterial = elem.firstChildElement( QStringLiteral(
"material" ) );
58 mMaterial.
readXml( elemMaterial );