Class: QgsTemporalRangeObject

Base class for objects with an associated (optional) temporal range.

Added in version 3.14.

Class Hierarchy

Inheritance diagram of qgis.core.QgsTemporalRangeObject

Subclasses

QgsLayoutItemMap

Layout graphical items for displaying a map.

QgsMapSettings

Contains configuration for rendering maps.

QgsRenderContext

Contains information about the context of a rendering operation.

Qgs3DMapSettings

Definition of the world.

QgsLayoutItem3DMap

Implements support of 3D map views in print layouts.

class qgis.core.QgsTemporalRangeObject[source]

Bases: object

__init__(enabled: bool = False)

Constructor QgsTemporalRangeObject.

The enabled argument specifies whether the temporal range is initially enabled or not (see isTemporal()).

Parameters:

enabled (bool = False)

__init__(a0: QgsTemporalRangeObject)
Parameters:

a0 (QgsTemporalRangeObject)

isTemporal(self) bool[source]

Returns True if the object’s temporal range is enabled, and the object will be filtered when rendering maps with a specific time range set.

For map settings, if False is returned, then any other temporal settings relating to the map will be ignored during rendering.

See also

setIsTemporal()

Return type:

bool

setIsTemporal(self, enabled: bool)[source]

Sets whether the temporal range is enabled (i.e. whether the object has a temporal range which will be considered when rendering maps with a specific time range set.)

See also

isTemporal()

Parameters:

enabled (bool)

setTemporalRange(self, range: QgsDateTimeRange)[source]

Sets the temporal range for the object.

Calling setTemporalRange() automatically enables temporal properties on the object (see isTemporal()), regardless of its existing state.

When a temporal range is set it can be used to filter and request time base objects.

See also

temporalRange()

Parameters:

range (QgsDateTimeRange)

temporalRange(self) QgsDateTimeRange

Returns the datetime range for the object.

This should only be considered when isTemporal() returns True.

Return type:

QgsDateTimeRange