16#ifndef QGSMAPRENDERERCUSTOMPAINTERJOB_H
17#define QGSMAPRENDERERCUSTOMPAINTERJOB_H
49 void preparePainter( QPainter *painter,
const QColor &backgroundColor = Qt::transparent );
77 const std::vector< LayerRenderJob > &
jobs() const
SIP_SKIP {
return mLayerJobs; }
91 void waitForFinishedWithEventLoop( QEventLoop::ProcessEventsFlags flags = QEventLoop::AllEvents );
102 void renderSynchronously();
127 void renderPrepared();
131 void futureFinished();
136 void startPrivate()
override;
141 QPainter *mPainter =
nullptr;
142 QFuture<void> mFuture;
143 QFutureWatcher<void> mFutureWatcher;
144 std::unique_ptr< QgsLabelingEngine > mLabelingEngineV2;
146 bool mActive =
false;
147 std::vector< LayerRenderJob > mLayerJobs;
148 LabelRenderJob mLabelJob;
149 bool mRenderSynchronously =
false;
150 bool mPrepared =
false;
151 bool mPrepareOnly =
false;
153 std::vector< LayerRenderJob > mSecondPassLayerJobs;
Stores computed placement from labeling engine.
void preparePainter(QPainter *painter, const QColor &backgroundColor=Qt::transparent)
Prepares the given painter ready for a map render.
QgsMapRendererAbstractCustomPainterJob(const QgsMapSettings &settings)
Constructor for QgsMapRendererAbstractCustomPainterJob, using the given map settings.
Job implementation that renders everything sequentially using a custom painter.
QgsMapRendererCustomPainterJob(const QgsMapSettings &settings, QPainter *painter)
const std::vector< LayerRenderJob > & jobs() const
virtual void waitForFinished()=0
Block until the job has finished.
virtual bool usedCachedLabels() const =0
Returns true if the render job was able to use a cached labeling solution.
QgsMapRendererJob(const QgsMapSettings &settings)
virtual bool isActive() const =0
Tell whether the rendering job is currently running in background.
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.
virtual void cancelWithoutBlocking()=0
Triggers cancellation of the rendering job without blocking.
Contains configuration for rendering maps.