QGIS API Documentation  3.23.0-Master (22c16f2067)
qgsrasterdataprovidertemporalcapabilities.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgsrasterdataprovidertemporalcapabilities.cpp
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 
19 
22 {
23 }
24 
25 void QgsRasterDataProviderTemporalCapabilities::setAvailableTemporalRange( const QgsDateTimeRange &dateTimeRange )
26 {
27  if ( !hasTemporalCapabilities() )
29 
30  mAvailableTemporalRange = dateTimeRange;
31 }
32 
34 {
35  return mAvailableTemporalRange;
36 }
37 
39 {
40  mAllAvailableTemporalRanges = ranges;
41 }
42 
44 {
45  return mAllAvailableTemporalRanges;
46 }
47 
49 {
50  if ( !hasTemporalCapabilities() )
52 
53  mAvailableReferenceRange = dateTimeRange;
54 }
55 
57 {
58  return mAvailableReferenceRange;
59 }
60 
61 void QgsRasterDataProviderTemporalCapabilities::setRequestedTemporalRange( const QgsDateTimeRange &dateTimeRange )
62 {
63  mRequestedRange = dateTimeRange;
64 }
65 
67 {
68  return mDefaultInterval;
69 }
70 
72 {
73  mDefaultInterval = defaultInterval;
74 }
75 
77 {
78  return mRequestedRange;
79 }
80 
82 {
83  return mIntervalMatchMethod;
84 }
85 
87 {
88  if ( mIntervalMatchMethod == mode )
89  return;
90  mIntervalMatchMethod = mode;
91 }
TemporalIntervalMatchMethod
Method to use when resolving a temporal range to a data provider layer or band.
Definition: qgis.h:895
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.
A representation of the interval between two datetime values.
Definition: qgsinterval.h:42
void setIntervalHandlingMethod(Qgis::TemporalIntervalMatchMethod method)
Sets the desired method to use when resolving a temporal interval to matching layers or bands in the ...
const QgsDateTimeRange & requestedTemporalRange() const
Returns the requested temporal range.
QgsInterval defaultInterval() const
Returns the default time step interval corresponding to the available datetime values for the provide...
void setAvailableReferenceTemporalRange(const QgsDateTimeRange &range)
Sets the available reference datetime range.
const QgsDateTimeRange & availableReferenceTemporalRange() const
Returns the available reference datetime range, which indicates the maximum extent of datetime values...
QList< QgsDateTimeRange > allAvailableTemporalRanges() const
Returns a list of all valid datetime ranges for which temporal data is available from the provider.
void setRequestedTemporalRange(const QgsDateTimeRange &range)
Sets the requested temporal range to retrieve when returning data from the associated data provider.
void setDefaultInterval(const QgsInterval &interval)
Sets the default time step interval corresponding to the available datetime values for the provider.
void setAllAvailableTemporalRanges(const QList< QgsDateTimeRange > &ranges)
Sets a list of all valid datetime ranges for which temporal data is available from the provider.
QgsRasterDataProviderTemporalCapabilities(bool enabled=false)
Constructor for QgsRasterDataProviderTemporalProperties.
void setAvailableTemporalRange(const QgsDateTimeRange &range)
Sets the overall datetime range extent from which temporal data is available from the provider.
Qgis::TemporalIntervalMatchMethod intervalHandlingMethod() const
Returns the desired method to use when resolving a temporal interval to matching layers or bands in t...
const QgsDateTimeRange & availableTemporalRange() const
Returns the overall datetime range extent from which temporal data is available from the provider.