Class: QgsVectorDataProviderTemporalCapabilities¶
-
class
qgis.core.
QgsVectorDataProviderTemporalCapabilities
(enabled: bool = False)¶ Bases:
QgsDataProviderTemporalCapabilities
Constructor for QgsVectorDataProviderTemporalCapabilities.
The
enabled
argument specifies whether the data provider has temporal capabilities.QgsVectorDataProviderTemporalCapabilities(
QgsVectorDataProviderTemporalCapabilities
)Implementation of data provider temporal properties for QgsVectorDataProviders.
Data provider temporal capabilities reflect the temporal capabilities of a QgsDataProvider. Unlike
QgsMapLayerTemporalProperties
, these settings are not user-configurable, and should only be set by theQgsDataProvider
itself.New in version 3.14.
- Parameters
enabled –
-
ProviderHasFixedTemporalRange
= 0¶
-
ProviderStoresFeatureDateTimeInstantInField
= 1¶
-
ProviderStoresFeatureDateTimeStartAndEndInSeparateFields
= 2¶
-
class
TemporalMode
¶ Bases:
int
-
availableTemporalRange
(self) → QgsDateTimeRange¶ Returns the datetime range extent from which temporal data is available from the provider.
See also
- Return type
-
endField
(self) → str¶ Returns the name of the end datetime field, which stores the end time for the feature’s time spans.
See also
See also
- Return type
str
-
mode
(self) → QgsVectorDataProviderTemporalCapabilities.TemporalMode¶ Returns the temporal properties mode.
See also
-
setAvailableTemporalRange
(self, range: QgsDateTimeRange)¶ Sets the datetime
range
extent from which temporal data is available from the provider.See also
- Parameters
range (QgsDateTimeRange) –
-
setEndField
(self, field: str)¶ Sets the name of the end datetime
field
, which stores the end time for the feature’s time spans.See also
See also
- Parameters
field (str) –
-
setMode
(self, mode: QgsVectorDataProviderTemporalCapabilities.TemporalMode)¶ Sets the temporal properties
mode
.See also
- Parameters
mode (QgsVectorDataProviderTemporalCapabilities.TemporalMode) –
-
setStartField
(self, field: str)¶ Sets the name of the start datetime
field
, which stores the start time for the feature’s time spans.If
mode()
is ModeFeatureDateTimeInstantFromField, then this field stores both the start AND end times.See also
See also
- Parameters
field (str) –