QGIS API Documentation  3.14.0-Pi (9f7028fd23)
Public Types | Public Member Functions | List of all members
QgsVectorDataProviderTemporalCapabilities Class Reference

#include <qgsvectordataprovidertemporalcapabilities.h>

Inheritance diagram for QgsVectorDataProviderTemporalCapabilities:
Inheritance graph
[legend]

Public Types

enum  TemporalMode { ProviderHasFixedTemporalRange = 0, ProviderStoresFeatureDateTimeInstantInField, ProviderStoresFeatureDateTimeStartAndEndInSeparateFields }
 Provider temporal handling mode. More...
 

Public Member Functions

 QgsVectorDataProviderTemporalCapabilities (bool enabled=false)
 Constructor for QgsVectorDataProviderTemporalCapabilities. More...
 
const QgsDateTimeRange & availableTemporalRange () const
 Returns the datetime range extent from which temporal data is available from the provider. More...
 
QString endField () const
 Returns the name of the end datetime field, which stores the end time for the feature's time spans. More...
 
TemporalMode mode () const
 Returns the temporal properties mode. More...
 
void setAvailableTemporalRange (const QgsDateTimeRange &range)
 Sets the datetime range extent from which temporal data is available from the provider. More...
 
void setEndField (const QString &field)
 Sets the name of the end datetime field, which stores the end time for the feature's time spans. More...
 
void setMode (TemporalMode mode)
 Sets the temporal properties mode. More...
 
void setStartField (const QString &field)
 Sets the name of the start datetime field, which stores the start time for the feature's time spans. More...
 
QString startField () const
 Returns the name of the start datetime field, which contains the start time for the feature's time spans. More...
 
- Public Member Functions inherited from QgsDataProviderTemporalCapabilities
 QgsDataProviderTemporalCapabilities (bool available=false)
 Constructor for QgsDataProviderTemporalCapabilities. More...
 
virtual ~QgsDataProviderTemporalCapabilities ()=default
 
bool hasTemporalCapabilities () const
 Returns true if the provider has temporal capabilities available. More...
 
void setHasTemporalCapabilities (bool available)
 Sets whether the provider has temporal capabilities available. More...
 

Detailed Description

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 the QgsDataProvider itself.

Since
QGIS 3.14

Definition at line 37 of file qgsvectordataprovidertemporalcapabilities.h.

Member Enumeration Documentation

◆ TemporalMode

Provider temporal handling mode.

Enumerator
ProviderHasFixedTemporalRange 

Entire dataset from provider has a fixed start and end datetime.

ProviderStoresFeatureDateTimeInstantInField 

Dataset has feature datetime instants stored in a single field.

ProviderStoresFeatureDateTimeStartAndEndInSeparateFields 

Dataset stores feature start and end datetimes in separate fields.

Definition at line 44 of file qgsvectordataprovidertemporalcapabilities.h.

Constructor & Destructor Documentation

◆ QgsVectorDataProviderTemporalCapabilities()

QgsVectorDataProviderTemporalCapabilities::QgsVectorDataProviderTemporalCapabilities ( bool  enabled = false)

Constructor for QgsVectorDataProviderTemporalCapabilities.

The enabled argument specifies whether the data provider has temporal capabilities.

Definition at line 20 of file qgsvectordataprovidertemporalcapabilities.cpp.

Member Function Documentation

◆ availableTemporalRange()

const QgsDateTimeRange & QgsVectorDataProviderTemporalCapabilities::availableTemporalRange ( ) const

Returns the datetime range extent from which temporal data is available from the provider.

See also
setAvailableTemporalRange()

Definition at line 43 of file qgsvectordataprovidertemporalcapabilities.cpp.

◆ endField()

QString QgsVectorDataProviderTemporalCapabilities::endField ( ) const

Returns the name of the end datetime field, which stores the end time for the feature's time spans.

See also
setEndField()
startField()

Definition at line 58 of file qgsvectordataprovidertemporalcapabilities.cpp.

◆ mode()

QgsVectorDataProviderTemporalCapabilities::TemporalMode QgsVectorDataProviderTemporalCapabilities::mode ( ) const

Returns the temporal properties mode.

See also
setMode()

Definition at line 25 of file qgsvectordataprovidertemporalcapabilities.cpp.

◆ setAvailableTemporalRange()

void QgsVectorDataProviderTemporalCapabilities::setAvailableTemporalRange ( const QgsDateTimeRange &  range)

Sets the datetime range extent from which temporal data is available from the provider.

See also
availableTemporalRange()

Definition at line 35 of file qgsvectordataprovidertemporalcapabilities.cpp.

◆ setEndField()

void QgsVectorDataProviderTemporalCapabilities::setEndField ( const QString &  field)

Sets the name of the end datetime field, which stores the end time for the feature's time spans.

See also
endField()
setStartField()

Definition at line 63 of file qgsvectordataprovidertemporalcapabilities.cpp.

◆ setMode()

void QgsVectorDataProviderTemporalCapabilities::setMode ( QgsVectorDataProviderTemporalCapabilities::TemporalMode  mode)

Sets the temporal properties mode.

See also
mode()

Definition at line 30 of file qgsvectordataprovidertemporalcapabilities.cpp.

◆ setStartField()

void QgsVectorDataProviderTemporalCapabilities::setStartField ( const QString &  field)

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
startField()
setEndField()

Definition at line 53 of file qgsvectordataprovidertemporalcapabilities.cpp.

◆ startField()

QString QgsVectorDataProviderTemporalCapabilities::startField ( ) const

Returns the name of the start datetime field, which contains the start time for the feature's time spans.

If mode() is ProviderStoresFeatureDateTimeInstantInField, then this field stores both the start AND end times.

See also
setStartField()
endField()

Definition at line 48 of file qgsvectordataprovidertemporalcapabilities.cpp.


The documentation for this class was generated from the following files: