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" ) );
118 Q_UNUSED( renderer );
The class is used as a container of context for various read/write operations on other objects...
QString dump() const override
Returns debug information about this renderer.
QgsFeatureRenderer * clone() const override
Create a deep copy of this renderer.
QDomElement save(QDomDocument &doc, const QgsReadWriteContext &context) override
store renderer info to XML element
#define RENDERER_TAG_NAME
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
QgsSymbol * originalSymbolForFeature(QgsFeature &feature, QgsRenderContext &context) override
Return symbol for feature.
bool hasGeometry() const
Returns true if the feature has an associated geometry.
QList< QgsSymbol * > QgsSymbolList
static QgsSymbol * defaultSymbol(QgsWkbTypes::GeometryType geomType)
return new default symbol for specified geometry type
bool willRenderFeature(QgsFeature &feat, QgsRenderContext &context) override
Returns whether the renderer will render a feature or not.
static QgsFeatureRenderer * create(QDomElement &element, const QgsReadWriteContext &context)
Creates a null renderer from XML element.
QgsGeometry geometry() const
Returns the geometry associated with this feature.
bool renderFeature(QgsFeature &feature, QgsRenderContext &context, int layer=-1, bool selected=false, bool drawVertexMarker=false) override
Render a feature using this renderer in the given context.
QgsWkbTypes::GeometryType type() const
Returns type of the geometry as a QgsWkbTypes::GeometryType.
QgsSymbol * symbolForFeature(QgsFeature &feature, QgsRenderContext &context) override
To be overridden.
Contains information about the context of a rendering operation.
int mCurrentVertexMarkerSize
The current size of editing marker.
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.
QgsSymbolList symbols(QgsRenderContext &context) override
Returns list of symbols used by the renderer.
int mCurrentVertexMarkerType
The current type of editing marker.
static QgsNullSymbolRenderer * convertFromRenderer(const QgsFeatureRenderer *renderer)
Creates a QgsNullSymbolRenderer from an existing renderer.
QSet< QString > usedAttributes(const QgsRenderContext &context) const override
Return a list of attributes required by this renderer.