Class: QgsTemporalRangeObject¶
- class qgis.core.QgsTemporalRangeObject¶
Bases:
sip.wrapper
Base class for objects with an associated (optional) temporal range.
Added in version 3.14.
QgsTemporalRangeObject(enabled: bool = False) Constructor QgsTemporalRangeObject.
The
enabled
argument specifies whether the temporal range is initially enabled or not (seeisTemporal()
).QgsTemporalRangeObject(a0:
QgsTemporalRangeObject
)Methods
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.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.).Sets the temporal
range
for the object.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
- 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
- Parameters:
enabled (bool)
- setTemporalRange(self, range: QgsDateTimeRange)¶
Sets the temporal
range
for the object.Calling
setTemporalRange()
automatically enables temporal properties on the object (seeisTemporal()
), regardless of its existing state.When a temporal
range
is set it can be used to filter and request time base objects.See also
- Parameters:
range (QgsDateTimeRange)
- temporalRange(self) QgsDateTimeRange ¶
Returns the datetime range for the object.
This should only be considered when
isTemporal()
returnsTrue
.See also
- Return type: