QGIS API Documentation
3.20.0-Odense (decaadbb31)
|
Registry of renderers. More...
#include <qgsrendererregistry.h>
Public Member Functions | |
QgsRendererRegistry () | |
QgsRendererRegistry (const QgsRendererRegistry &rh)=delete | |
QgsRendererRegistry cannot be copied. More... | |
~QgsRendererRegistry () | |
bool | addRenderer (QgsRendererAbstractMetadata *metadata) |
Adds a renderer to the registry. More... | |
QgsRendererRegistry & | operator= (const QgsRendererRegistry &rh)=delete |
QgsRendererRegistry cannot be copied. More... | |
bool | removeRenderer (const QString &rendererName) |
Removes a renderer from registry. More... | |
QgsRendererAbstractMetadata * | rendererMetadata (const QString &rendererName) |
Returns the metadata for a specified renderer. More... | |
QStringList | renderersList (const QgsVectorLayer *layer) const |
Returns a list of available renderers which are compatible with a specified layer. More... | |
QStringList | renderersList (QgsRendererAbstractMetadata::LayerTypes layerTypes=QgsRendererAbstractMetadata::All) const |
Returns a list of available renderers. More... | |
Registry of renderers.
QgsRendererRegistry is not usually directly created, but rather accessed through QgsApplication::rendererRegistry().
Definition at line 224 of file qgsrendererregistry.h.
QgsRendererRegistry::QgsRendererRegistry | ( | ) |
Definition at line 33 of file qgsrendererregistry.cpp.
QgsRendererRegistry::~QgsRendererRegistry | ( | ) |
Definition at line 106 of file qgsrendererregistry.cpp.
|
delete |
QgsRendererRegistry cannot be copied.
bool QgsRendererRegistry::addRenderer | ( | QgsRendererAbstractMetadata * | metadata | ) |
Adds a renderer to the registry.
Takes ownership of the metadata object.
metadata | renderer metadata |
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.
|
delete |
QgsRendererRegistry cannot be copied.
bool QgsRendererRegistry::removeRenderer | ( | const QString & | rendererName | ) |
Removes a renderer from registry.
rendererName | name of renderer to remove from registry |
true
if renderer was successfully removed, or false
if matching renderer could not be found Definition at line 121 of file qgsrendererregistry.cpp.
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.
QStringList QgsRendererRegistry::renderersList | ( | const QgsVectorLayer * | layer | ) | const |
Returns a list of available renderers which are compatible with a specified layer.
layer | vector layer |
Definition at line 150 of file qgsrendererregistry.cpp.
QStringList QgsRendererRegistry::renderersList | ( | QgsRendererAbstractMetadata::LayerTypes | layerTypes = QgsRendererAbstractMetadata::All | ) | const |
Returns a list of available renderers.
layerTypes | flags to filter the renderers by compatible layer types |
Definition at line 137 of file qgsrendererregistry.cpp.