22#include "moc_qgstiledscenelayerelevationproperties.cpp"
36 QDomElement element = document.createElement( QStringLiteral(
"elevation" ) );
39 parentElement.appendChild( element );
45 const QDomElement elevationElement = element.firstChildElement( QStringLiteral(
"elevation" ) ).toElement();
53 auto res = std::make_unique< QgsTiledSceneLayerElevationProperties >(
nullptr );
54 res->copyCommonProperties(
this );
61 QStringList properties;
62 properties << tr(
"Scale: %1" ).arg(
mZScale );
63 properties << tr(
"Offset: %1" ).arg(
mZOffset );
64 return QStringLiteral(
"<ul><li>%1</li></ul>" ).arg( properties.join( QLatin1String(
"</li><li>" ) ) );
69 if (
QgsTiledSceneLayer *tiledSceneLayer = qobject_cast< QgsTiledSceneLayer * >( layer ) )
90 return {range.
lower() };
QgsRange which stores a range of double values.
bool isInfinite() const
Returns true if the range consists of all possible values.
void writeCommonProperties(QDomElement &element, QDomDocument &doc, const QgsReadWriteContext &context)
Writes common class properties to a DOM element, to be used later with readXml().
QgsMapLayerElevationProperties(QObject *parent)
Constructor for QgsMapLayerElevationProperties, with the specified parent object.
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.
T lower() const
Returns the lower bound of the range.
T upper() const
Returns the upper bound of the range.
bool isEmpty() const
Returns true if the range is empty, ie the lower bound equals (or exceeds) the upper bound and either...
A container for the context for various read/write operations on objects.
Base class for data providers for QgsTiledSceneLayer.
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.
QList< double > significantZValues(QgsMapLayer *layer) const override
Returns a list of significant elevation/z-values for the specified layer, using the settings defined ...
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.