File tree Expand file tree Collapse file tree 3 files changed +14
-35
lines changed Expand file tree Collapse file tree 3 files changed +14
-35
lines changed Original file line number Diff line number Diff line change @@ -1335,6 +1335,11 @@ be returned instead of a null pointer if no transformation is required.
1335
1335
- destinationSrsChanged() was renamed to destinationCrsChanged()
1336
1336
- getCompositionMode(), getBlendModeEnum() and BlendMode enum have been moved to QgsPainting utility class.
1337
1337
1338
+ QgsMapRendererCache {#qgis_api_break_3_0_QgsMapRendererCache}
1339
+ -------------------
1340
+
1341
+ - All protected members have been made private. This class is not designed to be subclassed.
1342
+
1338
1343
1339
1344
QgsMapRendererJob {#qgis_api_break_3_0_QgsMapRendererJob}
1340
1345
-----------------
Original file line number Diff line number Diff line change 1
-
2
- /**
3
- * This class is responsible for keeping cache of rendered images of individual layers.
4
- *
5
- * Once a layer has rendered image stored in the cache (using setCacheImage(...)),
6
- * the cache listens to repaintRequested() signals from layer. If triggered, the cache
7
- * removes the rendered image (and disconnects from the layer).
8
- *
9
- * The class is thread-safe (multiple classes can access the same instance safely).
10
- *
11
- * @note added in 2.4
12
- */
13
1
class QgsMapRendererCache : QObject
14
2
{
15
3
%TypeHeaderCode
@@ -20,27 +8,14 @@ class QgsMapRendererCache : QObject
20
8
21
9
QgsMapRendererCache();
22
10
23
- //! invalidate the cache contents
24
11
void clear();
25
12
26
- //! initialize cache: set new parameters and erase cache if parameters have changed
27
- //! @return flag whether the parameters are the same as last time
28
13
bool init( const QgsRectangle& extent, double scale );
29
14
30
- //! set cached image for the specified layer ID
31
15
void setCacheImage( const QString& layerId, const QImage& img );
32
16
33
- //! get cached image for the specified layer ID. Returns null image if it is not cached.
34
17
QImage cacheImage( const QString& layerId );
35
18
36
- //! remove layer from the cache
37
19
void clearCacheImage( const QString& layerId );
38
20
39
- protected slots:
40
- //! remove layer (that emitted the signal) from the cache
41
- void layerRequestedRepaint();
42
-
43
- protected:
44
- //! invalidate cache contents (without locking)
45
- void clearInternal();
46
21
};
Original file line number Diff line number Diff line change @@ -42,31 +42,30 @@ class CORE_EXPORT QgsMapRendererCache : public QObject
42
42
43
43
QgsMapRendererCache ();
44
44
45
- // ! invalidate the cache contents
45
+ // ! Invalidate the cache contents
46
46
void clear ();
47
47
48
- // ! initialize cache: set new parameters and erase cache if parameters have changed
48
+ // ! Initialize cache: set new parameters and erase cache if parameters have changed
49
49
// ! @return flag whether the parameters are the same as last time
50
50
bool init ( const QgsRectangle& extent, double scale );
51
51
52
- // ! set cached image for the specified layer ID
52
+ // ! Set the cached image for the specified layer ID
53
53
void setCacheImage ( const QString& layerId, const QImage& img );
54
54
55
- // ! get cached image for the specified layer ID. Returns null image if it is not cached.
55
+ // ! Returns the cached image for the specified layer ID. Returns null image if it is not cached.
56
56
QImage cacheImage ( const QString& layerId );
57
57
58
- // ! remove layer from the cache
58
+ // ! Removes a layer from the cache
59
59
void clearCacheImage ( const QString& layerId );
60
60
61
- protected slots:
62
- // ! remove layer (that emitted the signal) from the cache
61
+ private slots:
62
+ // ! Remove layer (that emitted the signal) from the cache
63
63
void layerRequestedRepaint ();
64
64
65
- protected :
66
- // ! invalidate cache contents (without locking)
65
+ private :
66
+ // ! Invalidate cache contents (without locking)
67
67
void clearInternal ();
68
68
69
- protected:
70
69
QMutex mMutex ;
71
70
QgsRectangle mExtent ;
72
71
double mScale ;
You can’t perform that action at this time.
0 commit comments