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;
155 #endif // QGSMAPRENDERERCUSTOMPAINTERJOB_H const LayerRenderJobs & jobs() const
Job implementation that renders everything sequentially using a custom painter.
Abstract base class for map rendering implementations.
The QgsMapSettings class contains configuration for rendering of the map.
Abstract base class for map renderer jobs which use custom painters.
virtual void waitForFinished()=0
Block until the job has finished.
virtual void start()=0
Start the rendering job and immediately return.
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.
Class that stores computed placement from labeling engine.
virtual QgsLabelingResults * takeLabelingResults()=0
Gets pointer to internal labeling engine (in order to get access to the results). ...
virtual bool isActive() const =0
Tell whether the rendering job is currently running in background.
virtual bool usedCachedLabels() const =0
Returns true if the render job was able to use a cached labeling solution.