QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
Abstract base class for 2d tiled scene renderers. More...
#include <qgstiledscenerenderer.h>
Public Member Functions | |
QgsTiledSceneRenderer ()=default | |
QgsTiledSceneRenderer (const QgsTiledSceneRenderer &other)=delete | |
QgsTiledSceneRenderer cannot be copied – use clone() instead. | |
virtual | ~QgsTiledSceneRenderer ()=default |
virtual QgsTiledSceneRenderer * | clone () const =0 |
Create a deep copy of this renderer. | |
virtual QList< QgsLayerTreeModelLegendNode * > | createLegendNodes (QgsLayerTreeLayer *nodeLayer) |
Creates a set of legend nodes representing the renderer. | |
virtual Qgis::TiledSceneRendererFlags | flags () const |
Returns flags which control how the renderer behaves. | |
bool | isTileBorderRenderingEnabled () const |
Returns whether to render also borders of tiles. | |
virtual QStringList | legendRuleKeys () const |
Returns a list of all rule keys for legend nodes created by the renderer. | |
double | maximumScreenError () const |
Returns the maximum screen error allowed when rendering the tiled scene. | |
Qgis::RenderUnit | maximumScreenErrorUnit () const |
Returns the unit for the maximum screen error allowed when rendering the tiled scene. | |
QgsTiledSceneRenderer & | operator= (const QgsTiledSceneRenderer &other)=delete |
QgsTiledSceneRenderer cannot be copied – use clone() instead. | |
virtual void | renderLine (QgsTiledSceneRenderContext &context, const QPolygonF &line)=0 |
Renders a line. | |
virtual void | renderTriangle (QgsTiledSceneRenderContext &context, const QPolygonF &triangle)=0 |
Renders a triangle. | |
virtual QDomElement | save (QDomDocument &doc, const QgsReadWriteContext &context) const =0 |
Saves the renderer configuration to an XML element. | |
void | setMaximumScreenError (double error) |
Sets the maximum screen error allowed when rendering the tiled scene. | |
void | setMaximumScreenErrorUnit (Qgis::RenderUnit unit) |
Sets the unit for the maximum screen error allowed when rendering the tiled scene. | |
void | setTileBorderRenderingEnabled (bool enabled) |
Sets whether to render the borders of tiles. | |
virtual void | startRender (QgsTiledSceneRenderContext &context) |
Must be called when a new render cycle is started. | |
virtual void | stopRender (QgsTiledSceneRenderContext &context) |
Must be called when a render cycle has finished, to allow the renderer to clean up. | |
virtual QString | type () const =0 |
Returns the identifier of the renderer type. | |
Static Public Member Functions | |
static QgsTiledSceneRenderer * | load (QDomElement &element, const QgsReadWriteContext &context) |
Creates a renderer from an XML element. | |
Protected Member Functions | |
void | copyCommonProperties (QgsTiledSceneRenderer *destination) const |
Copies common tiled scene renderer properties (such as screen error) to the destination renderer. | |
void | restoreCommonProperties (const QDomElement &element, const QgsReadWriteContext &context) |
Restores common renderer properties (such as screen error) from the specified DOM element. | |
void | saveCommonProperties (QDomElement &element, const QgsReadWriteContext &context) const |
Saves common renderer properties (such as point size and screen error) to the specified DOM element. | |
Abstract base class for 2d tiled scene renderers.
Definition at line 119 of file qgstiledscenerenderer.h.
|
default |
|
virtualdefault |
|
delete |
QgsTiledSceneRenderer cannot be copied – use clone() instead.
|
pure virtual |
Create a deep copy of this renderer.
Should be implemented by all subclasses and generate a proper subclass.
Implemented in QgsTiledSceneTextureRenderer, and QgsTiledSceneWireframeRenderer.
|
protected |
Copies common tiled scene renderer properties (such as screen error) to the destination renderer.
Definition at line 142 of file qgstiledscenerenderer.cpp.
|
virtual |
Creates a set of legend nodes representing the renderer.
Definition at line 132 of file qgstiledscenerenderer.cpp.
|
virtual |
Returns flags which control how the renderer behaves.
Reimplemented in QgsTiledSceneTextureRenderer, and QgsTiledSceneWireframeRenderer.
Definition at line 70 of file qgstiledscenerenderer.cpp.
|
inline |
Returns whether to render also borders of tiles.
see setTileBorderRenderingEnabled()
Definition at line 231 of file qgstiledscenerenderer.h.
|
virtual |
Returns a list of all rule keys for legend nodes created by the renderer.
Definition at line 137 of file qgstiledscenerenderer.cpp.
|
static |
Creates a renderer from an XML element.
Caller takes ownership of the returned renderer.
Definition at line 75 of file qgstiledscenerenderer.cpp.
double QgsTiledSceneRenderer::maximumScreenError | ( | ) | const |
Returns the maximum screen error allowed when rendering the tiled scene.
Larger values result in a faster render with less detailed features rendered.
Units are retrieved via maximumScreenErrorUnit().
Definition at line 112 of file qgstiledscenerenderer.cpp.
Qgis::RenderUnit QgsTiledSceneRenderer::maximumScreenErrorUnit | ( | ) | const |
Returns the unit for the maximum screen error allowed when rendering the tiled scene.
Definition at line 122 of file qgstiledscenerenderer.cpp.
|
delete |
QgsTiledSceneRenderer cannot be copied – use clone() instead.
|
pure virtual |
Renders a line.
Implemented in QgsTiledSceneTextureRenderer, and QgsTiledSceneWireframeRenderer.
|
pure virtual |
Renders a triangle.
Implemented in QgsTiledSceneTextureRenderer, and QgsTiledSceneWireframeRenderer.
|
protected |
Restores common renderer properties (such as screen error) from the specified DOM element.
Definition at line 149 of file qgstiledscenerenderer.cpp.
|
pure virtual |
Saves the renderer configuration to an XML element.
Implemented in QgsTiledSceneTextureRenderer, and QgsTiledSceneWireframeRenderer.
|
protected |
Saves common renderer properties (such as point size and screen error) to the specified DOM element.
Definition at line 156 of file qgstiledscenerenderer.cpp.
void QgsTiledSceneRenderer::setMaximumScreenError | ( | double | error | ) |
Sets the maximum screen error allowed when rendering the tiled scene.
Larger values result in a faster render with less detailed features rendered.
Units are set via setMaximumScreenErrorUnit().
Definition at line 117 of file qgstiledscenerenderer.cpp.
void QgsTiledSceneRenderer::setMaximumScreenErrorUnit | ( | Qgis::RenderUnit | unit | ) |
Sets the unit for the maximum screen error allowed when rendering the tiled scene.
Definition at line 127 of file qgstiledscenerenderer.cpp.
|
inline |
Sets whether to render the borders of tiles.
Definition at line 224 of file qgstiledscenerenderer.h.
|
virtual |
Must be called when a new render cycle is started.
A call to startRender() must always be followed by a corresponding call to stopRender() after all features have been rendered.
Reimplemented in QgsTiledSceneTextureRenderer, and QgsTiledSceneWireframeRenderer.
Definition at line 91 of file qgstiledscenerenderer.cpp.
|
virtual |
Must be called when a render cycle has finished, to allow the renderer to clean up.
Calls to stopRender() must always be preceded by a call to startRender().
Reimplemented in QgsTiledSceneTextureRenderer, and QgsTiledSceneWireframeRenderer.
Definition at line 105 of file qgstiledscenerenderer.cpp.
|
pure virtual |
Returns the identifier of the renderer type.
Implemented in QgsTiledSceneTextureRenderer, and QgsTiledSceneWireframeRenderer.