QGIS API Documentation  3.14.0-Pi (9f7028fd23)
qgsvectordataprovidertemporalcapabilities.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsvectordataprovidertemporalcapabilities.h
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 
18 #ifndef QGSVECTORDATAPROVIDERTEMPORALCAPABILITIES_H
19 #define QGSVECTORDATAPROVIDERTEMPORALCAPABILITIES_H
20 
21 #include "qgis_core.h"
22 #include "qgis_sip.h"
23 #include "qgsrange.h"
25 
38 {
39  public:
40 
45  {
46  ProviderHasFixedTemporalRange = 0,
49  };
50 
56  QgsVectorDataProviderTemporalCapabilities( bool enabled = false );
57 
63  TemporalMode mode() const;
64 
70  void setMode( TemporalMode mode );
71 
77  void setAvailableTemporalRange( const QgsDateTimeRange &range );
78 
84  const QgsDateTimeRange &availableTemporalRange() const;
85 
94  QString startField() const;
95 
104  void setStartField( const QString &field );
105 
112  QString endField() const;
113 
120  void setEndField( const QString &field );
121 
122  private:
123 
132  QgsDateTimeRange mAvailableTemporalRange;
133 
134  TemporalMode mMode = ProviderHasFixedTemporalRange;
135 
136  QString mStartField;
137  QString mEndField;
138 
139 };
140 
141 #endif // QGSVECTORDATAPROVIDERTEMPORALCAPABILITIES_H
QgsVectorDataProviderTemporalCapabilities::ProviderStoresFeatureDateTimeStartAndEndInSeparateFields
@ ProviderStoresFeatureDateTimeStartAndEndInSeparateFields
Dataset stores feature start and end datetimes in separate fields.
Definition: qgsvectordataprovidertemporalcapabilities.h:48
qgsdataprovidertemporalcapabilities.h
QgsVectorDataProviderTemporalCapabilities::TemporalMode
TemporalMode
Provider temporal handling mode.
Definition: qgsvectordataprovidertemporalcapabilities.h:44
qgsrange.h
QgsDataProviderTemporalCapabilities
Definition: qgsdataprovidertemporalcapabilities.h:33
qgis_sip.h
QgsVectorDataProviderTemporalCapabilities
Definition: qgsvectordataprovidertemporalcapabilities.h:37
QgsVectorDataProviderTemporalCapabilities::ProviderStoresFeatureDateTimeInstantInField
@ ProviderStoresFeatureDateTimeInstantInField
Dataset has feature datetime instants stored in a single field.
Definition: qgsvectordataprovidertemporalcapabilities.h:47