35 QObject::tr(
"No Symbols" ),
39 QObject::tr(
"Single Symbol" ),
44 QObject::tr(
"Categorized" ),
48 QObject::tr(
"Graduated" ),
52 QObject::tr(
"Rule-based" ),
57 QObject::tr(
"Point Displacement" ),
64 QObject::tr(
"Point Cluster" ),
71 QObject::tr(
"Merged Features" ),
78 QObject::tr(
"Inverted Polygons" ),
85 QObject::tr(
"Heatmap" ),
93 QObject::tr(
"2.5 D" ),
102 qDeleteAll( mRenderers );
107 if ( !metadata || mRenderers.contains( metadata->
name() ) )
110 mRenderers[metadata->
name()] = metadata;
111 mRenderersOrder << metadata->
name();
117 if ( !mRenderers.contains( rendererName ) )
120 delete mRenderers[rendererName];
121 mRenderers.remove( rendererName );
122 mRenderersOrder.removeAll( rendererName );
128 return mRenderers.value( rendererName );
133 QStringList renderers;
134 const auto constMRenderersOrder = mRenderersOrder;
135 for (
const QString &renderer : constMRenderersOrder )
139 renderers << renderer;
static QgsFeatureRenderer * create(QDomElement &element, const QgsReadWriteContext &context)
Create a new 2.5D renderer from XML.
static QgsFeatureRenderer * create(QDomElement &element, const QgsReadWriteContext &context)
Creates a categorized renderer from an XML element.
static QgsFeatureRenderer * create(QDomElement &element, const QgsReadWriteContext &context)
create renderer from XML element
static QgsFeatureRenderer * create(QDomElement &element, const QgsReadWriteContext &context)
Creates a new heatmap renderer instance from XML.
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 renderer out of an XML, for loading.
static QgsFeatureRenderer * create(QDomElement &element, const QgsReadWriteContext &context)
Creates a null renderer from XML element.
static QgsFeatureRenderer * create(QDomElement &symbologyElem, const QgsReadWriteContext &context)
Creates a renderer from XML element.
static QgsFeatureRenderer * create(QDomElement &symbologyElem, const QgsReadWriteContext &context)
Create a renderer from XML element.
bool addRenderer(QgsRendererAbstractMetadata *metadata)
Adds a renderer to the registry.
QStringList renderersList(QgsRendererAbstractMetadata::LayerTypes layerTypes=QgsRendererAbstractMetadata::All) const
Returns a list of available renderers.
QgsRendererAbstractMetadata * rendererMetadata(const QString &rendererName)
Returns the metadata for a specified renderer.
bool removeRenderer(const QString &rendererName)
Removes a renderer from registry.
static QgsFeatureRenderer * create(QDomElement &element, const QgsReadWriteContext &context)
Creates a new rule-based renderer instance from XML.
static QgsFeatureRenderer * createFromSld(QDomElement &element, QgsWkbTypes::GeometryType geomType)
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 * createFromSld(QDomElement &element, QgsWkbTypes::GeometryType geomType)
Creates a new single symbol renderer from an SLD element.
Represents a vector layer which manages a vector based data sets.
Q_INVOKABLE QgsWkbTypes::GeometryType geometryType() const
Returns point, line or polygon.