QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Base class for utility classes that encapsulate information necessary for rendering of map layers. More...
#include <qgsmaplayerrenderer.h>
Public Member Functions | |
QgsMapLayerRenderer (const QString &layerID, QgsRenderContext *context=nullptr) | |
Constructor for QgsMapLayerRenderer, with the associated layerID and render context. More... | |
virtual | ~QgsMapLayerRenderer ()=default |
QStringList | errors () const |
Returns list of errors (problems) that happened during the rendering. More... | |
virtual QgsFeedback * | feedback () const |
Access to feedback object of the layer renderer (may be nullptr ) More... | |
QString | layerId () const |
Gets access to the ID of the layer rendered by this class. More... | |
virtual bool | render ()=0 |
Do the rendering (based on data stored in the class) More... | |
QgsRenderContext * | renderContext () |
Returns the render context associated with the renderer. More... | |
Protected Attributes | |
QStringList | mErrors |
QString | mLayerID |
Base class for utility classes that encapsulate information necessary for rendering of map layers.
The rendering is typically done in a background thread, so it is necessary to keep all structures required for rendering away from the original map layer because it may change any time.
Because the data needs to be copied (to avoid the need for locking), it is highly desirable to use copy-on-write where possible. This way, the overhead of copying (both memory and CPU) will be kept low. Qt containers and various Qt classes use implicit sharing.
The scenario will be:
QgsMapLayer::createMapRenderer() and gets instance of this class. The instance is initialized at that point and should not need additional calls to QgsVectorLayer.
Definition at line 50 of file qgsmaplayerrenderer.h.
|
inline |
Constructor for QgsMapLayerRenderer, with the associated layerID and render context.
Definition at line 57 of file qgsmaplayerrenderer.h.
|
virtualdefault |
|
inline |
Returns list of errors (problems) that happened during the rendering.
Definition at line 74 of file qgsmaplayerrenderer.h.
|
inlinevirtual |
Access to feedback object of the layer renderer (may be nullptr
)
Reimplemented in QgsVectorTileLayerRenderer, QgsRasterLayerRenderer, QgsVectorLayerRenderer, QgsMeshLayerRenderer, and QgsAnnotationLayerRenderer.
Definition at line 71 of file qgsmaplayerrenderer.h.
|
inline |
Gets access to the ID of the layer rendered by this class.
Definition at line 77 of file qgsmaplayerrenderer.h.
|
pure virtual |
Do the rendering (based on data stored in the class)
Implemented in QgsVectorTileLayerRenderer, QgsRasterLayerRenderer, QgsVectorLayerRenderer, QgsMeshLayerRenderer, and QgsAnnotationLayerRenderer.
|
inline |
Returns the render context associated with the renderer.
Definition at line 84 of file qgsmaplayerrenderer.h.
|
protected |
Definition at line 87 of file qgsmaplayerrenderer.h.
|
protected |
Definition at line 88 of file qgsmaplayerrenderer.h.