Skip to content
Permalink
Browse files

Address flag comment

  • Loading branch information
nirvn committed May 9, 2020
1 parent d0060fd commit ec32e3248e9145ace7c2bbb55a40383b50611647
@@ -27,7 +27,6 @@ Base class for temporal property.

enum Flag
{
NoFlags,
FlagDontInvalidateCachedRendersWhenRangeChanges
};
typedef QFlags<QgsTemporalProperty::Flag> Flags;
@@ -54,7 +53,7 @@ Returns ``True`` if the temporal property is active.
.. seealso:: :py:func:`setIsActive`
%End

virtual const QgsTemporalProperty::Flags flags() const;
virtual QgsTemporalProperty::Flags flags() const;
%Docstring
Returns flags associated to the temporal property.
%End
@@ -56,7 +56,7 @@ Sets the temporal properties ``mode``.
.. seealso:: :py:func:`mode`
%End

virtual const QgsTemporalProperty::Flags flags() const;
virtual QgsTemporalProperty::Flags flags() const;

%Docstring
Returns flags associated to the temporal property.
@@ -53,7 +53,7 @@ Sets the temporal properties ``mode``.
.. seealso:: :py:func:`mode`
%End

virtual const QgsTemporalProperty::Flags flags() const;
virtual QgsTemporalProperty::Flags flags() const;

%Docstring
Returns flags associated to the temporal property.
@@ -129,13 +129,6 @@ Check whether images of rendered layers are curerently being cached
Make sure to remove any rendered images from cache (does nothing if cache is not enabled)

.. versionadded:: 2.4
%End

void clearTemporalCache();
%Docstring
Make sure to remove any rendered images of temporal-enabled layers from cache (does nothing if cache is not enabled)

.. versionadded:: 3.14
%End

void waitWhileRendering();
@@ -43,7 +43,6 @@ class CORE_EXPORT QgsTemporalProperty : public QObject
*/
enum Flag
{
NoFlags = 0,
FlagDontInvalidateCachedRendersWhenRangeChanges = 1 //!< Any cached rendering will not be invalidated when temporal range context is modified.
};
Q_DECLARE_FLAGS( Flags, Flag )
@@ -72,7 +71,7 @@ class CORE_EXPORT QgsTemporalProperty : public QObject
/**
* Returns flags associated to the temporal property.
*/
virtual const QgsTemporalProperty::Flags flags() const { return QgsTemporalProperty::NoFlags; }
virtual QgsTemporalProperty::Flags flags() const { return nullptr; }

signals:

@@ -108,9 +108,9 @@ void QgsVectorLayerTemporalProperties::setMode( QgsVectorLayerTemporalProperties
mMode = mode;
}

const QgsTemporalProperty::Flags QgsVectorLayerTemporalProperties::flags() const
QgsTemporalProperty::Flags QgsVectorLayerTemporalProperties::flags() const
{
return mode() == ModeFixedTemporalRange ? QgsTemporalProperty::FlagDontInvalidateCachedRendersWhenRangeChanges : QgsTemporalProperty::NoFlags;
return mode() == ModeFixedTemporalRange ? QgsTemporalProperty::FlagDontInvalidateCachedRendersWhenRangeChanges : QgsTemporalProperty::Flags( nullptr );
}

void QgsVectorLayerTemporalProperties::setFixedTemporalRange( const QgsDateTimeRange &range )
@@ -78,7 +78,7 @@ class CORE_EXPORT QgsVectorLayerTemporalProperties : public QgsMapLayerTemporalP
/**
* Returns flags associated to the temporal property.
*/
const QgsTemporalProperty::Flags flags() const override;
QgsTemporalProperty::Flags flags() const override;

/**
* Sets a temporal \a range to apply to the whole layer. All features from
@@ -70,9 +70,9 @@ void QgsRasterLayerTemporalProperties::setMode( QgsRasterLayerTemporalProperties
mMode = mode;
}

const QgsTemporalProperty::Flags QgsRasterLayerTemporalProperties::flags() const
QgsTemporalProperty::Flags QgsRasterLayerTemporalProperties::flags() const
{
return mode() == ModeFixedTemporalRange ? QgsTemporalProperty::FlagDontInvalidateCachedRendersWhenRangeChanges : QgsTemporalProperty::NoFlags;
return mode() == ModeFixedTemporalRange ? QgsTemporalProperty::FlagDontInvalidateCachedRendersWhenRangeChanges : QgsTemporalProperty::Flags( nullptr );
}

QgsRasterDataProviderTemporalCapabilities::IntervalHandlingMethod QgsRasterLayerTemporalProperties::intervalHandlingMethod() const
@@ -74,7 +74,7 @@ class CORE_EXPORT QgsRasterLayerTemporalProperties : public QgsMapLayerTemporalP
/**
* Returns flags associated to the temporal property.
*/
const QgsTemporalProperty::Flags flags() const override;
QgsTemporalProperty::Flags flags() const override;

/**
* Returns the desired method to use when resolving a temporal interval to matching
@@ -177,12 +177,6 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView
*/
void clearCache();

/**
* Make sure to remove any rendered images of temporal-enabled layers from cache (does nothing if cache is not enabled)
* \since QGIS 3.14
*/
void clearTemporalCache();

/**
* Blocks until the rendering job has finished.
*
@@ -1206,6 +1200,12 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView
double zoomInFactor() const;
double zoomOutFactor() const;

/**
* Make sure to remove any rendered images of temporal-enabled layers from cache (does nothing if cache is not enabled)
* \since QGIS 3.14
*/
void clearTemporalCache();

friend class TestQgsMapCanvas;

}; // class QgsMapCanvas

0 comments on commit ec32e32

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