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

Stores metadata about one renderer class. More...

#include <qgsrendererv2registry.h>

Inheritance diagram for QgsRendererV2AbstractMetadata:
Inheritance graph
[legend]

Public Member Functions

 QgsRendererV2AbstractMetadata (QString name, QString visibleName, QIcon icon=QIcon())
virtual ~QgsRendererV2AbstractMetadata ()
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 QgsRendererV2WidgetcreateRendererWidget (QgsVectorLayer *layer, QgsStyleV2 *style, QgsFeatureRendererV2 *renderer)
 Return new instance of settings widget for the renderer.
virtual QgsFeatureRendererV2createRendererFromSld (QDomElement &elem, QGis::GeometryType geomType)

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.

Constructor & Destructor Documentation

QgsRendererV2AbstractMetadata::QgsRendererV2AbstractMetadata ( QString  name,
QString  visibleName,
QIcon  icon = QIcon() 
)
inline
virtual QgsRendererV2AbstractMetadata::~QgsRendererV2AbstractMetadata ( )
inlinevirtual

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.

virtual QgsFeatureRendererV2* QgsRendererV2AbstractMetadata::createRendererFromSld ( QDomElement &  elem,
QGis::GeometryType  geomType 
)
inlinevirtual

Reimplemented in QgsRendererV2Metadata.

virtual QgsRendererV2Widget* QgsRendererV2AbstractMetadata::createRendererWidget ( QgsVectorLayer layer,
QgsStyleV2 style,
QgsFeatureRendererV2 renderer 
)
inlinevirtual

Return new instance of settings widget for the renderer.

Returns NULL on error.

Reimplemented in QgsRendererV2Metadata.

QIcon QgsRendererV2AbstractMetadata::icon ( ) const
inline
QString QgsRendererV2AbstractMetadata::name ( ) const
inline
void QgsRendererV2AbstractMetadata::setIcon ( const QIcon &  icon)
inline
QString QgsRendererV2AbstractMetadata::visibleName ( ) const
inline

Member Data Documentation

QIcon QgsRendererV2AbstractMetadata::mIcon
protected

icon to be shown in the renderer properties dialog

QString QgsRendererV2AbstractMetadata::mName
protected

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

QString QgsRendererV2AbstractMetadata::mVisibleName
protected

name visible for users (translatable)


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