QGIS API Documentation  3.14.0-Pi (9f7028fd23)
qgsdataprovidertemporalcapabilities.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsdataprovidertemporalcapabilities.h
3  ---------------
4  begin : February 2020
5  copyright : (C) 2020 by Samweli Mwakisambwe
6  email : samweli at kartoza 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 
19 #ifndef QGSDATAPROVIDERTEMPORALCAPABILITIES_H
20 #define QGSDATAPROVIDERTEMPORALCAPABILITIES_H
21 
22 #include "qgis_core.h"
23 #include "qgis_sip.h"
24 #include "qgstemporalproperty.h"
25 
34 {
35 
36 #ifdef SIP_RUN
38  if ( dynamic_cast<QgsRasterDataProviderTemporalCapabilities *>( sipCpp ) )
39  {
40  sipType = sipType_QgsRasterDataProviderTemporalCapabilities;
41  }
42  else if ( dynamic_cast<QgsVectorDataProviderTemporalCapabilities *>( sipCpp ) )
43  {
44  sipType = sipType_QgsVectorDataProviderTemporalCapabilities;
45  }
46  else if ( dynamic_cast < QgsMeshDataProviderTemporalCapabilities * >( sipCpp ) )
47  {
48  sipType = sipType_QgsMeshDataProviderTemporalCapabilities;
49  }
50  else
51  {
52  sipType = 0;
53  }
54  SIP_END
55 #endif
56 
57  public:
58 
65  QgsDataProviderTemporalCapabilities( bool available = false );
66 
67  virtual ~QgsDataProviderTemporalCapabilities() = default;
68 
74  bool hasTemporalCapabilities() const { return mHasTemporalCapabilities; }
75 
83  void setHasTemporalCapabilities( bool available ) { mHasTemporalCapabilities = available; }
84 
85  private:
86 
87  bool mHasTemporalCapabilities = false;
88 };
89 
90 #endif // QGSDATAPROVIDERTEMPORALCAPABILITIES_H
qgstemporalproperty.h
QgsMeshDataProviderTemporalCapabilities
Definition: qgsmeshdataprovidertemporalcapabilities.h:33
QgsDataProviderTemporalCapabilities
Definition: qgsdataprovidertemporalcapabilities.h:33
SIP_CONVERT_TO_SUBCLASS_CODE
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition: qgis_sip.h:172
qgis_sip.h
QgsVectorDataProviderTemporalCapabilities
Definition: qgsvectordataprovidertemporalcapabilities.h:37
QgsDataProviderTemporalCapabilities::hasTemporalCapabilities
bool hasTemporalCapabilities() const
Returns true if the provider has temporal capabilities available.
Definition: qgsdataprovidertemporalcapabilities.h:74
SIP_END
#define SIP_END
Definition: qgis_sip.h:189
QgsRasterDataProviderTemporalCapabilities
Definition: qgsrasterdataprovidertemporalcapabilities.h:37
QgsDataProviderTemporalCapabilities::setHasTemporalCapabilities
void setHasTemporalCapabilities(bool available)
Sets whether the provider has temporal capabilities available.
Definition: qgsdataprovidertemporalcapabilities.h:83