QGIS API Documentation  3.20.0-Odense (decaadbb31)
Public Member Functions | Protected Attributes | List of all members
QgsPointCloudRendererAbstractMetadata Class Referenceabstract

Stores metadata about one point cloud renderer class. More...

#include <qgspointcloudrendererregistry.h>

Inheritance diagram for QgsPointCloudRendererAbstractMetadata:
Inheritance graph
[legend]

Public Member Functions

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

Protected Attributes

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

Detailed Description

Stores metadata about one point cloud renderer class.

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

Definition at line 45 of file qgspointcloudrendererregistry.h.

Constructor & Destructor Documentation

◆ QgsPointCloudRendererAbstractMetadata()

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

Constructor for QgsPointCloudRendererAbstractMetadata, 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 56 of file qgspointcloudrendererregistry.h.

◆ ~QgsPointCloudRendererAbstractMetadata()

virtual QgsPointCloudRendererAbstractMetadata::~QgsPointCloudRendererAbstractMetadata ( )
virtualdefault

Member Function Documentation

◆ createRenderer()

virtual QgsPointCloudRenderer* QgsPointCloudRendererAbstractMetadata::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 QgsPointCloudRendererMetadata.

◆ createRendererWidget()

virtual QgsPointCloudRendererWidget* QgsPointCloudRendererAbstractMetadata::createRendererWidget ( QgsPointCloudLayer layer,
QgsStyle style,
QgsPointCloudRenderer 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 QgsPointCloudRendererMetadata.

Definition at line 104 of file qgspointcloudrendererregistry.h.

◆ icon()

QIcon QgsPointCloudRendererAbstractMetadata::icon ( ) const
inline

Returns an icon representing the renderer.

See also
setIcon()

Definition at line 79 of file qgspointcloudrendererregistry.h.

◆ name()

QString QgsPointCloudRendererAbstractMetadata::name ( ) const
inline

Returns the unique name of the renderer.

This value is not translated.

See also
visibleName()

Definition at line 67 of file qgspointcloudrendererregistry.h.

◆ setIcon()

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

Sets an icon representing the renderer.

See also
icon()

Definition at line 85 of file qgspointcloudrendererregistry.h.

◆ visibleName()

QString QgsPointCloudRendererAbstractMetadata::visibleName ( ) const
inline

Returns a friendly display name of the renderer.

This value is translated.

See also
name()

Definition at line 73 of file qgspointcloudrendererregistry.h.

Member Data Documentation

◆ mIcon

QIcon QgsPointCloudRendererAbstractMetadata::mIcon
protected

icon to be shown in the renderer properties dialog

Definition at line 114 of file qgspointcloudrendererregistry.h.

◆ mName

QString QgsPointCloudRendererAbstractMetadata::mName
protected

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

Definition at line 110 of file qgspointcloudrendererregistry.h.

◆ mVisibleName

QString QgsPointCloudRendererAbstractMetadata::mVisibleName
protected

name visible for users (translatable)

Definition at line 112 of file qgspointcloudrendererregistry.h.


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