30 bool parallelRendering
35 mParallelRendering( parallelRendering )
36 , mFeatureFilterProvider( featureFilterProvider )
38#ifndef HAVE_SERVER_PYTHON_PLUGINS
39 Q_UNUSED( mFeatureFilterProvider )
41 if ( mParallelRendering )
54 if ( mParallelRendering )
57#ifdef HAVE_SERVER_PYTHON_PLUGINS
77 mPainter.reset(
new QPainter( image ) );
80 mErrors = renderJob.
errors();
87 mPainter.reset(
new QPainter( image ) );
91#ifdef HAVE_SERVER_PYTHON_PLUGINS
97 mErrors = renderJob.
errors();
106 return mPainter.release();
@ Info
Information message.
static void setMaxThreads(int maxThreads)
Set maximum concurrent thread count.
Abstract interface for use by classes that filter the features or attributes of a layer.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
bool isCanceled() const
Tells whether the operation has been canceled already.
void canceled()
Internal routines can connect to this signal if they use event loop.
Job implementation that renders everything sequentially using a custom painter.
void renderSynchronously()
Render the map synchronously in this thread.
void cancel() override
Stop the rendering job - does not return until the job has terminated.
Errors errors() const
List of errors that happened during the rendering job - available when the rendering has been finishe...
void finished()
emitted when asynchronous rendering is finished (or canceled).
void start()
Start the rendering job and immediately return.
void setFeatureFilterProvider(const QgsFeatureFilterProvider *f)
Set the feature filter provider used by the QgsRenderContext of each LayerRenderJob.
Job implementation that renders all layers in parallel.
bool isActive() const override
Tell whether the rendering job is currently running in background.
QImage renderedImage() override
Gets a preview/resulting image.
void cancel() override
Stop the rendering job - does not return until the job has terminated.
void waitForFinished() override
Block until the job has finished.
The QgsMapSettings class contains configuration for rendering of the map.
static void logMessage(const QString &message, const QString &tag=QString(), Qgis::MessageLevel level=Qgis::MessageLevel::Warning, bool notifyUser=true)
Adds a message to the log instance (and creates it if necessary).
QPainter * takePainter()
Takes ownership of the painter used for rendering.
void render(const QgsMapSettings &mapSettings, QImage *image, const QgsFeedback *feedback)
Sequential or parallel map rendering.
QgsMapRendererJobProxy(bool parallelRendering, int maxThreads, QgsFeatureFilterProvider *featureFilterProvider)
Constructor for QgsMapRendererJobProxy.
Median cut implementation.