Class: QgsMapLayerTemporalProperties

class qgis.core.QgsMapLayerTemporalProperties

Bases: QgsTemporalProperty

Base class for storage of map layer temporal properties.

QgsMapLayerTemporalProperties exposes user-configurable settings for controlling how an individual QgsMapLayer behaves in a temporal context, e.g. while animating a map object.

New in version 3.14.

QgsMapLayerTemporalProperties(parent: QObject, enabled: bool = False) Constructor for QgsMapLayerTemporalProperties, with the specified parent object.

The enabled argument specifies whether the temporal properties are initially enabled or not (see isActive()).

Methods

allTemporalRanges

Attempts to calculate the overall list of all temporal extents which are contained in the specified layer, using the settings defined by the temporal properties object.

childEvent

connectNotify

customEvent

disconnectNotify

isSignalConnected

isVisibleInTemporalRange

Returns True if the layer should be visible and rendered for the specified time range.

readXml

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

receivers

sender

senderSignalIndex

setDefaultsFromDataProviderTemporalCapabilities

Sets the layers temporal settings to appropriate defaults based on a provider's temporal capabilities.

timerEvent

writeXml

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

allTemporalRanges(self, layer: QgsMapLayer) List[QgsDateTimeRange]

Attempts to calculate the overall list of all temporal extents which are contained in the specified layer, using the settings defined by the temporal properties object.

May return an empty list if the ranges could not be calculated.

New in version 3.20.

Parameters:

layer (QgsMapLayer) –

Return type:

List[QgsDateTimeRange]

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
isSignalConnected(self, QMetaMethod) bool
isVisibleInTemporalRange(self, range: QgsDateTimeRange) bool

Returns True if the layer should be visible and rendered for the specified time range.

Parameters:

range (QgsDateTimeRange) –

Return type:

bool

readXml(self, element: QDomElement, context: QgsReadWriteContext) bool

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

See also

writeXml()

Parameters:
Return type:

bool

receivers(self, PYQT_SIGNAL) int
sender(self) QObject
senderSignalIndex(self) int
setDefaultsFromDataProviderTemporalCapabilities(self, capabilities: QgsDataProviderTemporalCapabilities)

Sets the layers temporal settings to appropriate defaults based on a provider’s temporal capabilities.

Parameters:

capabilities (QgsDataProviderTemporalCapabilities) –

timerEvent(self, QTimerEvent)
writeXml(self, element: QDomElement, doc: QDomDocument, context: QgsReadWriteContext) QDomElement

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

See also

readXml()

Parameters:
Return type:

QDomElement