QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsMeshLayerElevationProperties Class Reference

Mesh layer specific subclass of QgsMapLayerElevationProperties. More...

#include <qgsmeshlayerelevationproperties.h>

Inheritance diagram for QgsMeshLayerElevationProperties:
Inheritance graph
[legend]

Public Member Functions

 QgsMeshLayerElevationProperties (QObject *parent)
 Constructor for QgsMeshLayerElevationProperties, with the specified parent object.
 
 ~QgsMeshLayerElevationProperties () override
 
QgsDoubleRange calculateZRange (QgsMapLayer *layer) const override
 Attempts to calculate the overall elevation or z range for the specified layer, using the settings defined by this elevation properties object.
 
QgsMeshLayerElevationPropertiesclone () const override
 Creates a clone of the properties.
 
double elevationLimit () const
 Returns the elevation limit, which is used when profileSymbology() is Qgis::ProfileSurfaceSymbology::FillBelow or Qgis::ProfileSurfaceSymbology::FillAbove to limit the fill to a specific elevation range.
 
QgsDoubleRange fixedRange () const
 Returns the fixed elevation range for the mesh.
 
QMap< int, QgsDoubleRangefixedRangePerGroup () const
 Returns the fixed elevation range for each group.
 
QgsMapLayerElevationProperties::Flags flags () const override
 Returns flags associated to the elevation properties.
 
bool hasElevation () const override
 Returns true if the layer has an elevation or z component.
 
QString htmlSummary () const override
 Returns a HTML formatted summary of the properties.
 
bool isVisibleInZRange (const QgsDoubleRange &range, QgsMapLayer *layer=nullptr) const override
 Returns true if the layer should be visible and rendered for the specified z range.
 
Qgis::MeshElevationMode mode () const
 Returns the elevation mode.
 
QgsFillSymbolprofileFillSymbol () const
 Returns the fill symbol used to render the mesh profile in elevation profile plots.
 
QgsLineSymbolprofileLineSymbol () const
 Returns the line symbol used to render the mesh profile in elevation profile plots.
 
Qgis::ProfileSurfaceSymbology profileSymbology () const
 Returns the symbology option used to render the mesh profile in elevation profile plots.
 
bool readXml (const QDomElement &element, const QgsReadWriteContext &context) override
 Reads the elevation properties from a DOM element previously written by writeXml().
 
void setElevationLimit (double limit)
 Sets the elevation limit, which is used when profileSymbology() is Qgis::ProfileSurfaceSymbology::FillBelow or Qgis::ProfileSurfaceSymbology::FillAbove to limit the fill to a specific elevation range.
 
void setFixedRange (const QgsDoubleRange &range)
 Sets the fixed elevation range for the mesh.
 
void setFixedRangePerGroup (const QMap< int, QgsDoubleRange > &ranges)
 Sets the fixed elevation range for each group.
 
void setMode (Qgis::MeshElevationMode mode)
 Sets the elevation mode.
 
void setProfileFillSymbol (QgsFillSymbol *symbol)
 Sets the fill symbol used to render the mesh profile in elevation profile plots.
 
void setProfileLineSymbol (QgsLineSymbol *symbol)
 Sets the line symbol used to render the mesh profile in elevation profile plots.
 
void setProfileSymbology (Qgis::ProfileSurfaceSymbology symbology)
 Sets the symbology option used to render the mesh profile in elevation profile plots.
 
bool showByDefaultInElevationProfilePlots () const override
 Returns true if the layer should be visible by default in newly created elevation profile plots.
 
QList< double > significantZValues (QgsMapLayer *layer) const override
 Returns a list of significant elevation/z-values for the specified layer, using the settings defined by this elevation properties object.
 
QDomElement writeXml (QDomElement &element, QDomDocument &doc, const QgsReadWriteContext &context) override
 Writes the properties to a DOM element, to be used later with readXml().
 
- Public Member Functions inherited from QgsMapLayerElevationProperties
 QgsMapLayerElevationProperties (QObject *parent)
 Constructor for QgsMapLayerElevationProperties, with the specified parent object.
 
QgsPropertyCollectiondataDefinedProperties ()
 Returns a reference to the object's property collection, used for data defined overrides.
 
const QgsPropertyCollectiondataDefinedProperties () const
 Returns a reference to the object's property collection, used for data defined overrides.
 
void setDataDefinedProperties (const QgsPropertyCollection &collection)
 Sets the object's property collection, used for data defined overrides.
 
virtual void setDefaultsFromLayer (QgsMapLayer *layer)
 Sets default properties based on sensible choices for the given map layer.
 
void setZOffset (double offset)
 Sets the z offset, which is a fixed offset amount which will be added to z values from the layer.
 
void setZScale (double scale)
 Sets the z scale, which is a scaling factor which will be applied to z values from the layer.
 
double zOffset () const
 Returns the z offset, which is a fixed offset amount which should be added to z values from the layer.
 
double zScale () const
 Returns the z scale, which is a scaling factor which should be applied to z values from the layer.
 

Additional Inherited Members

- Public Types inherited from QgsMapLayerElevationProperties
enum  Flag { FlagDontInvalidateCachedRendersWhenRangeChanges = 1 }
 Flags attached to the elevation property. More...
 
typedef QFlags< FlagFlags
 
enum class  Property : int { ZOffset , ExtrusionHeight , RasterPerBandLowerElevation , RasterPerBandUpperElevation }
 Data definable properties. More...
 
- Signals inherited from QgsMapLayerElevationProperties
void changed ()
 Emitted when any of the elevation properties have changed.
 
void profileGenerationPropertyChanged ()
 Emitted when any of the elevation properties which relate solely to generation of elevation profiles have changed.
 
void profileRenderingPropertyChanged ()
 Emitted when any of the elevation properties which relate solely to presentation of elevation results have changed.
 
void zOffsetChanged ()
 Emitted when the z offset changes.
 
void zScaleChanged ()
 Emitted when the z scale changes.
 
- Static Public Member Functions inherited from QgsMapLayerElevationProperties
static QgsPropertiesDefinition propertyDefinitions ()
 Returns the definitions for data defined properties available for use in elevation properties.
 
- Protected Member Functions inherited from QgsMapLayerElevationProperties
void copyCommonProperties (const QgsMapLayerElevationProperties *other)
 Copies common properties from another object.
 
void readCommonProperties (const QDomElement &element, const QgsReadWriteContext &context)
 Reads common class properties from a DOM element previously written by writeXml().
 
void writeCommonProperties (QDomElement &element, QDomDocument &doc, const QgsReadWriteContext &context)
 Writes common class properties to a DOM element, to be used later with readXml().
 
- Protected Attributes inherited from QgsMapLayerElevationProperties
QgsPropertyCollection mDataDefinedProperties
 Property collection for data defined elevation settings.
 
double mZOffset = 0.0
 Z offset.
 
double mZScale = 1.0
 Z scale.
 
- Static Protected Attributes inherited from QgsMapLayerElevationProperties
static QgsPropertiesDefinition sPropertyDefinitions
 Property definitions.
 

Detailed Description

Mesh layer specific subclass of QgsMapLayerElevationProperties.

Since
QGIS 3.26

Definition at line 38 of file qgsmeshlayerelevationproperties.h.

Constructor & Destructor Documentation

◆ QgsMeshLayerElevationProperties()

QgsMeshLayerElevationProperties::QgsMeshLayerElevationProperties ( QObject *  parent)

Constructor for QgsMeshLayerElevationProperties, with the specified parent object.

Definition at line 29 of file qgsmeshlayerelevationproperties.cpp.

◆ ~QgsMeshLayerElevationProperties()

QgsMeshLayerElevationProperties::~QgsMeshLayerElevationProperties ( )
overridedefault

Member Function Documentation

◆ calculateZRange()

QgsDoubleRange QgsMeshLayerElevationProperties::calculateZRange ( QgsMapLayer layer) const
overridevirtual

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 from QgsMapLayerElevationProperties.

Definition at line 221 of file qgsmeshlayerelevationproperties.cpp.

◆ clone()

QgsMeshLayerElevationProperties * QgsMeshLayerElevationProperties::clone ( ) const
overridevirtual

Creates a clone of the properties.

Since
QGIS 3.26

Implements QgsMapLayerElevationProperties.

Definition at line 183 of file qgsmeshlayerelevationproperties.cpp.

◆ elevationLimit()

double QgsMeshLayerElevationProperties::elevationLimit ( ) const

Returns the elevation limit, which is used when profileSymbology() is Qgis::ProfileSurfaceSymbology::FillBelow or Qgis::ProfileSurfaceSymbology::FillAbove to limit the fill to a specific elevation range.

By default this is NaN, which indicates that there is no elevation limit.

See also
setElevationLimit()
Since
QGIS 3.32

Definition at line 397 of file qgsmeshlayerelevationproperties.cpp.

◆ fixedRange()

QgsDoubleRange QgsMeshLayerElevationProperties::fixedRange ( ) const

Returns the fixed elevation range for the mesh.

Note
This is only considered when mode() is Qgis::MeshElevationMode::FixedElevationRange.
When a fixed range is set any zOffset() and zScale() is ignored.
See also
setFixedRange()
Since
QGIS 3.38

Definition at line 335 of file qgsmeshlayerelevationproperties.cpp.

◆ fixedRangePerGroup()

QMap< int, QgsDoubleRange > QgsMeshLayerElevationProperties::fixedRangePerGroup ( ) const

Returns the fixed elevation range for each group.

Note
This is only considered when mode() is Qgis::MeshElevationMode::FixedRangePerGroup.
When a fixed range is set any zOffset() and zScale() is ignored.
See also
setFixedRangePerGroup()
Since
QGIS 3.38

Definition at line 349 of file qgsmeshlayerelevationproperties.cpp.

◆ flags()

QgsMapLayerElevationProperties::Flags QgsMeshLayerElevationProperties::flags ( ) const
overridevirtual

Returns flags associated to the elevation properties.

Reimplemented from QgsMapLayerElevationProperties.

Definition at line 307 of file qgsmeshlayerelevationproperties.cpp.

◆ hasElevation()

bool QgsMeshLayerElevationProperties::hasElevation ( ) const
overridevirtual

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

Reimplemented from QgsMapLayerElevationProperties.

Definition at line 39 of file qgsmeshlayerelevationproperties.cpp.

◆ htmlSummary()

QString QgsMeshLayerElevationProperties::htmlSummary ( ) const
overridevirtual

Returns a HTML formatted summary of the properties.

Since
QGIS 3.26

Reimplemented from QgsMapLayerElevationProperties.

Definition at line 157 of file qgsmeshlayerelevationproperties.cpp.

◆ isVisibleInZRange()

bool QgsMeshLayerElevationProperties::isVisibleInZRange ( const QgsDoubleRange range,
QgsMapLayer layer = nullptr 
) const
overridevirtual

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

Since QGIS 3.38 the layer argument can be used to specify the target layer.

Reimplemented from QgsMapLayerElevationProperties.

Definition at line 197 of file qgsmeshlayerelevationproperties.cpp.

◆ mode()

Qgis::MeshElevationMode QgsMeshLayerElevationProperties::mode ( ) const

Returns the elevation mode.

See also
setMode()
Since
QGIS 3.38

Definition at line 321 of file qgsmeshlayerelevationproperties.cpp.

◆ profileFillSymbol()

QgsFillSymbol * QgsMeshLayerElevationProperties::profileFillSymbol ( ) const

Returns the fill symbol used to render the mesh profile in elevation profile plots.

See also
setProfileFillSymbol()

Definition at line 375 of file qgsmeshlayerelevationproperties.cpp.

◆ profileLineSymbol()

QgsLineSymbol * QgsMeshLayerElevationProperties::profileLineSymbol ( ) const

Returns the line symbol used to render the mesh profile in elevation profile plots.

See also
setProfileLineSymbol()

Definition at line 363 of file qgsmeshlayerelevationproperties.cpp.

◆ profileSymbology()

Qgis::ProfileSurfaceSymbology QgsMeshLayerElevationProperties::profileSymbology ( ) const
inline

Returns the symbology option used to render the mesh profile in elevation profile plots.

See also
setProfileSymbology()

Definition at line 163 of file qgsmeshlayerelevationproperties.h.

◆ readXml()

bool QgsMeshLayerElevationProperties::readXml ( const QDomElement &  element,
const QgsReadWriteContext context 
)
overridevirtual

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

See also
writeXml()

Implements QgsMapLayerElevationProperties.

Definition at line 96 of file qgsmeshlayerelevationproperties.cpp.

◆ setElevationLimit()

void QgsMeshLayerElevationProperties::setElevationLimit ( double  limit)

Sets the elevation limit, which is used when profileSymbology() is Qgis::ProfileSurfaceSymbology::FillBelow or Qgis::ProfileSurfaceSymbology::FillAbove to limit the fill to a specific elevation range.

Set to NaN to indicate that there is no elevation limit.

See also
elevationLimit()
Since
QGIS 3.32

Definition at line 402 of file qgsmeshlayerelevationproperties.cpp.

◆ setFixedRange()

void QgsMeshLayerElevationProperties::setFixedRange ( const QgsDoubleRange range)

Sets the fixed elevation range for the mesh.

Note
This is only considered when mode() is Qgis::MeshElevationMode::FixedElevationRange.
When a fixed range is set any zOffset() and zScale() is ignored.
See also
fixedRange()
Since
QGIS 3.38

Definition at line 340 of file qgsmeshlayerelevationproperties.cpp.

◆ setFixedRangePerGroup()

void QgsMeshLayerElevationProperties::setFixedRangePerGroup ( const QMap< int, QgsDoubleRange > &  ranges)

Sets the fixed elevation range for each group.

Note
This is only considered when mode() is Qgis::MeshElevationMode::FixedRangePerGroup.
When a fixed range is set any zOffset() and zScale() is ignored.
See also
fixedRangePerGroup()
Since
QGIS 3.38

Definition at line 354 of file qgsmeshlayerelevationproperties.cpp.

◆ setMode()

void QgsMeshLayerElevationProperties::setMode ( Qgis::MeshElevationMode  mode)

Sets the elevation mode.

See also
mode()
Since
QGIS 3.38

Definition at line 326 of file qgsmeshlayerelevationproperties.cpp.

◆ setProfileFillSymbol()

void QgsMeshLayerElevationProperties::setProfileFillSymbol ( QgsFillSymbol symbol)

Sets the fill symbol used to render the mesh profile in elevation profile plots.

Ownership of symbol is transferred to the plot.

See also
profileFillSymbol()

Definition at line 380 of file qgsmeshlayerelevationproperties.cpp.

◆ setProfileLineSymbol()

void QgsMeshLayerElevationProperties::setProfileLineSymbol ( QgsLineSymbol symbol)

Sets the line symbol used to render the mesh profile in elevation profile plots.

Ownership of symbol is transferred to the plot.

See also
profileLineSymbol()

Definition at line 368 of file qgsmeshlayerelevationproperties.cpp.

◆ setProfileSymbology()

void QgsMeshLayerElevationProperties::setProfileSymbology ( Qgis::ProfileSurfaceSymbology  symbology)

Sets the symbology option used to render the mesh profile in elevation profile plots.

See also
setProfileSymbology()

Definition at line 387 of file qgsmeshlayerelevationproperties.cpp.

◆ showByDefaultInElevationProfilePlots()

bool QgsMeshLayerElevationProperties::showByDefaultInElevationProfilePlots ( ) const
overridevirtual

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.

Since
QGIS 3.26

Reimplemented from QgsMapLayerElevationProperties.

Definition at line 302 of file qgsmeshlayerelevationproperties.cpp.

◆ significantZValues()

QList< double > QgsMeshLayerElevationProperties::significantZValues ( QgsMapLayer layer) const
overridevirtual

Returns a list of significant elevation/z-values for the specified layer, using the settings defined by this elevation properties object.

These values will be highlighted in elevation related widgets for the layer.

Since
QGIS 3.38

Reimplemented from QgsMapLayerElevationProperties.

Definition at line 265 of file qgsmeshlayerelevationproperties.cpp.

◆ writeXml()

QDomElement QgsMeshLayerElevationProperties::writeXml ( QDomElement &  element,
QDomDocument &  doc,
const QgsReadWriteContext context 
)
overridevirtual

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

See also
readXml()

Implements QgsMapLayerElevationProperties.

Definition at line 44 of file qgsmeshlayerelevationproperties.cpp.


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