Quantum GIS API Documentation  1.7.4
Public Member Functions | Protected Attributes
QgsRendererV2AbstractMetadata Class Reference

Stores metadata about one renderer class. More...

#include <qgsrendererv2registry.h>

Inheritance diagram for QgsRendererV2AbstractMetadata:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 QgsRendererV2AbstractMetadata (QString name, QString visibleName, QIcon icon=QIcon())
QString name () const
QString visibleName () const
QIcon icon () const
void setIcon (const QIcon &icon)
virtual QgsFeatureRendererV2createRenderer (QDomElement &elem)=0
 Return new instance of the renderer given the DOM element.
virtual QgsRendererV2Widget * createRendererWidget (QgsVectorLayer *layer, QgsStyleV2 *style, QgsFeatureRendererV2 *renderer)
 Return new instance of settings widget for the renderer.

Protected Attributes

QString mName
 name used within QGIS for identification (the same what renderer's type() returns)
QString mVisibleName
 name visible for users (translatable)
QIcon mIcon
 icon to be shown in the renderer properties dialog

Detailed Description

Stores metadata about one renderer class.

Note:
It's necessary to implement createRenderer() function. In C++ you can use QgsRendererV2Metadata convenience class.

Definition at line 20 of file qgsrendererv2registry.h.


Constructor & Destructor Documentation

QgsRendererV2AbstractMetadata::QgsRendererV2AbstractMetadata ( QString  name,
QString  visibleName,
QIcon  icon = QIcon() 
) [inline]

Definition at line 23 of file qgsrendererv2registry.h.


Member Function Documentation

virtual QgsFeatureRendererV2* QgsRendererV2AbstractMetadata::createRenderer ( QDomElement &  elem) [pure virtual]

Return new instance of the renderer given the DOM element.

Returns NULL on error. Pure virtual function: must be implemented in derived classes.

Implemented in QgsRendererV2Metadata.

Referenced by QgsFeatureRendererV2::load().

virtual QgsRendererV2Widget* QgsRendererV2AbstractMetadata::createRendererWidget ( QgsVectorLayer layer,
QgsStyleV2 style,
QgsFeatureRendererV2 renderer 
) [inline, virtual]

Return new instance of settings widget for the renderer.

Returns NULL on error.

Reimplemented in QgsRendererV2Metadata.

Definition at line 36 of file qgsrendererv2registry.h.

QIcon QgsRendererV2AbstractMetadata::icon ( ) const [inline]

Definition at line 29 of file qgsrendererv2registry.h.

QString QgsRendererV2AbstractMetadata::name ( ) const [inline]

Definition at line 26 of file qgsrendererv2registry.h.

Referenced by QgsRendererV2Registry::addRenderer().

void QgsRendererV2AbstractMetadata::setIcon ( const QIcon &  icon) [inline]

Definition at line 30 of file qgsrendererv2registry.h.

QString QgsRendererV2AbstractMetadata::visibleName ( ) const [inline]

Definition at line 27 of file qgsrendererv2registry.h.


Member Data Documentation

icon to be shown in the renderer properties dialog

Definition at line 45 of file qgsrendererv2registry.h.

name used within QGIS for identification (the same what renderer's type() returns)

Definition at line 41 of file qgsrendererv2registry.h.

name visible for users (translatable)

Definition at line 43 of file qgsrendererv2registry.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines