QGIS API Documentation 3.41.0-Master (57ec4277f5e)
|
Registry of renderers. More...
#include <qgsrendererregistry.h>
Public Member Functions | |
QgsRendererRegistry () | |
QgsRendererRegistry (const QgsRendererRegistry &rh)=delete | |
~QgsRendererRegistry () | |
bool | addRenderer (QgsRendererAbstractMetadata *metadata) |
Adds a renderer to the registry. | |
QgsRendererRegistry & | operator= (const QgsRendererRegistry &rh)=delete |
bool | removeRenderer (const QString &rendererName) |
Removes a renderer from registry. | |
QgsRendererAbstractMetadata * | rendererMetadata (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. | |
Registry of renderers.
QgsRendererRegistry is not usually directly created, but rather accessed through QgsApplication::rendererRegistry().
Definition at line 225 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 |
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 |
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.