16 #ifndef QGSMAPLAYERRENDERER_H
17 #define QGSMAPLAYERRENDERER_H
19 #include <QStringList>
21 #include "qgis_core.h"
100 QStringList
errors()
const {
return mErrors; }
160 bool mReadyToCompose =
true;
170 static constexpr
int MAX_TIME_TO_USE_CACHED_PREVIEW_IMAGE = 3000
SIP_SKIP;
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Base class for utility classes that encapsulate information necessary for rendering of map layers.
virtual bool render()=0
Do the rendering (based on data stored in the class).
bool isReadyToCompose() const
Returns whether the renderer has already drawn (at least partially) some data.
QString layerId() const
Gets access to the ID of the layer rendered by this class.
virtual QgsFeedback * feedback() const
Access to feedback object of the layer renderer (may be nullptr)
virtual bool forceRasterRender() const
Returns true if the renderer must be rendered to a raster paint device (e.g.
virtual ~QgsMapLayerRenderer()=default
QStringList errors() const
Returns list of errors (problems) that happened during the rendering.
QgsRenderContext * renderContext()
Returns the render context associated with the renderer.
QgsMapLayerRenderer(const QString &layerID, QgsRenderContext *context=nullptr)
Constructor for QgsMapLayerRenderer, with the associated layerID and render context.
const QgsRenderContext * renderContext() const
Returns the render context associated with the renderer.
virtual void setLayerRenderingTimeHint(int time)
Sets approximate render time (in ms) for the layer to render.
Contains information about the context of a rendering operation.