QGIS API Documentation  3.18.1-Zürich (202f1bf7e5)
qgsrasterdataprovidertemporalcapabilities.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsrasterdataprovidertemporalcapabilities.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 #ifndef QGSRASTERDATAPROVIDERTEMPORALCAPABILITIES_H
19 #define QGSRASTERDATAPROVIDERTEMPORALCAPABILITIES_H
20 
21 #include "qgis_core.h"
22 #include "qgis_sip.h"
23 #include "qgsrange.h"
25 
38 {
39  public:
40 
46  QgsRasterDataProviderTemporalCapabilities( bool enabled = false );
47 
52  {
57  FindClosestMatchToEndOfRange
58  };
59  // TODO -- add other methods
60 
67  IntervalHandlingMethod intervalHandlingMethod() const;
68 
75  void setIntervalHandlingMethod( IntervalHandlingMethod method );
76 
82  void setAvailableTemporalRange( const QgsDateTimeRange &range );
83 
89  const QgsDateTimeRange &availableTemporalRange() const;
90 
97  void setAvailableReferenceTemporalRange( const QgsDateTimeRange &range );
98 
105  const QgsDateTimeRange &availableReferenceTemporalRange() const;
106 
111  const QgsDateTimeRange &requestedTemporalRange() const;
112 
113  private:
114 
125  void setRequestedTemporalRange( const QgsDateTimeRange &range );
126 
135  QgsDateTimeRange mAvailableTemporalRange;
136 
138  QgsDateTimeRange mRequestedRange;
139 
143  QgsDateTimeRange mAvailableReferenceRange;
144 
146  IntervalHandlingMethod mIntervalMatchMethod = MatchUsingWholeRange;
147 
149  friend class TestQgsRasterDataProviderTemporalCapabilities;
150 
151 };
152 
153 #endif // QGSRASTERDATAPROVIDERTEMPORALCAPABILITIES_H
Base class for handling properties relating to a data provider's temporal capabilities.
Implementation of data provider temporal properties for QgsRasterDataProviders.
IntervalHandlingMethod
Method to use when resolving a temporal range to a data provider layer or band.
@ MatchExactUsingStartOfRange
Match the start of the temporal range to a corresponding layer or band, and only use exact matching r...
@ MatchExactUsingEndOfRange
Match the end of the temporal range to a corresponding layer or band, and only use exact matching res...
@ MatchUsingWholeRange
Use an exact match to the whole temporal range.
Implementation of threaded rendering for raster layers.