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