34 QObject::tr(
"No symbols" ),
38 QObject::tr(
"Single symbol" ),
43 QObject::tr(
"Categorized" ),
47 QObject::tr(
"Graduated" ),
51 QObject::tr(
"Rule-based" ),
56 QObject::tr(
"Point displacement" ),
63 QObject::tr(
"Point cluster" ),
70 QObject::tr(
"Inverted polygons" ),
77 QObject::tr(
"Heatmap" ),
85 QObject::tr(
"2.5 D" ),
94 qDeleteAll( mRenderers );
99 if ( !metadata || mRenderers.contains( metadata->
name() ) )
102 mRenderers[metadata->
name()] = metadata;
103 mRenderersOrder << metadata->
name();
109 if ( !mRenderers.contains( rendererName ) )
112 delete mRenderers[rendererName];
113 mRenderers.remove( rendererName );
114 mRenderersOrder.removeAll( rendererName );
120 return mRenderers.value( rendererName );
125 QStringList renderers;
126 const auto constMRenderersOrder = mRenderersOrder;
127 for (
const QString &renderer : constMRenderersOrder )
131 renderers << renderer;
static QgsFeatureRenderer * create(QDomElement &element, const QgsReadWriteContext &context)
Creates a new single symbol renderer from an XML element, using the supplied read/write context...
static QgsFeatureRenderer * create(QDomElement &symbologyElem, const QgsReadWriteContext &context)
Create a renderer from XML element.
static QgsFeatureRenderer * create(QDomElement &element, const QgsReadWriteContext &context)
Creates a renderer out of an XML, for loading.
static QgsFeatureRenderer * create(QDomElement &element, const QgsReadWriteContext &context)
Creates a categorized renderer from an XML element.
QgsWkbTypes::GeometryType geometryType() const
Returns point, line or polygon.
static QgsFeatureRenderer * create(QDomElement &element, const QgsReadWriteContext &context)
create renderer from XML element
QStringList renderersList(QgsRendererAbstractMetadata::LayerTypes layerTypes=QgsRendererAbstractMetadata::All) const
Returns a list of available renderers.
static QgsFeatureRenderer * create(QDomElement &element, const QgsReadWriteContext &context)
Creates a new heatmap renderer instance from XML.
static QgsFeatureRenderer * createFromSld(QDomElement &element, QgsWkbTypes::GeometryType geomType)
Creates a new single symbol renderer from an SLD element.
static QgsFeatureRenderer * createFromSld(QDomElement &element, QgsWkbTypes::GeometryType geomType)
static QgsFeatureRenderer * create(QDomElement &element, const QgsReadWriteContext &context)
Creates a new rule-based renderer instance from XML.
static QgsFeatureRenderer * create(QDomElement &symbologyElem, const QgsReadWriteContext &context)
Creates a renderer from XML element.
QgsRendererAbstractMetadata * rendererMetadata(const QString &rendererName)
Returns the metadata for a specified renderer.
static QgsFeatureRenderer * create(QDomElement &element, const QgsReadWriteContext &context)
Creates a null renderer from XML element.
bool addRenderer(QgsRendererAbstractMetadata *metadata)
Adds a renderer to the registry.
static QgsFeatureRenderer * create(QDomElement &element, const QgsReadWriteContext &context)
Create a new 2.5D renderer from XML.
Represents a vector layer which manages a vector based data sets.
bool removeRenderer(const QString &rendererName)
Removes a renderer from registry.