QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
16 #ifndef QGSMAPRENDERERCUSTOMPAINTERJOB_H
17 #define QGSMAPRENDERERCUSTOMPAINTERJOB_H
19 #include "qgis_core.h"
49 void preparePainter( QPainter *painter,
const QColor &backgroundColor = Qt::transparent );
70 void start()
override;
79 const LayerRenderJobs &
jobs()
const {
return mLayerJobs; }
SIP_SKIP
93 void waitForFinishedWithEventLoop( QEventLoop::ProcessEventsFlags flags = QEventLoop::AllEvents );
104 void renderSynchronously();
129 void renderPrepared();
132 void futureFinished();
140 QPainter *mPainter =
nullptr;
141 QFuture<void> mFuture;
142 QFutureWatcher<void> mFutureWatcher;
143 std::unique_ptr< QgsLabelingEngine > mLabelingEngineV2;
146 LayerRenderJobs mLayerJobs;
147 LabelRenderJob mLabelJob;
148 bool mRenderSynchronously =
false;
149 bool mPrepared =
false;
150 bool mPrepareOnly =
false;
152 LayerRenderJobs mSecondPassLayerJobs;
156 #endif // QGSMAPRENDERERCUSTOMPAINTERJOB_H
virtual bool usedCachedLabels() const =0
Returns true if the render job was able to use a cached labeling solution.
virtual bool isActive() const =0
Tell whether the rendering job is currently running in background.
Abstract base class for map renderer jobs which use custom painters.
Class that stores computed placement from labeling engine.
virtual void waitForFinished()=0
Block until the job has finished.
virtual void start()=0
Start the rendering job and immediately return.
Job implementation that renders everything sequentially using a custom painter.
virtual void cancelWithoutBlocking()=0
Triggers cancellation of the rendering job without blocking.
const LayerRenderJobs & jobs() const
Abstract base class for map rendering implementations.
virtual QgsLabelingResults * takeLabelingResults()=0
Gets pointer to internal labeling engine (in order to get access to the results).
virtual void cancel()=0
Stop the rendering job - does not return until the job has terminated.
The QgsMapSettings class contains configuration for rendering of the map.