32 mImage.fill( Qt::transparent );
41 QgsDebugMsgLevel( QStringLiteral(
"SEQUENTIAL destruct -- still running! (canceling)" ), 5 );
45 Q_ASSERT( !mInternalJob && !mPainter );
54 mLabelingResults.reset();
62 Q_ASSERT( !mInternalJob && !mPainter );
64 mPainter =
new QPainter( &mImage );
71 mInternalJob->
start();
83 Q_ASSERT( !mInternalJob && !mPainter );
105 return nullptr != mInternalJob;
110 return mUsedCachedLabels;
115 return mLabelingResults.release();
144 mInternalJob->deleteLater();
145 mInternalJob =
nullptr;
void finished()
emitted when asynchronous rendering is finished (or canceled).
const LayerRenderJobs & jobs() const
Job implementation that renders everything sequentially using a custom painter.
void start() override
Start the rendering job and immediately return.
QSize deviceOutputSize() const
Returns the device output size of the map canvas This is equivalent to the output size multiplicated ...
Errors errors() const
List of errors that happened during the rendering job - available when the rendering has been finishe...
void cancel() override
Stop the rendering job - does not return until the job has terminated.
void cancel() override
Stop the rendering job - does not return until the job has terminated.
QgsLabelingResults * takeLabelingResults() override
Gets pointer to internal labeling engine (in order to get access to the results). ...
void setCache(QgsMapRendererCache *cache)
Assign a cache to be used for reading and storing rendered images of individual layers.
The QgsMapSettings class contains configuration for rendering of the map.
static QImage composeImage(const QgsMapSettings &settings, const LayerRenderJobs &jobs, const LabelRenderJob &labelJob)
void start() override
Start the rendering job and immediately return.
#define QgsDebugMsgLevel(str, level)
QgsMapRendererSequentialJob(const QgsMapSettings &settings)
QImage::Format outputImageFormat() const
format of internal QImage, default QImage::Format_ARGB32_Premultiplied
bool usedCachedLabels() const override
Returns true if the render job was able to use a cached labeling solution.
float devicePixelRatio() const
Returns device pixel ratio Common values are 1 for normal-dpi displays and 2 for high-dpi "retina" di...
void cancelWithoutBlocking() override
Triggers cancelation of the rendering job without blocking.
double outputDpi() const
Returns DPI used for conversion between real world units (e.g.
QImage renderedImage() override
Gets a preview/resulting image.
Intermediate base class adding functionality that allows client to query the rendered image...
void cancelWithoutBlocking() override
Triggers cancelation of the rendering job without blocking.
Class that stores computed placement from labeling engine.
bool isActive() const override
Tell whether the rendering job is currently running in background.
void waitForFinished() override
Block until the job has finished.
QgsLabelingResults * takeLabelingResults() override
Gets pointer to internal labeling engine (in order to get access to the results). ...
bool usedCachedLabels() const override
Returns true if the render job was able to use a cached labeling solution.
void waitForFinished() override
Block until the job has finished.
QgsMapRendererCache * mCache
~QgsMapRendererSequentialJob() override