16 #ifndef QGSMAPRENDERERCACHE_H
17 #define QGSMAPRENDERERCACHE_H
19 #include "qgis_core.h"
89 void setCacheImage(
const QString &cacheKey,
const QImage &image,
const QList< QgsMapLayer * > &dependentLayers = QList< QgsMapLayer * >() );
104 void setCacheImageWithParameters(
const QString &cacheKey,
108 const QList< QgsMapLayer * > &dependentLayers = QList< QgsMapLayer * >() );
117 bool hasCacheImage(
const QString &cacheKey )
const;
132 bool hasAnyCacheImage(
const QString &cacheKey,
double minimumScaleThreshold = 0,
double maximumScaleThreshold = 0 )
const;
141 QImage cacheImage(
const QString &cacheKey )
const;
155 QImage transformedCacheImage(
const QString &cacheKey,
const QgsMapToPixel &mtp )
const;
161 QList< QgsMapLayer * > dependentLayers(
const QString &cacheKey )
const;
167 void clearCacheImage(
const QString &cacheKey );
174 void invalidateCacheForLayer(
QgsMapLayer *layer );
178 void layerRequestedRepaint();
182 struct CacheParameters
191 void clearInternal();
194 void dropUnusedConnections();
196 QSet< QgsWeakMapLayerPointer > dependentLayers()
const;
198 mutable QMutex mMutex;
202 double mScale = -1.0;
205 QMap<QString, CacheParameters> mCachedImages;
207 QSet< QgsWeakMapLayerPointer > mConnectedLayers;
Base class for all map layer types.
This class is responsible for keeping cache of rendered images resulting from a map rendering job.
Perform transforms between map coordinates and device coordinates.
A rectangle specified with double values.
QList< QgsWeakMapLayerPointer > QgsWeakMapLayerPointerList
A list of weak pointers to QgsMapLayers.