Skip to content
Permalink
Browse files

Hide access to setRequestedTemporalRange from QgsRasterDataProviderTe…

…mporalCapabilities

Only QgsRasterLayerRenderer should be accessing this, so block access
via friend class
  • Loading branch information
nyalldawson committed Mar 12, 2020
1 parent 14355ba commit 4b1b4ab2e295cc91d19689a36a9c1cc19a3d2461
@@ -84,20 +84,6 @@ Returns the available reference datetime range, which indicates the maximum
extent of datetime values available for reference temporal ranges from the provider.

.. seealso:: :py:func:`setAvailableReferenceTemporalRange`
%End

void setRequestedTemporalRange( const QgsDateTimeRange &range );
%Docstring
Sets the requested temporal ``range`` to retrieve when
returning data from the associated data provider.

.. note::

this is not normally manually set, and is intended for use by
QgsRasterLayerRenderer to automatically set the requested temporal range
on a clone of the data provider during a render job.

.. seealso:: :py:func:`requestedTemporalRange`
%End

const QgsDateTimeRange &requestedTemporalRange() const;
@@ -102,18 +102,6 @@ class CORE_EXPORT QgsRasterDataProviderTemporalCapabilities : public QgsDataProv
*/
const QgsDateTimeRange &availableReferenceTemporalRange() const;

/**
* Sets the requested temporal \a range to retrieve when
* returning data from the associated data provider.
*
* \note this is not normally manually set, and is intended for use by
* QgsRasterLayerRenderer to automatically set the requested temporal range
* on a clone of the data provider during a render job.
*
* \see requestedTemporalRange()
*/
void setRequestedTemporalRange( const QgsDateTimeRange &range );

/**
* Returns the requested temporal range.
* Intended to be used by the provider in fetching data.
@@ -176,6 +164,18 @@ class CORE_EXPORT QgsRasterDataProviderTemporalCapabilities : public QgsDataProv

private:

/**
* Sets the requested temporal \a range to retrieve when
* returning data from the associated data provider.
*
* \note this is not normally manually set, and is intended for use by
* QgsRasterLayerRenderer to automatically set the requested temporal range
* on a clone of the data provider during a render job.
*
* \see requestedTemporalRange()
*/
void setRequestedTemporalRange( const QgsDateTimeRange &range );

/**
* Represents available data provider datetime range.
*
@@ -214,6 +214,9 @@ class CORE_EXPORT QgsRasterDataProviderTemporalCapabilities : public QgsDataProv
//! Interval handling method
IntervalHandlingMethod mIntervalMatchMethod = MatchUsingWholeRange;

friend class QgsRasterLayerRenderer;
friend class TestQgsRasterDataProviderTemporalCapabilities;

};

#endif // QGSRASTERDATAPROVIDERTEMPORALCAPABILITIES_H

0 comments on commit 4b1b4ab

Please sign in to comment.
You can’t perform that action at this time.