QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
|
Registry of renderers. More...
#include <qgsrendererv2registry.h>
Public Member Functions | |
bool | addRenderer (QgsRendererV2AbstractMetadata *metadata) |
Adds a renderer to the registry. More... | |
bool | removeRenderer (const QString &rendererName) |
Removes a renderer from registry. More... | |
QgsRendererV2AbstractMetadata * | rendererMetadata (const QString &rendererName) |
Returns the metadata for a specified renderer. More... | |
QStringList | renderersList (QgsRendererV2AbstractMetadata::LayerTypes layerTypes=QgsRendererV2AbstractMetadata::All) const |
Returns a list of available renderers. More... | |
QStringList | renderersList (const QgsVectorLayer *layer) const |
Returns a list of available renderers which are compatible with a specified layer. More... | |
Static Public Member Functions | |
static QgsRendererV2Registry * | instance () |
Returns a pointer to the QgsRendererV2Registry singleton. More... | |
Protected Member Functions | |
QgsRendererV2Registry () | |
protected constructor More... | |
~QgsRendererV2Registry () | |
Protected Attributes | |
QMap< QString, QgsRendererV2AbstractMetadata * > | mRenderers |
Map of name to renderer. More... | |
QStringList | mRenderersOrder |
List of renderers, maintained in the order that they have been added. More... | |
Registry of renderers.
This is a singleton, renderers can be added / removed at any time
Definition at line 180 of file qgsrendererv2registry.h.
|
protected |
protected constructor
Definition at line 29 of file qgsrendererv2registry.cpp.
|
protected |
Definition at line 84 of file qgsrendererv2registry.cpp.
bool QgsRendererV2Registry::addRenderer | ( | QgsRendererV2AbstractMetadata * | metadata | ) |
Adds a renderer to the registry.
Takes ownership of the metadata object.
metadata | renderer metadata |
Definition at line 96 of file qgsrendererv2registry.cpp.
|
static |
Returns a pointer to the QgsRendererV2Registry singleton.
Definition at line 89 of file qgsrendererv2registry.cpp.
bool QgsRendererV2Registry::removeRenderer | ( | const QString & | rendererName | ) |
Removes a renderer from registry.
rendererName | name of renderer to remove from registry |
Definition at line 106 of file qgsrendererv2registry.cpp.
QgsRendererV2AbstractMetadata * QgsRendererV2Registry::rendererMetadata | ( | const QString & | rendererName | ) |
Returns the metadata for a specified renderer.
Returns NULL if a matching renderer was not found in the registry.
Definition at line 117 of file qgsrendererv2registry.cpp.
QStringList QgsRendererV2Registry::renderersList | ( | QgsRendererV2AbstractMetadata::LayerTypes | layerTypes = QgsRendererV2AbstractMetadata::All | ) | const |
Returns a list of available renderers.
layerTypes | flags to filter the renderers by compatible layer types |
Definition at line 124 of file qgsrendererv2registry.cpp.
QStringList QgsRendererV2Registry::renderersList | ( | const QgsVectorLayer * | layer | ) | const |
Returns a list of available renderers which are compatible with a specified layer.
layer | vector layer |
Definition at line 135 of file qgsrendererv2registry.cpp.
|
protected |
Map of name to renderer.
Definition at line 218 of file qgsrendererv2registry.h.
|
protected |
List of renderers, maintained in the order that they have been added.
Definition at line 221 of file qgsrendererv2registry.h.