QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
qgsvectordataprovidertemporalcapabilities.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgsvectordataprovidertemporalcapabilities.cpp
3  ---------------
4  begin : March 2020
5  copyright : (C) 2020 by Nyall Dawson
6  email : nyall dot dawson at gmail dot com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
19 
22 {
23 }
24 
26 {
27  return mMode;
28 }
29 
31 {
32  mMode = mode;
33 }
34 
35 void QgsVectorDataProviderTemporalCapabilities::setAvailableTemporalRange( const QgsDateTimeRange &dateTimeRange )
36 {
37  if ( !hasTemporalCapabilities() )
39 
40  mAvailableTemporalRange = dateTimeRange;
41 }
42 
44 {
45  return mAvailableTemporalRange;
46 }
47 
49 {
50  return mStartField;
51 }
52 
54 {
55  mStartField = field;
56 }
57 
59 {
60  return mEndField;
61 }
62 
64 {
65  mEndField = field;
66 }
QgsVectorDataProviderTemporalCapabilities::startField
QString startField() const
Returns the name of the start datetime field, which contains the start time for the feature's time sp...
Definition: qgsvectordataprovidertemporalcapabilities.cpp:48
qgsvectordataprovidertemporalcapabilities.h
QgsVectorDataProviderTemporalCapabilities::TemporalMode
TemporalMode
Provider temporal handling mode.
Definition: qgsvectordataprovidertemporalcapabilities.h:45
field
const QgsField & field
Definition: qgsfield.h:456
QgsDataProviderTemporalCapabilities
Base class for handling properties relating to a data provider's temporal capabilities.
Definition: qgsdataprovidertemporalcapabilities.h:34
QgsVectorDataProviderTemporalCapabilities::endField
QString endField() const
Returns the name of the end datetime field, which stores the end time for the feature's time spans.
Definition: qgsvectordataprovidertemporalcapabilities.cpp:58
QgsVectorDataProviderTemporalCapabilities::setStartField
void setStartField(const QString &field)
Sets the name of the start datetime field, which stores the start time for the feature's time spans.
Definition: qgsvectordataprovidertemporalcapabilities.cpp:53
QgsVectorDataProviderTemporalCapabilities::setEndField
void setEndField(const QString &field)
Sets the name of the end datetime field, which stores the end time for the feature's time spans.
Definition: qgsvectordataprovidertemporalcapabilities.cpp:63
QgsVectorDataProviderTemporalCapabilities::availableTemporalRange
const QgsDateTimeRange & availableTemporalRange() const
Returns the datetime range extent from which temporal data is available from the provider.
Definition: qgsvectordataprovidertemporalcapabilities.cpp:43
QgsVectorDataProviderTemporalCapabilities::setAvailableTemporalRange
void setAvailableTemporalRange(const QgsDateTimeRange &range)
Sets the datetime range extent from which temporal data is available from the provider.
Definition: qgsvectordataprovidertemporalcapabilities.cpp:35
QgsVectorDataProviderTemporalCapabilities::setMode
void setMode(TemporalMode mode)
Sets the temporal properties mode.
Definition: qgsvectordataprovidertemporalcapabilities.cpp:30
QgsDataProviderTemporalCapabilities::hasTemporalCapabilities
bool hasTemporalCapabilities() const
Returns true if the provider has temporal capabilities available.
Definition: qgsdataprovidertemporalcapabilities.h:74
QgsVectorDataProviderTemporalCapabilities::QgsVectorDataProviderTemporalCapabilities
QgsVectorDataProviderTemporalCapabilities(bool enabled=false)
Constructor for QgsVectorDataProviderTemporalCapabilities.
Definition: qgsvectordataprovidertemporalcapabilities.cpp:20
QgsVectorDataProviderTemporalCapabilities::mode
TemporalMode mode() const
Returns the temporal properties mode.
Definition: qgsvectordataprovidertemporalcapabilities.cpp:25
QgsDataProviderTemporalCapabilities::setHasTemporalCapabilities
void setHasTemporalCapabilities(bool available)
Sets whether the provider has temporal capabilities available.
Definition: qgsdataprovidertemporalcapabilities.h:83