QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
qgs25drenderer.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgs25drenderer.h - Qgs25DRenderer
3  ---------------------------------
4 
5  begin : 14.1.2016
6  copyright : (C) 2016 by Matthias Kuhn
7  email : [email protected]
8  ***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
16 #ifndef QGS25DRENDERER_H
17 #define QGS25DRENDERER_H
18 
19 #include "qgsrendererv2.h"
20 #include "qgsdatadefined.h"
21 
22 class QgsOuterGlowEffect;
23 
27 class CORE_EXPORT Qgs25DRenderer : public QgsFeatureRendererV2
28 {
29  public:
31 
37  static QgsFeatureRendererV2* create( QDomElement& element );
38  QDomElement save( QDomDocument& doc ) override;
39 
40  void startRender( QgsRenderContext& context, const QgsFields& fields ) override;
41  void stopRender( QgsRenderContext& context ) override;
42 
43  QList<QString> usedAttributes() override;
44  QgsFeatureRendererV2* clone() const override;
45 
46  virtual QgsSymbolV2* symbolForFeature( QgsFeature& feature, QgsRenderContext& context ) override;
47  virtual QgsSymbolV2List symbols( QgsRenderContext& context ) override;
48 
52  QColor roofColor() const;
53 
57  void setRoofColor( const QColor& roofColor );
58 
62  QColor wallColor() const;
63 
67  void setWallColor( const QColor& wallColor );
68 
72  void setWallShadingEnabled( bool enabled );
73 
77  bool wallShadingEnabled();
78 
82  QColor shadowColor() const;
83 
87  void setShadowColor( const QColor& shadowColor );
88 
92  double shadowSpread() const;
96  void setShadowSpread( double shadowSpread );
97 
103  static Qgs25DRenderer* convertFromRenderer( QgsFeatureRendererV2* renderer );
104 
108  bool shadowEnabled() const;
112  void setShadowEnabled( bool value );
113 
114  private:
115 
116  QgsFillSymbolLayerV2* roofLayer() const;
117  QgsFillSymbolLayerV2* wallLayer() const;
118  QgsOuterGlowEffect* glowEffect() const;
119 
121 };
122 
123 #endif // QGS25DRENDERER_H
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 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 QgsFeatureRendererV2 * clone() const =0
virtual Q_DECL_DEPRECATED QgsSymbolV2 * symbolForFeature(QgsFeature &feature)
To be overridden.
virtual Q_DECL_DEPRECATED QgsSymbolV2List symbols()
For symbol levels.
A paint effect which draws a glow outside of a picture.
Contains information about the context of a rendering operation.