Class: QgsTemporalRangeObject

class qgis.core.QgsTemporalRangeObject(enabled: bool = False)

Bases: sip.wrapper

Constructor QgsTemporalRangeObject.

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

QgsTemporalRangeObject(QgsTemporalRangeObject)

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

New in version 3.14:

Methods

isTemporal

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.

setIsTemporal

Sets whether the temporal range is enabled (i.e.

setTemporalRange

Sets the temporal range for the object.

temporalRange

Returns the datetime range for the object.

isTemporal(self) bool

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)

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)

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