QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
|
Base class for storage of map layer elevation properties. More...
#include <qgsmaplayerelevationproperties.h>
Public Types | |
enum | Flag { FlagDontInvalidateCachedRendersWhenRangeChanges = 1 } |
Flags attached to the elevation property. More... | |
enum | Property { ZOffset , ExtrusionHeight } |
Data definable properties. More... | |
Signals | |
void | changed () |
Emitted when any of the elevation properties have changed. More... | |
void | profileGenerationPropertyChanged () |
Emitted when any of the elevation properties which relate solely to generation of elevation profiles have changed. More... | |
void | profileRenderingPropertyChanged () |
Emitted when any of the elevation properties which relate solely to presentation of elevation results have changed. More... | |
void | zOffsetChanged () |
Emitted when the z offset changes. More... | |
void | zScaleChanged () |
Emitted when the z scale changes. 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 * | clone () const =0 |
Creates a clone of the properties. More... | |
QgsPropertyCollection & | dataDefinedProperties () |
Returns a reference to the object's property collection, used for data defined overrides. More... | |
const QgsPropertyCollection & | dataDefinedProperties () const |
Returns a reference to the object's property collection, used for data defined overrides. 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 QString | htmlSummary () const |
Returns a HTML formatted summary of the properties. 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... | |
void | setDataDefinedProperties (const QgsPropertyCollection &collection) |
Sets the object's property collection, used for data defined overrides. More... | |
virtual void | setDefaultsFromLayer (QgsMapLayer *layer) |
Sets default properties based on sensible choices for the given map layer. More... | |
void | setZOffset (double offset) |
Sets the z offset, which is a fixed offset amount which will be added to z values from the layer. More... | |
void | setZScale (double scale) |
Sets the z scale, which is a scaling factor which will be applied to z values from the layer. More... | |
virtual bool | showByDefaultInElevationProfilePlots () const |
Returns true if the layer should be visible by default in newly created elevation profile plots. 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... | |
double | zOffset () const |
Returns the z offset, which is a fixed offset amount which should be added to z values from the layer. More... | |
double | zScale () const |
Returns the z scale, which is a scaling factor which should be applied to z values from the layer. More... | |
Static Public Member Functions | |
static QgsPropertiesDefinition | propertyDefinitions () |
Returns the definitions for data defined properties available for use in elevation properties. More... | |
Protected Member Functions | |
void | copyCommonProperties (const QgsMapLayerElevationProperties *other) |
Copies common properties from another object. More... | |
void | readCommonProperties (const QDomElement &element, const QgsReadWriteContext &context) |
Reads common class properties from a DOM element previously written by writeXml(). More... | |
void | writeCommonProperties (QDomElement &element, QDomDocument &doc, const QgsReadWriteContext &context) |
Writes common class properties to a DOM element, to be used later with readXml(). More... | |
Protected Attributes | |
QgsPropertyCollection | mDataDefinedProperties |
Property collection for data defined elevation settings. More... | |
double | mZOffset = 0.0 |
Z offset. More... | |
double | mZScale = 1.0 |
Z scale. More... | |
Static Protected Attributes | |
static QgsPropertiesDefinition | sPropertyDefinitions |
Property definitions. More... | |
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.
Definition at line 44 of file qgsmaplayerelevationproperties.h.
Flags attached to the elevation property.
Enumerator | |
---|---|
FlagDontInvalidateCachedRendersWhenRangeChanges | Any cached rendering will not be invalidated when z range context is modified. |
Definition at line 95 of file qgsmaplayerelevationproperties.h.
Data definable properties.
Enumerator | |
---|---|
ZOffset | |
ExtrusionHeight | Z offset. Extrusion height |
Definition at line 86 of file qgsmaplayerelevationproperties.h.
QgsMapLayerElevationProperties::QgsMapLayerElevationProperties | ( | QObject * | parent | ) |
Constructor for QgsMapLayerElevationProperties, with the specified parent object.
Definition at line 24 of file qgsmaplayerelevationproperties.cpp.
|
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 QgsMeshLayerElevationProperties, QgsPointCloudLayerElevationProperties, QgsRasterLayerElevationProperties, and QgsVectorLayerElevationProperties.
Definition at line 76 of file qgsmaplayerelevationproperties.cpp.
|
signal |
Emitted when any of the elevation properties have changed.
See renderingPropertyChanged() and profileGenerationPropertyChanged() for more fine-grained signals.
|
pure virtual |
Creates a clone of the properties.
Implemented in QgsMeshLayerElevationProperties, QgsPointCloudLayerElevationProperties, QgsRasterLayerElevationProperties, and QgsVectorLayerElevationProperties.
|
protected |
Copies common properties from another object.
Definition at line 64 of file qgsmaplayerelevationproperties.cpp.
|
inline |
Returns a reference to the object's property collection, used for data defined overrides.
Definition at line 226 of file qgsmaplayerelevationproperties.h.
|
inline |
Returns a reference to the object's property collection, used for data defined overrides.
Definition at line 235 of file qgsmaplayerelevationproperties.h.
|
inlinevirtual |
Returns flags associated to the elevation properties.
Definition at line 154 of file qgsmaplayerelevationproperties.h.
|
virtual |
Returns true
if the layer has an elevation or z component.
Reimplemented in QgsMeshLayerElevationProperties, QgsPointCloudLayerElevationProperties, QgsRasterLayerElevationProperties, and QgsVectorLayerElevationProperties.
Definition at line 29 of file qgsmaplayerelevationproperties.cpp.
|
virtual |
Returns a HTML formatted summary of the properties.
Reimplemented in QgsMeshLayerElevationProperties, QgsPointCloudLayerElevationProperties, QgsRasterLayerElevationProperties, and QgsVectorLayerElevationProperties.
Definition at line 39 of file qgsmaplayerelevationproperties.cpp.
|
virtual |
Returns true
if the layer should be visible and rendered for the specified z range.
Reimplemented in QgsMeshLayerElevationProperties, QgsPointCloudLayerElevationProperties, QgsRasterLayerElevationProperties, and QgsVectorLayerElevationProperties.
Definition at line 71 of file qgsmaplayerelevationproperties.cpp.
|
signal |
Emitted when any of the elevation properties which relate solely to generation of elevation profiles have changed.
|
signal |
Emitted when any of the elevation properties which relate solely to presentation of elevation results have changed.
|
static |
Returns the definitions for data defined properties available for use in elevation properties.
Definition at line 118 of file qgsmaplayerelevationproperties.cpp.
|
protected |
Reads common class properties from a DOM element previously written by writeXml().
Definition at line 54 of file qgsmaplayerelevationproperties.cpp.
|
pure virtual |
Reads the elevation properties from a DOM element previously written by writeXml().
Implemented in QgsMeshLayerElevationProperties, QgsPointCloudLayerElevationProperties, QgsRasterLayerElevationProperties, and QgsVectorLayerElevationProperties.
void QgsMapLayerElevationProperties::setDataDefinedProperties | ( | const QgsPropertyCollection & | collection | ) |
Sets the object's property collection, used for data defined overrides.
Any existing properties will be discarded.
Definition at line 108 of file qgsmaplayerelevationproperties.cpp.
|
virtual |
Sets default properties based on sensible choices for the given map layer.
Reimplemented in QgsVectorLayerElevationProperties.
Definition at line 34 of file qgsmaplayerelevationproperties.cpp.
void QgsMapLayerElevationProperties::setZOffset | ( | double | offset | ) |
Sets the z offset, which is a fixed offset amount which will be added to z values from the layer.
Definition at line 86 of file qgsmaplayerelevationproperties.cpp.
void QgsMapLayerElevationProperties::setZScale | ( | double | scale | ) |
Sets the z scale, which is a scaling factor which will be applied to z values from the layer.
This can be used to correct or manually adjust for incorrect elevation values in a layer, such as conversion of elevation values in feet to meters.
Definition at line 97 of file qgsmaplayerelevationproperties.cpp.
|
virtual |
Returns true
if the layer should be visible by default in newly created elevation profile plots.
Subclasses should override this with logic which determines whether the layer is likely desirable to be initially checked in these plots.
Reimplemented in QgsMeshLayerElevationProperties, QgsPointCloudLayerElevationProperties, QgsRasterLayerElevationProperties, and QgsVectorLayerElevationProperties.
Definition at line 81 of file qgsmaplayerelevationproperties.cpp.
|
protected |
Writes common class properties to a DOM element, to be used later with readXml().
Definition at line 44 of file qgsmaplayerelevationproperties.cpp.
|
pure virtual |
Writes the properties to a DOM element, to be used later with readXml().
Implemented in QgsMeshLayerElevationProperties, QgsPointCloudLayerElevationProperties, QgsRasterLayerElevationProperties, and QgsVectorLayerElevationProperties.
|
inline |
Returns the z offset, which is a fixed offset amount which should be added to z values from the layer.
Definition at line 183 of file qgsmaplayerelevationproperties.h.
|
signal |
Emitted when the z offset changes.
|
inline |
Returns the z scale, which is a scaling factor which should be applied to z values from the layer.
This can be used to correct or manually adjust for incorrect elevation values in a layer, such as conversion of elevation values in feet to meters.
Definition at line 206 of file qgsmaplayerelevationproperties.h.
|
signal |
Emitted when the z scale changes.
|
protected |
Property collection for data defined elevation settings.
Definition at line 305 of file qgsmaplayerelevationproperties.h.
|
protected |
Z offset.
Definition at line 302 of file qgsmaplayerelevationproperties.h.
|
protected |
Z scale.
Definition at line 300 of file qgsmaplayerelevationproperties.h.
|
staticprotected |
Property definitions.
Definition at line 308 of file qgsmaplayerelevationproperties.h.