QGIS API Documentation  3.18.1-Zürich (202f1bf7e5)
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 }
Base class for handling properties relating to a data provider's temporal capabilities.
bool hasTemporalCapabilities() const
Returns true if the provider has temporal capabilities available.
void setHasTemporalCapabilities(bool available)
Sets whether the provider has temporal capabilities available.
void setEndField(const QString &field)
Sets the name of the end datetime field, which stores the end time for the feature's time spans.
TemporalMode mode() const
Returns the temporal properties mode.
QgsVectorDataProviderTemporalCapabilities(bool enabled=false)
Constructor for QgsVectorDataProviderTemporalCapabilities.
const QgsDateTimeRange & availableTemporalRange() const
Returns the datetime range extent from which temporal data is available from the provider.
QString startField() const
Returns the name of the start datetime field, which contains the start time for the feature's time sp...
QString endField() const
Returns the name of the end datetime field, which stores the end time for the feature's time spans.
void setStartField(const QString &field)
Sets the name of the start datetime field, which stores the start time for the feature's time spans.
void setAvailableTemporalRange(const QgsDateTimeRange &range)
Sets the datetime range extent from which temporal data is available from the provider.
void setMode(TemporalMode mode)
Sets the temporal properties mode.
const QgsField & field
Definition: qgsfield.h:472