20 #include <QDomDocument>
21 #include <QDomElement>
41 if ( !selected && !drawVertexMarker )
55 mSymbol->startRender( context );
69 mSymbol->stopRender( context );
81 return QSet<QString>();
86 return QStringLiteral(
"NULL" );
112 rendererElem.setAttribute( QStringLiteral(
"type" ), QStringLiteral(
"nullSymbol" ) );
virtual void stopRender(QgsRenderContext &context)
Must be called when a render cycle has finished, to allow the renderer to clean up.
int mCurrentVertexMarkerType
The current type of editing marker.
double mCurrentVertexMarkerSize
The current size of editing marker.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
bool hasGeometry() const
Returns true if the feature has an associated geometry.
QgsWkbTypes::GeometryType type
QDomElement save(QDomDocument &doc, const QgsReadWriteContext &context) override
store renderer info to XML element
QgsSymbol * originalSymbolForFeature(const QgsFeature &feature, QgsRenderContext &context) const override
Returns symbol for feature.
QgsSymbol * symbolForFeature(const QgsFeature &feature, QgsRenderContext &context) const override
To be overridden.
QSet< QString > usedAttributes(const QgsRenderContext &context) const override
Returns a list of attributes required by this renderer.
bool willRenderFeature(const QgsFeature &feature, QgsRenderContext &context) const override
Returns whether the renderer will render a feature or not.
static QgsNullSymbolRenderer * convertFromRenderer(const QgsFeatureRenderer *renderer)
Creates a QgsNullSymbolRenderer from an existing 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.
void stopRender(QgsRenderContext &context) override
Must be called when a render cycle has finished, to allow the renderer to clean up.
QgsSymbolList symbols(QgsRenderContext &context) const override
Returns list of symbols used by the renderer.
QgsFeatureRenderer * clone() const override
Create a deep copy of this renderer.
QString dump() const override
Returns debug information about this renderer.
static QgsFeatureRenderer * create(QDomElement &element, const QgsReadWriteContext &context)
Creates a null renderer from XML element.
The class is used as a container of context for various read/write operations on other objects.
Contains information about the context of a rendering operation.
Abstract base class for all rendered symbols.
static QgsSymbol * defaultSymbol(QgsWkbTypes::GeometryType geomType)
Returns a new default symbol for the specified geometry type.
#define RENDERER_TAG_NAME
QList< QgsSymbol * > QgsSymbolList