QGIS API Documentation  3.22.4-Białowieża (ce8e65e95e)
Public Types | Signals | Public Member Functions | List of all members
QgsMapLayerElevationProperties Class Referenceabstract

Base class for storage of map layer elevation properties. More...

#include <qgsmaplayerelevationproperties.h>

Inheritance diagram for QgsMapLayerElevationProperties:
Inheritance graph
[legend]

Public Types

enum  Flag { FlagDontInvalidateCachedRendersWhenRangeChanges = 1 }
 Flags attached to the elevation property. More...
 

Signals

void changed ()
 Emitted when the elevation properties have changed. More...
 

Public Member Functions

 QgsMapLayerElevationProperties (QObject *parent)
 Constructor for QgsMapLayerElevationProperties, with the specified parent object. More...
 
virtual QgsDoubleRange calculateZRange (QgsMapLayer *layer) const
 Attempts to calculate the overall elevation or z range for the specified layer, using the settings defined by this elevation properties object. More...
 
virtual QgsMapLayerElevationProperties::Flags flags () const
 Returns flags associated to the elevation properties. More...
 
virtual bool hasElevation () const
 Returns true if the layer has an elevation or z component. More...
 
virtual bool isVisibleInZRange (const QgsDoubleRange &range) const
 Returns true if the layer should be visible and rendered for the specified z range. More...
 
virtual bool readXml (const QDomElement &element, const QgsReadWriteContext &context)=0
 Reads the elevation properties from a DOM element previously written by writeXml(). More...
 
virtual QDomElement writeXml (QDomElement &element, QDomDocument &doc, const QgsReadWriteContext &context)=0
 Writes the properties to a DOM element, to be used later with readXml(). More...
 

Detailed Description

Base class for storage of map layer elevation properties.

QgsMapLayerElevationProperties exposes user-configurable settings for controlling how an individual QgsMapLayer behaves with relation to z values or elevations.

Since
QGIS 3.18

Definition at line 40 of file qgsmaplayerelevationproperties.h.

Member Enumeration Documentation

◆ Flag

Flags attached to the elevation property.

Enumerator
FlagDontInvalidateCachedRendersWhenRangeChanges 

Any cached rendering will not be invalidated when z range context is modified.

Definition at line 66 of file qgsmaplayerelevationproperties.h.

Constructor & Destructor Documentation

◆ QgsMapLayerElevationProperties()

QgsMapLayerElevationProperties::QgsMapLayerElevationProperties ( QObject *  parent)

Constructor for QgsMapLayerElevationProperties, with the specified parent object.

Definition at line 20 of file qgsmaplayerelevationproperties.cpp.

Member Function Documentation

◆ calculateZRange()

QgsDoubleRange QgsMapLayerElevationProperties::calculateZRange ( QgsMapLayer layer) const
virtual

Attempts to calculate the overall elevation or z range for the specified layer, using the settings defined by this elevation properties object.

May return an infinite range if the extent could not be calculated.

Reimplemented in QgsPointCloudLayerElevationProperties.

Definition at line 35 of file qgsmaplayerelevationproperties.cpp.

◆ changed

void QgsMapLayerElevationProperties::changed ( )
signal

Emitted when the elevation properties have changed.

◆ flags()

virtual QgsMapLayerElevationProperties::Flags QgsMapLayerElevationProperties::flags ( ) const
inlinevirtual

Returns flags associated to the elevation properties.

Definition at line 104 of file qgsmaplayerelevationproperties.h.

◆ hasElevation()

bool QgsMapLayerElevationProperties::hasElevation ( ) const
virtual

Returns true if the layer has an elevation or z component.

Reimplemented in QgsPointCloudLayerElevationProperties.

Definition at line 25 of file qgsmaplayerelevationproperties.cpp.

◆ isVisibleInZRange()

bool QgsMapLayerElevationProperties::isVisibleInZRange ( const QgsDoubleRange range) const
virtual

Returns true if the layer should be visible and rendered for the specified z range.

Reimplemented in QgsPointCloudLayerElevationProperties.

Definition at line 30 of file qgsmaplayerelevationproperties.cpp.

◆ readXml()

virtual bool QgsMapLayerElevationProperties::readXml ( const QDomElement &  element,
const QgsReadWriteContext context 
)
pure virtual

Reads the elevation properties from a DOM element previously written by writeXml().

See also
writeXml()

Implemented in QgsPointCloudLayerElevationProperties.

◆ writeXml()

virtual QDomElement QgsMapLayerElevationProperties::writeXml ( QDomElement &  element,
QDomDocument &  doc,
const QgsReadWriteContext context 
)
pure virtual

Writes the properties to a DOM element, to be used later with readXml().

See also
readXml()

Implemented in QgsPointCloudLayerElevationProperties.


The documentation for this class was generated from the following files: