QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
20 #include <QDomDocument>
21 #include <QDomElement>
43 if ( !selected && !drawVertexMarker )
57 mSymbol->startRender( context );
71 mSymbol->stopRender( context );
83 return QSet<QString>();
88 return QStringLiteral(
"NULL" );
115 rendererElem.setAttribute( QStringLiteral(
"type" ), QStringLiteral(
"nullSymbol" ) );
124 std::unique_ptr< QgsNullSymbolRenderer > res = std::make_unique< QgsNullSymbolRenderer >();
126 return res.release();
void copyRendererData(QgsFeatureRenderer *destRenderer) const
Clones generic renderer data to another renderer.
QSet< QString > usedAttributes(const QgsRenderContext &context) const override
Returns a list of attributes required by this renderer.
bool renderFeature(const QgsFeature &feature, QgsRenderContext &context, int layer=-1, bool selected=false, bool drawVertexMarker=false) override SIP_THROW(QgsCsException)
Render a feature using this renderer in the given context.
double mCurrentVertexMarkerSize
The current size of editing marker.
The class is used as a container of context for various read/write operations on other objects.
static QgsSymbol * defaultSymbol(QgsWkbTypes::GeometryType geomType)
Returns a new default symbol for the specified geometry type.
QgsFeatureRenderer * clone() const override
Create a deep copy of this renderer.
QString dump() const override
Returns debug information about this renderer.
Qgis::VertexMarkerType mCurrentVertexMarkerType
The current type of editing marker.
Contains information about the context of a rendering operation.
Abstract base class for all rendered symbols.
virtual void stopRender(QgsRenderContext &context)
Must be called when a render cycle has finished, to allow the renderer to clean up.
void stopRender(QgsRenderContext &context) override
Must be called when a render cycle has finished, to allow the renderer to clean up.
QList< QgsSymbol * > QgsSymbolList
static QgsNullSymbolRenderer * convertFromRenderer(const QgsFeatureRenderer *renderer)
Creates a QgsNullSymbolRenderer from an existing renderer.
void saveRendererData(QDomDocument &doc, QDomElement &element, const QgsReadWriteContext &context)
Saves generic renderer data into the specified element.
#define RENDERER_TAG_NAME
bool willRenderFeature(const QgsFeature &feature, QgsRenderContext &context) const override
Returns whether the renderer will render a feature or not.
QgsSymbol * originalSymbolForFeature(const QgsFeature &feature, QgsRenderContext &context) const override
Returns symbol for feature.
static QgsFeatureRenderer * create(QDomElement &element, const QgsReadWriteContext &context)
Creates a null renderer from XML element.
Null symbol renderer. Renderer which draws no symbols for features by default, but allows for labelin...
QDomElement save(QDomDocument &doc, const QgsReadWriteContext &context) override
Stores renderer properties to an XML element.
bool hasGeometry() const
Returns true if the feature has an associated geometry.
QgsSymbolList symbols(QgsRenderContext &context) const override
Returns list of symbols used by the renderer.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
QgsSymbol * symbolForFeature(const QgsFeature &feature, QgsRenderContext &context) const override
To be overridden.
QgsWkbTypes::GeometryType type