QGIS API Documentation
3.0.2-Girona (307d082)
|
Stores metadata about one renderer class. More...
#include <qgsrendererregistry.h>
Public Types | |
enum | LayerType { PointLayer = 1, LineLayer = 2, PolygonLayer = 4, All = PointLayer | LineLayer | PolygonLayer } |
Layer types the renderer is compatible with. More... | |
Public Member Functions | |
QgsRendererAbstractMetadata (const QString &name, const QString &visibleName, const QIcon &icon=QIcon()) | |
virtual | ~QgsRendererAbstractMetadata ()=default |
virtual QgsRendererAbstractMetadata::LayerTypes | compatibleLayerTypes () const |
Returns flags indicating the types of layer the renderer is compatible with. More... | |
virtual QgsFeatureRenderer * | createRenderer (QDomElement &elem, const QgsReadWriteContext &context)=0 |
Return new instance of the renderer given the DOM element. More... | |
virtual QgsFeatureRenderer * | createRendererFromSld (QDomElement &elem, QgsWkbTypes::GeometryType geomType) |
virtual QgsRendererWidget * | createRendererWidget (QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *oldRenderer) |
Return new instance of settings widget for the renderer. More... | |
QIcon | icon () const |
QString | name () const |
void | setIcon (const QIcon &icon) |
QString | visibleName () const |
Protected Attributes | |
QIcon | mIcon |
icon to be shown in the renderer properties dialog More... | |
QString | mName |
name used within QGIS for identification (the same what renderer's type() returns) More... | |
QString | mVisibleName |
name visible for users (translatable) More... | |
Stores metadata about one renderer class.
Definition at line 40 of file qgsrendererregistry.h.
Layer types the renderer is compatible with.
Enumerator | |
---|---|
PointLayer | Compatible with point layers. |
LineLayer | Compatible with line layers. |
PolygonLayer | Compatible with polygon layers. |
All | Compatible with all vector layers. |
Definition at line 48 of file qgsrendererregistry.h.
|
inline |
Definition at line 57 of file qgsrendererregistry.h.
|
virtualdefault |
|
inlinevirtual |
Returns flags indicating the types of layer the renderer is compatible with.
Reimplemented in QgsRendererMetadata.
Definition at line 74 of file qgsrendererregistry.h.
|
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 QgsRendererMetadata.
|
inlinevirtual |
Reimplemented in QgsRendererMetadata.
Definition at line 92 of file qgsrendererregistry.h.
|
inlinevirtual |
Return new instance of settings widget for the renderer.
Returns NULL on error.
The oldRenderer argument may refer to previously used renderer (or it is null). If not null, it may be used to initialize GUI of the widget from the previous settings. The old renderer does not have to be of the same type as returned by createRenderer(). When using oldRenderer make sure to make a copy of it - it will be deleted afterwards.
Reimplemented in QgsRendererMetadata.
Definition at line 89 of file qgsrendererregistry.h.
|
inline |
Definition at line 67 of file qgsrendererregistry.h.
|
inline |
Definition at line 64 of file qgsrendererregistry.h.
|
inline |
Definition at line 68 of file qgsrendererregistry.h.
|
inline |
Definition at line 65 of file qgsrendererregistry.h.
|
protected |
icon to be shown in the renderer properties dialog
Definition at line 101 of file qgsrendererregistry.h.
|
protected |
name used within QGIS for identification (the same what renderer's type() returns)
Definition at line 97 of file qgsrendererregistry.h.
|
protected |
name visible for users (translatable)
Definition at line 99 of file qgsrendererregistry.h.