QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
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 cancel() override
Stop the rendering job - does not return until the job has terminated.
QgsMapRendererCache * mCache
void waitForFinished() override
Block until the job has finished.
void cancelWithoutBlocking() override
Triggers cancellation of the rendering job without blocking.
#define QgsDebugMsgLevel(str, level)
~QgsMapRendererSequentialJob() override
float devicePixelRatio() const
Returns device pixel ratio Common values are 1 for normal-dpi displays and 2 for high-dpi "retina" di...
QElapsedTimer mRenderingStart
QImage::Format outputImageFormat() const
format of internal QImage, default QImage::Format_ARGB32_Premultiplied
void cancel() override
Stop the rendering job - does not return until the job has terminated.
void start() override
Start the rendering job and immediately return.
QgsLabelingResults * takeLabelingResults() override
Gets pointer to internal labeling engine (in order to get access to the results).
Errors errors() const
List of errors that happened during the rendering job - available when the rendering has been finishe...
void cancelWithoutBlocking() override
Triggers cancellation of the rendering job without blocking.
bool usedCachedLabels() const override
Returns true if the render job was able to use a cached labeling solution.
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.
static QImage composeImage(const QgsMapSettings &settings, const LayerRenderJobs &jobs, const LabelRenderJob &labelJob)
bool usedCachedLabels() const override
Returns true if the render job was able to use a cached labeling solution.
QSize deviceOutputSize() const
Returns the device output size of the map canvas This is equivalent to the output size multiplicated ...
QgsMapRendererSequentialJob(const QgsMapSettings &settings)
void waitForFinished() override
Block until the job has finished.
const LayerRenderJobs & jobs() const
bool isActive() const override
Tell whether the rendering job is currently running in background.
void start() override
Start the rendering job and immediately return.
double outputDpi() const
Returns DPI used for conversion between real world units (e.g.
QImage renderedImage() override
Gets a preview/resulting image.
void finished()
emitted when asynchronous rendering is finished (or canceled).