QGIS API Documentation  3.14.0-Pi (9f7028fd23)
qgsmeshdataprovidertemporalcapabilities.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsmeshdataprovidertemporalcapabilities.h
3  -----------------------
4  begin : March 2020
5  copyright : (C) 2020 by Vincent Cloarec
6  email : vcloarec 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 QGSMESHDATAPROVIDERTEMPORALCAPABILITIES_H
19 #define QGSMESHDATAPROVIDERTEMPORALCAPABILITIES_H
20 
22 #include "qgsrange.h"
23 #include "qgsmeshdataset.h"
24 
25 
34 {
35  public:
36 
41  {
43  FindClosestDatasetFromStartRangeTime
44  };
45 
50 
58  QgsMeshDatasetIndex datasetIndexClosestBeforeRelativeTime( int group, qint64 timeSinceGlobalReference ) const;
59 
67  QgsMeshDatasetIndex datasetIndexClosestFromRelativeTime( int group, qint64 timeSinceGlobalReference ) const;
68 
74  void addGroupReferenceDateTime( int group, const QDateTime &reference ) SIP_SKIP;
75 
82  void addDatasetTimeInMilliseconds( int group, qint64 time ) SIP_SKIP;
83 
90  void addDatasetTime( int group, double time ) SIP_SKIP;
91 
95  bool hasReferenceTime() const;
96 
100  QDateTime referenceTime() const;
101 
106  QgsDateTimeRange timeExtent() const;
107 
112  QgsDateTimeRange timeExtent( const QDateTime &reference ) const;
113 
119  void setTemporalUnit( QgsUnitTypes::TemporalUnit temporalUnit );
120 
124  QgsUnitTypes::TemporalUnit temporalUnit() const;
125 
129  qint64 datasetTime( const QgsMeshDatasetIndex &index ) const;
130 
134  void clear();
135 
141  qint64 firstTimeStepDuration( int group ) const;
142 
143  private:
144 
146  QDateTime mGlobalReferenceDateTime;
147 
149  QHash<int, QDateTime> mGroupsReferenceDateTime;
150 
157  QHash<int, QList<qint64>> mDatasetTimeSinceGroupReference;
158 
160 };
161 
162 #endif // QGSMESHDATAPROVIDERTEMPORALCAPABILITIES_H
qgsdataprovidertemporalcapabilities.h
QgsMeshDataProviderTemporalCapabilities
Definition: qgsmeshdataprovidertemporalcapabilities.h:33
qgsrange.h
QgsUnitTypes::TemporalUnit
TemporalUnit
Temporal units.
Definition: qgsunittypes.h:149
QgsDataProviderTemporalCapabilities
Definition: qgsdataprovidertemporalcapabilities.h:33
SIP_SKIP
#define SIP_SKIP
Definition: qgis_sip.h:126
QgsMeshDatasetIndex
Definition: qgsmeshdataset.h:45
QgsMeshDataProviderTemporalCapabilities::MatchingTemporalDatasetMethod
MatchingTemporalDatasetMethod
Method for selection of temporal mesh dataset from a range time.
Definition: qgsmeshdataprovidertemporalcapabilities.h:40
QgsUnitTypes::TemporalHours
@ TemporalHours
Hours.
Definition: qgsunittypes.h:154
QgsMeshDataProviderTemporalCapabilities::FindClosestDatasetBeforeStartRangeTime
@ FindClosestDatasetBeforeStartRangeTime
Definition: qgsmeshdataprovidertemporalcapabilities.h:42
qgsmeshdataset.h