Class: QgsMapLayerTemporalProperties

class qgis.core.QgsMapLayerTemporalProperties(parent: QObject, enabled: bool = False)

Bases: QgsTemporalProperty

Constructor for QgsMapLayerTemporalProperties, with the specified parent object.

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

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.

Parameters
  • parent (QObject) –

  • enabled

Layer = 0
Project = 1
class TemporalSource

Bases: int

childEvent()
connectNotify()
customEvent()
disconnectNotify()
isSignalConnected()
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()
sender()
senderSignalIndex()
setDefaultsFromDataProviderTemporalCapabilities(self, capabilities: QgsDataProviderTemporalCapabilities)

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

Parameters

capabilities (QgsDataProviderTemporalCapabilities) –

setTemporalSource(self, source: QgsMapLayerTemporalProperties.TemporalSource)

Sets the temporal properties temporal range source.

See also

temporalSource()

Parameters

source (QgsMapLayerTemporalProperties.TemporalSource) –

temporalSource(self) → QgsMapLayerTemporalProperties.TemporalSource

Returns the temporal properties temporal range source, can be layer or project.

Return type

QgsMapLayerTemporalProperties.TemporalSource

timerEvent()
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