QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
24 QDomDocument doc = elem.ownerDocument();
26 QDomElement elemTiling = doc.createElement( QStringLiteral(
"vector-layer-3d-tiling" ) );
27 elemTiling.setAttribute( QStringLiteral(
"zoom-levels-count" ), mZoomLevelsCount );
28 elemTiling.setAttribute( QStringLiteral(
"show-bounding-boxes" ), mShowBoundingBoxes ? QStringLiteral(
"1" ) : QStringLiteral(
"0" ) );
29 elem.appendChild( elemTiling );
34 QDomElement elemTiling = elem.firstChildElement( QStringLiteral(
"vector-layer-3d-tiling" ) );
35 if ( !elemTiling.isNull() )
37 mZoomLevelsCount = elemTiling.attribute( QStringLiteral(
"zoom-levels-count" ) ).toInt();
38 mShowBoundingBoxes = elemTiling.attribute( QStringLiteral(
"show-bounding-boxes" ) ).toInt();
55 return qobject_cast<QgsVectorLayer *>( mLayerRef.
layer );
60 r->mLayerRef = mLayerRef;
61 r->mTilingSettings = mTilingSettings;
67 elem.setAttribute( QStringLiteral(
"layer" ), mLayerRef.
layerId );
74 mLayerRef =
QgsMapLayerRef( elem.attribute( QStringLiteral(
"layer" ) ) );
75 mTilingSettings.
readXml( elem );
_LayerRef< QgsMapLayer > QgsMapLayerRef
Q_INVOKABLE QgsMapLayer * mapLayer(const QString &layerId) const
Retrieve a pointer to a registered layer by layer ID.
void copyBaseProperties(QgsAbstractVectorLayer3DRenderer *r) const
Copies common properties of this object to another object.
QPointer< TYPE > layer
Weak pointer to map layer.
QgsAbstractVectorLayer3DRenderer()
void readXmlBaseProperties(const QDomElement &elem, const QgsReadWriteContext &context)
Reads common properties of this object from DOM element.
QString layerId
Original layer ID.
void setLayer(TYPE *l)
Sets the reference to point to a specified layer.
QgsVectorLayer * layer() const
Returns vector layer associated with the renderer.
void readXml(const QDomElement &elem)
Reads content of the object from XML.
void writeXml(QDomElement &elem) const
Writes content of the object to XML.
void setLayer(QgsVectorLayer *layer)
Sets vector layer associated with the renderer.
void writeXmlBaseProperties(QDomElement &elem, const QgsReadWriteContext &context) const
Writes common properties of this object to DOM element.
void resolveReferences(const QgsProject &project) override
Resolves references to other objects - second phase of loading - after readXml()