QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
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
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 "qgis_core.h"
20#include "qgsrenderer.h"
21
24
30class CORE_EXPORT Qgs25DRenderer : public QgsFeatureRenderer
31{
32 public:
34
41 static QgsFeatureRenderer *create( QDomElement &element, const QgsReadWriteContext &context ) SIP_FACTORY;
42 QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context ) override;
43 Qgis::FeatureRendererFlags flags() const override;
44 void startRender( QgsRenderContext &context, const QgsFields &fields ) override;
45 void stopRender( QgsRenderContext &context ) override;
46
47 QSet<QString> usedAttributes( const QgsRenderContext &context ) const override;
48 QgsFeatureRenderer *clone() const override SIP_FACTORY;
49
50 QgsSymbol *symbolForFeature( const QgsFeature &feature, QgsRenderContext &context ) const override;
51 QgsSymbolList symbols( QgsRenderContext &context ) const override;
52 bool accept( QgsStyleEntityVisitorInterface *visitor ) const override;
53
57 QColor roofColor() const;
58
62 void setRoofColor( const QColor &roofColor ) const;
63
67 QColor wallColor() const;
68
72 void setWallColor( const QColor &wallColor ) const;
73
77 void setWallShadingEnabled( bool enabled ) const;
78
82 bool wallShadingEnabled() const;
83
87 QColor shadowColor() const;
88
92 void setShadowColor( const QColor &shadowColor ) const;
93
97 double shadowSpread() const;
98
102 void setShadowSpread( double shadowSpread ) const;
103
109 static Qgs25DRenderer *convertFromRenderer( QgsFeatureRenderer *renderer ) SIP_FACTORY;
110
114 bool shadowEnabled() const;
115
119 void setShadowEnabled( bool value ) const;
120
121 private:
122
123 QgsFillSymbolLayer *roofLayer() const;
124 QgsFillSymbolLayer *wallLayer() const;
125 QgsOuterGlowEffect *glowEffect() const;
126
127 std::unique_ptr<QgsSymbol> mSymbol;
128};
129
130#endif // QGS25DRENDERER_H
QFlags< FeatureRendererFlag > FeatureRendererFlags
Flags controlling behavior of vector feature renderers.
Definition qgis.h:772
A vector renderer which represents 3D features in an isometric view.
Abstract base class for all 2D vector feature renderers.
virtual QgsSymbolList symbols(QgsRenderContext &context) const
Returns list of symbols used by the renderer.
virtual Qgis::FeatureRendererFlags flags() const
Returns flags associated with the renderer.
virtual void stopRender(QgsRenderContext &context)
Must be called when a render cycle has finished, to allow the renderer to clean up.
virtual QDomElement save(QDomDocument &doc, const QgsReadWriteContext &context)
Stores renderer properties to an XML element.
virtual QSet< QString > usedAttributes(const QgsRenderContext &context) const =0
Returns a list of attributes required by this renderer.
virtual QgsSymbol * symbolForFeature(const QgsFeature &feature, QgsRenderContext &context) const =0
To be overridden.
virtual bool accept(QgsStyleEntityVisitorInterface *visitor) const
Accepts the specified symbology visitor, causing it to visit all symbols associated with the renderer...
virtual void startRender(QgsRenderContext &context, const QgsFields &fields)
Must be called when a new render cycle is started.
virtual QgsFeatureRenderer * clone() const =0
Create a deep copy of this renderer.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Definition qgsfeature.h:58
Container of fields for a vector layer.
Definition qgsfields.h:46
Abstract base class for fill symbol layers.
A paint effect which draws a glow outside of a picture.
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.
An interface for classes which can visit style entity (e.g.
Abstract base class for all rendered symbols.
Definition qgssymbol.h:231
#define SIP_FACTORY
Definition qgis_sip.h:76
QList< QgsSymbol * > QgsSymbolList
Definition qgsrenderer.h:47