QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
qgsnullsymbolrenderer.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsnullsymbolrenderer.h
3  ---------------------
4  begin : November 2014
5  copyright : (C) 2014 by Nyall Dawson
6  email : nyall dot dawson at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 #ifndef QGSNULLSYMBOLRENDERER_H
16 #define QGSNULLSYMBOLRENDERER_H
17 
18 #include "qgis.h"
19 #include "qgsrendererv2.h"
20 #include "qgssymbolv2.h"
21 
29 class CORE_EXPORT QgsNullSymbolRenderer : public QgsFeatureRendererV2
30 {
31  public:
32 
34 
35  virtual ~QgsNullSymbolRenderer();
36 
37  virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature, QgsRenderContext& context ) override;
38  virtual QgsSymbolV2* originalSymbolForFeature( QgsFeature& feature, QgsRenderContext& context ) override;
39 
40  virtual bool renderFeature( QgsFeature& feature, QgsRenderContext& context, int layer = -1, bool selected = false, bool drawVertexMarker = false ) override;
41  virtual void startRender( QgsRenderContext& context, const QgsFields& fields ) override;
42  virtual void stopRender( QgsRenderContext& context ) override;
43  virtual bool willRenderFeature( QgsFeature& feat, QgsRenderContext& context ) override;
44 
45  virtual QList<QString> usedAttributes() override;
46  virtual QString dump() const override;
47  virtual QgsFeatureRendererV2* clone() const override;
48  virtual QgsSymbolV2List symbols( QgsRenderContext& context ) override;
49 
54  static QgsFeatureRendererV2* create( QDomElement& element );
55 
56  virtual QDomElement save( QDomDocument& doc ) override;
57 
62  static QgsNullSymbolRenderer* convertFromRenderer( const QgsFeatureRendererV2 *renderer );
63 
64  private:
65 
68 
69 };
70 
71 #endif // QGSNULLSYMBOLRENDERER_H
virtual Q_DECL_DEPRECATED QgsSymbolV2 * originalSymbolForFeature(QgsFeature &feature)
Return symbol for feature.
virtual QDomElement save(QDomDocument &doc)
store renderer info to XML element
Container of fields for a vector layer.
Definition: qgsfield.h:252
virtual QList< QString > usedAttributes()=0
Returns a set of attributes required for this renderer.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
Definition: qgsfeature.h:187
virtual Q_DECL_DEPRECATED bool willRenderFeature(QgsFeature &feat)
Returns whether the renderer will render a feature or not.
virtual void startRender(QgsRenderContext &context, const QgsFields &fields)=0
Needs to be called when a new render cycle is started.
virtual void stopRender(QgsRenderContext &context)=0
Needs to be called when a render cycle has finished to clean up.
virtual bool renderFeature(QgsFeature &feature, QgsRenderContext &context, int layer=-1, bool selected=false, bool drawVertexMarker=false)
Render a feature using this renderer in the given context.
virtual QgsFeatureRendererV2 * clone() const =0
virtual Q_DECL_DEPRECATED QgsSymbolV2 * symbolForFeature(QgsFeature &feature)
To be overridden.
virtual QString dump() const
for debugging
Null symbol renderer.
virtual Q_DECL_DEPRECATED QgsSymbolV2List symbols()
For symbol levels.
Contains information about the context of a rendering operation.