QGIS API Documentation  2.0.1-Dufour
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
QgsRendererV2Registry Class Reference

Registry of renderers. More...

#include <qgsrendererv2registry.h>

Collaboration diagram for QgsRendererV2Registry:
Collaboration graph
[legend]

Public Member Functions

bool addRenderer (QgsRendererV2AbstractMetadata *metadata)
 add a renderer to registry. Takes ownership of the metadata object.
bool removeRenderer (QString rendererName)
 remove renderer from registry
QgsRendererV2AbstractMetadatarendererMetadata (QString rendererName)
 get metadata for particular renderer. Returns NULL if not found in registry.
QStringList renderersList ()
 return a list of available renderers

Static Public Member Functions

static QgsRendererV2Registryinstance ()

Protected Member Functions

 QgsRendererV2Registry ()
 protected constructor
 ~QgsRendererV2Registry ()

Protected Attributes

QMap< QString,
QgsRendererV2AbstractMetadata * > 
mRenderers
QStringList mRenderersOrder
 list to keep order in which renderers have been added

Static Protected Attributes

static QgsRendererV2RegistrymInstance = NULL

Detailed Description

Registry of renderers.

This is a singleton, renderers can be added / removed at any time

Definition at line 136 of file qgsrendererv2registry.h.

Constructor & Destructor Documentation

QgsRendererV2Registry::QgsRendererV2Registry ( )
protected
QgsRendererV2Registry::~QgsRendererV2Registry ( )
protected

Definition at line 51 of file qgsrendererv2registry.cpp.

References mRenderers.

Member Function Documentation

bool QgsRendererV2Registry::addRenderer ( QgsRendererV2AbstractMetadata metadata)

add a renderer to registry. Takes ownership of the metadata object.

Definition at line 69 of file qgsrendererv2registry.cpp.

References mRenderers, mRenderersOrder, and QgsRendererV2AbstractMetadata::name().

Referenced by QgsRendererV2Registry().

QgsRendererV2Registry * QgsRendererV2Registry::instance ( )
static
bool QgsRendererV2Registry::removeRenderer ( QString  rendererName)

remove renderer from registry

Definition at line 79 of file qgsrendererv2registry.cpp.

References mRenderers, and mRenderersOrder.

QgsRendererV2AbstractMetadata * QgsRendererV2Registry::rendererMetadata ( QString  rendererName)

get metadata for particular renderer. Returns NULL if not found in registry.

Definition at line 90 of file qgsrendererv2registry.cpp.

References mRenderers.

Referenced by QgsFeatureRendererV2::load(), and QgsFeatureRendererV2::loadSld().

QStringList QgsRendererV2Registry::renderersList ( )

return a list of available renderers

Definition at line 95 of file qgsrendererv2registry.cpp.

References mRenderersOrder.

Member Data Documentation

QgsRendererV2Registry * QgsRendererV2Registry::mInstance = NULL
staticprotected

Definition at line 159 of file qgsrendererv2registry.h.

Referenced by instance().

QMap<QString, QgsRendererV2AbstractMetadata*> QgsRendererV2Registry::mRenderers
protected
QStringList QgsRendererV2Registry::mRenderersOrder
protected

list to keep order in which renderers have been added

Definition at line 164 of file qgsrendererv2registry.h.

Referenced by addRenderer(), removeRenderer(), and renderersList().


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