Class: QgsMapLayerElevationProperties¶
- class qgis.core.QgsMapLayerElevationProperties¶
Bases:
PyQt5.QtCore.QObject
Base class for storage of map layer elevation properties.
QgsMapLayerElevationProperties
exposes user-configurable settings for controlling how an individualQgsMapLayer
behaves with relation to z values or elevations.New in version 3.18.
QgsMapLayerElevationProperties(parent: QObject) Constructor for
QgsMapLayerElevationProperties
, with the specifiedparent
object.Methods
Attempts to calculate the overall elevation or z range for the specified
layer
, using the settings defined by this elevation properties object.Returns flags associated to the elevation properties.
Returns
True
if the layer has an elevation or z component.Returns
True
if the layer should be visible and rendered for the specified zrange
.Reads the elevation properties from a DOM
element
previously written bywriteXml()
.Writes the properties to a DOM
element
, to be used later withreadXml()
.Signals
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
Attributes
- class Flag¶
Bases:
int
- FlagDontInvalidateCachedRendersWhenRangeChanges = 1¶
- class Flags¶
- class Flags(Union[QgsMapLayerElevationProperties.Flags, QgsMapLayerElevationProperties.Flag])
- class Flags(QgsMapLayerElevationProperties.Flags)
Bases:
sip.wrapper
- calculateZRange(self, layer: QgsMapLayer) QgsDoubleRange ¶
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.
- Parameters:
layer (QgsMapLayer) –
- Return type:
- changed¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- childEvent(self, QChildEvent)¶
- connectNotify(self, QMetaMethod)¶
- customEvent(self, QEvent)¶
- disconnectNotify(self, QMetaMethod)¶
- flags(self) QgsMapLayerElevationProperties.Flags ¶
Returns flags associated to the elevation properties.
- Return type:
- hasElevation(self) bool ¶
Returns
True
if the layer has an elevation or z component.- Return type:
bool
- isSignalConnected(self, QMetaMethod) bool ¶
- isVisibleInZRange(self, range: QgsDoubleRange) bool ¶
Returns
True
if the layer should be visible and rendered for the specified zrange
.- Parameters:
range (QgsDoubleRange) –
- Return type:
bool
- readXml(self, element: QDomElement, context: QgsReadWriteContext) bool ¶
Reads the elevation properties from a DOM
element
previously written bywriteXml()
.See also
- Parameters:
element (QDomElement) –
context (QgsReadWriteContext) –
- Return type:
bool
- receivers(self, PYQT_SIGNAL) int ¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- timerEvent(self, QTimerEvent)¶
- writeXml(self, element: QDomElement, doc: QDomDocument, context: QgsReadWriteContext) QDomElement ¶
Writes the properties to a DOM
element
, to be used later withreadXml()
.See also
- Parameters:
element (QDomElement) –
doc (QDomDocument) –
context (QgsReadWriteContext) –
- Return type:
QDomElement