33 QDomElement element = document.createElement( QStringLiteral(
"elevation" ) );
36 parentElement.appendChild( element );
42 const QDomElement elevationElement = element.firstChildElement( QStringLiteral(
"elevation" ) ).toElement();
50 std::unique_ptr< QgsTiledSceneLayerElevationProperties > res = std::make_unique< QgsTiledSceneLayerElevationProperties >(
nullptr );
51 res->copyCommonProperties(
this );
58 QStringList properties;
59 properties << tr(
"Scale: %1" ).arg(
mZScale );
60 properties << tr(
"Offset: %1" ).arg(
mZOffset );
61 return QStringLiteral(
"<ul><li>%1</li></ul>" ).arg( properties.join( QLatin1String(
"</li><li>" ) ) );
66 if (
QgsTiledSceneLayer *tiledSceneLayer = qobject_cast< QgsTiledSceneLayer * >( layer ) )
QgsRange which stores a range of double values.
bool isInfinite() const
Returns true if the range consists of all possible values.
Base class for storage of map layer elevation properties.
void writeCommonProperties(QDomElement &element, QDomDocument &doc, const QgsReadWriteContext &context)
Writes common class properties to a DOM element, to be used later with readXml().
void readCommonProperties(const QDomElement &element, const QgsReadWriteContext &context)
Reads common class properties from a DOM element previously written by writeXml().
Base class for all map layer types.
bool isEmpty() const
Returns true if the range is empty, ie the lower bound equals (or exceeds) the upper bound and either...
The class is used as a container of context for various read/write operations on other objects.
Base class for data providers for QgsTiledSceneLayer.
Tiled scene layer specific subclass of QgsMapLayerElevationProperties.
QString htmlSummary() const override
Returns a HTML formatted summary of the properties.
QgsTiledSceneLayerElevationProperties(QObject *parent)
Constructor for QgsTiledSceneLayerElevationProperties, with the specified parent object.
bool hasElevation() const override
Returns true if the layer has an elevation or z component.
QgsDoubleRange calculateZRange(QgsMapLayer *layer) const override
Attempts to calculate the overall elevation or z range for the specified layer, using the settings de...
bool readXml(const QDomElement &element, const QgsReadWriteContext &context) override
Reads the elevation properties from a DOM element previously written by writeXml().
QgsTiledSceneLayerElevationProperties * clone() const override
Creates a clone of the properties.
QDomElement writeXml(QDomElement &element, QDomDocument &doc, const QgsReadWriteContext &context) override
Writes the properties to a DOM element, to be used later with readXml().
Represents a map layer supporting display of tiled scene objects.