@@ -35,6 +35,9 @@ class QgsMapRendererCache;
35
35
class QgsPalLabeling ;
36
36
37
37
38
+ /* * Structure keeping low-level rendering job information.
39
+ * @note not part of public API!
40
+ */
38
41
struct LayerRenderJob
39
42
{
40
43
QgsRenderContext context;
@@ -48,7 +51,30 @@ struct LayerRenderJob
48
51
typedef QList<LayerRenderJob> LayerRenderJobs;
49
52
50
53
51
- /* * abstract base class renderer jobs that asynchronously start map rendering */
54
+ /* *
55
+ * Abstract base class for map rendering implementations.
56
+ *
57
+ * The API is designed in a way that rendering is done asynchronously, therefore
58
+ * the caller is not blocked while the rendering is in progress. Non-blocking
59
+ * operation is quite important because the rendering can take considerable
60
+ * amount of time.
61
+ *
62
+ * Common use case:
63
+ * 0. prepare QgsMapSettings with rendering configuration (extent, layer, map size, ...)
64
+ * 1. create QgsMapRendererJob subclass with QgsMapSettings instance
65
+ * 2. connect to job's finished() signal
66
+ * 3. call start(). Map rendering will start in background, the function immediately returns
67
+ * 4. at some point, slot connected to finished() signal is called, map rendering is done
68
+ *
69
+ * It is possible to cancel the rendering job while it is active by calling cancel() function.
70
+ *
71
+ * The following subclasses are available:
72
+ * - QgsMapRendererSequentialJob - renders map in one background thread to an image
73
+ * - QgsMapRendererParallelJob - renders map in multiple background threads to an image
74
+ * - QgsMapRendererCustomPainterJob - renders map with given QPainter in one background thread
75
+ *
76
+ * @note added in 2.4
77
+ */
52
78
class CORE_EXPORT QgsMapRendererJob : public QObject
53
79
{
54
80
Q_OBJECT
@@ -149,6 +175,8 @@ class CORE_EXPORT QgsMapRendererJob : public QObject
149
175
150
176
/* * Intermediate base class adding functionality that allows client to query the rendered image.
151
177
* The image can be queried even while the rendering is still in progress to get intermediate result
178
+ *
179
+ * @note added in 2.4
152
180
*/
153
181
class CORE_EXPORT QgsMapRendererQImageJob : public QgsMapRendererJob
154
182
{
0 commit comments