27 QDomDocument doc = elem.ownerDocument();
29 QDomElement elemDataProperties = doc.createElement( QStringLiteral(
"data" ) );
32 elemDataProperties.setAttribute( QStringLiteral(
"height" ), mHeight );
33 elemDataProperties.setAttribute( QStringLiteral(
"extrusion-height" ), mExtrusionHeight );
34 elemDataProperties.setAttribute( QStringLiteral(
"width" ), mWidth );
35 elem.appendChild( elemDataProperties );
37 QDomElement elemMaterial = doc.createElement( QStringLiteral(
"material" ) );
39 elem.appendChild( elemMaterial );
46 QDomElement elemDataProperties = elem.firstChildElement( QStringLiteral(
"data" ) );
49 mHeight = elemDataProperties.attribute( QStringLiteral(
"height" ) ).toFloat();
50 mExtrusionHeight = elemDataProperties.attribute( QStringLiteral(
"extrusion-height" ) ).toFloat();
51 mWidth = elemDataProperties.attribute( QStringLiteral(
"width" ) ).toFloat();
53 QDomElement elemMaterial = elem.firstChildElement( QStringLiteral(
"material" ) );
54 mMaterial.
readXml( elemMaterial );
The class is used as a container of context for various read/write operations on other objects...
static AltitudeBinding altBindingFromString(const QString &str)
Converts a string to a value from AltitudeBinding enum.
QgsLine3DSymbol()=default
Constructor for QgsLine3DSymbol.
3 Abstract base class for 3D symbols that are used by VectorLayer3DRenderer objects.
QgsAbstract3DSymbol * clone() const override
Returns a new instance of the symbol with the same settings.
void writeXml(QDomElement &elem, const QgsReadWriteContext &context) const override
Writes symbol configuration to the given DOM element.
void readXml(const QDomElement &elem)
Reads settings from a DOM element.
void readXml(const QDomElement &elem, const QgsReadWriteContext &context) override
Reads symbol configuration from the given DOM element.
static QString altBindingToString(AltitudeBinding altBind)
Converts a value from AltitudeBinding enum to a string.
void writeXml(QDomElement &elem) const
Writes settings to a DOM element.
static AltitudeClamping altClampingFromString(const QString &str)
Converts a string to a value from AltitudeClamping enum.
static QString altClampingToString(AltitudeClamping altClamp)
Converts a value from AltitudeClamping enum to a string.