QgsMapRendererSequentialJob class
Job implementation that renders everything sequentially in one thread.
Contents
- Reference
The resulting map image can be retrieved with renderedImage() function. It is safe to call that function while rendering is active to see preview of the map.
Base classes
- class QgsMapRendererQImageJob
- Intermediate base class adding functionality that allows client to query the rendered image.
Public functions
- void cancel() override
- Stop the rendering job - does not return until the job has terminated.
- void cancelWithoutBlocking() override
- Triggers cancelation of the rendering job without blocking.
- auto isActive() const -> bool override
- Tell whether the rendering job is currently running in background.
- auto renderedImage() -> QImage override
- Gets a preview/resulting image.
- void start() override
- Start the rendering job and immediately return.
- auto takeLabelingResults() -> QgsLabelingResults* override
- Gets pointer to internal labeling engine (in order to get access to the results).
- auto usedCachedLabels() const -> bool override
- Returns true if the render job was able to use a cached labeling solution.
- void waitForFinished() override
- Block until the job has finished.
Function documentation
void QgsMapRendererSequentialJob:: cancel() override
Stop the rendering job - does not return until the job has terminated.
Does nothing if the rendering is not active.
void QgsMapRendererSequentialJob:: cancelWithoutBlocking() override
Triggers cancelation of the rendering job without blocking.
The render job will continue to operate until it is able to cancel, at which stage the finished() signal will be emitted. Does nothing if the rendering is not active.
void QgsMapRendererSequentialJob:: start() override
Start the rendering job and immediately return.
Does nothing if the rendering is already in progress.
QgsLabelingResults* QgsMapRendererSequentialJob:: takeLabelingResults() override
Gets pointer to internal labeling engine (in order to get access to the results).
This should not be used if cached labeling was redrawn - see usedCachedLabels().
bool QgsMapRendererSequentialJob:: usedCachedLabels() const override
Returns true if the render job was able to use a cached labeling solution.
If so, any previously stored labeling results (see takeLabelingResults()) should be retained.