16 #ifndef QGSMAPRENDERERCUSTOMPAINTERJOB_H
17 #define QGSMAPRENDERERCUSTOMPAINTERJOB_H
19 #include "qgis_core.h"
49 void preparePainter( QPainter *painter,
const QColor &backgroundColor = Qt::transparent );
78 const std::vector< LayerRenderJob > &
jobs()
const {
return mLayerJobs; }
SIP_SKIP
92 void waitForFinishedWithEventLoop( QEventLoop::ProcessEventsFlags flags = QEventLoop::AllEvents );
103 void renderSynchronously();
128 void renderPrepared();
132 void futureFinished();
137 void startPrivate()
override;
142 QPainter *mPainter =
nullptr;
143 QFuture<void> mFuture;
144 QFutureWatcher<void> mFutureWatcher;
145 std::unique_ptr< QgsLabelingEngine > mLabelingEngineV2;
148 std::vector< LayerRenderJob > mLayerJobs;
149 LabelRenderJob mLabelJob;
150 bool mRenderSynchronously =
false;
151 bool mPrepared =
false;
152 bool mPrepareOnly =
false;
154 std::vector< LayerRenderJob > mSecondPassLayerJobs;
Class that stores computed placement from labeling engine.
Abstract base class for map renderer jobs which use custom painters.
Job implementation that renders everything sequentially using a custom painter.
const std::vector< LayerRenderJob > & jobs() const
Abstract base class for map rendering implementations.
virtual void waitForFinished()=0
Block until the job has finished.
virtual QgsLabelingResults * takeLabelingResults()=0
Gets pointer to internal labeling engine (in order to get access to the results).
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.
virtual void cancel()=0
Stop the rendering job - does not return until the job has terminated.
virtual void cancelWithoutBlocking()=0
Triggers cancellation of the rendering job without blocking.
The QgsMapSettings class contains configuration for rendering of the map.