16 #ifndef QGSMAPRENDERERCACHE_H
17 #define QGSMAPRENDERERCACHE_H
19 #include "qgis_core.h"
70 void setCacheImage(
const QString &cacheKey,
const QImage &image,
const QList< QgsMapLayer * > &dependentLayers = QList< QgsMapLayer * >() );
77 bool hasCacheImage(
const QString &cacheKey )
const;
86 QImage cacheImage(
const QString &cacheKey )
const;
92 QList< QgsMapLayer * > dependentLayers(
const QString &cacheKey )
const;
98 void clearCacheImage(
const QString &cacheKey );
105 void invalidateCacheForLayer(
QgsMapLayer *layer );
109 void layerRequestedRepaint();
113 struct CacheParameters
120 void clearInternal();
123 void dropUnusedConnections();
125 QSet< QgsWeakMapLayerPointer > dependentLayers()
const;
127 mutable QMutex mMutex;
132 QMap<QString, CacheParameters> mCachedImages;
134 QSet< QgsWeakMapLayerPointer > mConnectedLayers;
138 #endif // QGSMAPRENDERERCACHE_H