QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
QgsTiledSceneRendererAbstractMetadata Class Referenceabstract

Stores metadata about one tiled scene renderer class. More...

#include <qgstiledscenerendererregistry.h>

Inheritance diagram for QgsTiledSceneRendererAbstractMetadata:
Inheritance graph
[legend]

Public Member Functions

 QgsTiledSceneRendererAbstractMetadata (const QString &name, const QString &visibleName, const QIcon &icon=QIcon())
 Constructor for QgsTiledSceneRendererAbstractMetadata, with the specified name.
 
virtual ~QgsTiledSceneRendererAbstractMetadata ()=default
 
virtual QgsTiledSceneRenderercreateRenderer (QDomElement &elem, const QgsReadWriteContext &context)=0
 Returns new instance of the renderer given the DOM element.
 
virtual QgsTiledSceneRendererWidgetcreateRendererWidget (QgsTiledSceneLayer *layer, QgsStyle *style, QgsTiledSceneRenderer *oldRenderer)
 Returns new instance of settings widget for the renderer.
 
QIcon icon () const
 Returns an icon representing the renderer.
 
QString name () const
 Returns the unique name of the renderer.
 
void setIcon (const QIcon &icon)
 Sets an icon representing the renderer.
 
QString visibleName () const
 Returns a friendly display name of the renderer.
 

Protected Attributes

QIcon mIcon
 icon to be shown in the renderer properties dialog
 
QString mName
 name used within QGIS for identification (the same what renderer's type() returns)
 
QString mVisibleName
 name visible for users (translatable)
 

Detailed Description

Stores metadata about one tiled scene renderer class.

Note
It's necessary to implement createRenderer() function. In C++ you can use QgsTiledSceneRendererMetadata convenience class.
Since
QGIS 3.34

Definition at line 43 of file qgstiledscenerendererregistry.h.

Constructor & Destructor Documentation

◆ QgsTiledSceneRendererAbstractMetadata()

QgsTiledSceneRendererAbstractMetadata::QgsTiledSceneRendererAbstractMetadata ( const QString &  name,
const QString &  visibleName,
const QIcon &  icon = QIcon() 
)
inline

Constructor for QgsTiledSceneRendererAbstractMetadata, with the specified name.

The visibleName argument gives a translated, user friendly string identifying the renderer type.

The icon argument can be used to specify an icon representing the renderer.

Definition at line 54 of file qgstiledscenerendererregistry.h.

◆ ~QgsTiledSceneRendererAbstractMetadata()

virtual QgsTiledSceneRendererAbstractMetadata::~QgsTiledSceneRendererAbstractMetadata ( )
virtualdefault

Member Function Documentation

◆ createRenderer()

virtual QgsTiledSceneRenderer * QgsTiledSceneRendererAbstractMetadata::createRenderer ( QDomElement &  elem,
const QgsReadWriteContext context 
)
pure virtual

Returns new instance of the renderer given the DOM element.

Returns nullptr on error. Pure virtual function: must be implemented in derived classes.

Implemented in QgsTiledSceneRendererMetadata.

◆ createRendererWidget()

virtual QgsTiledSceneRendererWidget * QgsTiledSceneRendererAbstractMetadata::createRendererWidget ( QgsTiledSceneLayer layer,
QgsStyle style,
QgsTiledSceneRenderer oldRenderer 
)
inlinevirtual

Returns new instance of settings widget for the renderer.

Returns nullptr on error.

The oldRenderer argument may refer to previously used renderer (or it is nullptr). If not nullptr, it may be used to initialize GUI of the widget from the previous settings. The old renderer does not have to be of the same type as returned by createRenderer().

Note
Not available in Python bindings

Reimplemented in QgsTiledSceneRendererMetadata.

Definition at line 102 of file qgstiledscenerendererregistry.h.

◆ icon()

QIcon QgsTiledSceneRendererAbstractMetadata::icon ( ) const
inline

Returns an icon representing the renderer.

See also
setIcon()

Definition at line 77 of file qgstiledscenerendererregistry.h.

◆ name()

QString QgsTiledSceneRendererAbstractMetadata::name ( ) const
inline

Returns the unique name of the renderer.

This value is not translated.

See also
visibleName()

Definition at line 65 of file qgstiledscenerendererregistry.h.

◆ setIcon()

void QgsTiledSceneRendererAbstractMetadata::setIcon ( const QIcon &  icon)
inline

Sets an icon representing the renderer.

See also
icon()

Definition at line 83 of file qgstiledscenerendererregistry.h.

◆ visibleName()

QString QgsTiledSceneRendererAbstractMetadata::visibleName ( ) const
inline

Returns a friendly display name of the renderer.

This value is translated.

See also
name()

Definition at line 71 of file qgstiledscenerendererregistry.h.

Member Data Documentation

◆ mIcon

QIcon QgsTiledSceneRendererAbstractMetadata::mIcon
protected

icon to be shown in the renderer properties dialog

Definition at line 112 of file qgstiledscenerendererregistry.h.

◆ mName

QString QgsTiledSceneRendererAbstractMetadata::mName
protected

name used within QGIS for identification (the same what renderer's type() returns)

Definition at line 108 of file qgstiledscenerendererregistry.h.

◆ mVisibleName

QString QgsTiledSceneRendererAbstractMetadata::mVisibleName
protected

name visible for users (translatable)

Definition at line 110 of file qgstiledscenerendererregistry.h.


The documentation for this class was generated from the following file: