QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsRendererRegistry Class Reference

Registry of renderers. More...

#include <qgsrendererregistry.h>

Public Member Functions

 QgsRendererRegistry ()
 
 QgsRendererRegistry (const QgsRendererRegistry &rh)=delete
 QgsRendererRegistry cannot be copied.
 
 ~QgsRendererRegistry ()
 
bool addRenderer (QgsRendererAbstractMetadata *metadata)
 Adds a renderer to the registry.
 
QgsRendererRegistryoperator= (const QgsRendererRegistry &rh)=delete
 QgsRendererRegistry cannot be copied.
 
bool removeRenderer (const QString &rendererName)
 Removes a renderer from registry.
 
QgsRendererAbstractMetadatarendererMetadata (const QString &rendererName)
 Returns the metadata for a specified renderer.
 
QStringList renderersList (const QgsVectorLayer *layer) const
 Returns a list of available renderers which are compatible with a specified layer.
 
QStringList renderersList (QgsRendererAbstractMetadata::LayerTypes layerTypes=QgsRendererAbstractMetadata::All) const
 Returns a list of available renderers.
 

Detailed Description

Registry of renderers.

QgsRendererRegistry is not usually directly created, but rather accessed through QgsApplication::rendererRegistry().

Definition at line 227 of file qgsrendererregistry.h.

Constructor & Destructor Documentation

◆ QgsRendererRegistry() [1/2]

QgsRendererRegistry::QgsRendererRegistry ( )

Definition at line 33 of file qgsrendererregistry.cpp.

◆ ~QgsRendererRegistry()

QgsRendererRegistry::~QgsRendererRegistry ( )

Definition at line 106 of file qgsrendererregistry.cpp.

◆ QgsRendererRegistry() [2/2]

QgsRendererRegistry::QgsRendererRegistry ( const QgsRendererRegistry rh)
delete

QgsRendererRegistry cannot be copied.

Member Function Documentation

◆ addRenderer()

bool QgsRendererRegistry::addRenderer ( QgsRendererAbstractMetadata metadata)

Adds a renderer to the registry.

Takes ownership of the metadata object.

Parameters
metadatarenderer metadata
Returns
true if renderer was added successfully, or false if renderer could not be added (e.g., a renderer with a duplicate name already exists)

Definition at line 111 of file qgsrendererregistry.cpp.

◆ operator=()

QgsRendererRegistry & QgsRendererRegistry::operator= ( const QgsRendererRegistry rh)
delete

QgsRendererRegistry cannot be copied.

◆ removeRenderer()

bool QgsRendererRegistry::removeRenderer ( const QString &  rendererName)

Removes a renderer from registry.

Parameters
rendererNamename of renderer to remove from registry
Returns
true if renderer was successfully removed, or false if matching renderer could not be found

Definition at line 121 of file qgsrendererregistry.cpp.

◆ rendererMetadata()

QgsRendererAbstractMetadata * QgsRendererRegistry::rendererMetadata ( const QString &  rendererName)

Returns the metadata for a specified renderer.

Returns nullptr if a matching renderer was not found in the registry.

Definition at line 132 of file qgsrendererregistry.cpp.

◆ renderersList() [1/2]

QStringList QgsRendererRegistry::renderersList ( const QgsVectorLayer layer) const

Returns a list of available renderers which are compatible with a specified layer.

Parameters
layervector layer
Since
QGIS 2.16

Definition at line 150 of file qgsrendererregistry.cpp.

◆ renderersList() [2/2]

QStringList QgsRendererRegistry::renderersList ( QgsRendererAbstractMetadata::LayerTypes  layerTypes = QgsRendererAbstractMetadata::All) const

Returns a list of available renderers.

Parameters
layerTypesflags to filter the renderers by compatible layer types

Definition at line 137 of file qgsrendererregistry.cpp.


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