1/************************************************************************
2 * This file has been generated automatically from                      *
3 *                                                                      *
4 * src/core/vectortile/qgsvectortilebasicrenderer.h                     *
5 *                                                                      *
6 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
7 ************************************************************************/
8
9
10
11
12
13
14class QgsVectorTileBasicRendererStyle
15{
16%Docstring(signature="appended")
17Definition of map rendering of a subset of vector tile data. The subset of data is defined by:
18
19- sub-layer name
20- geometry type (a single sub-layer may have multiple geometry types)
21- filter expression
22
23Rendering is determined by the associated symbol (:py:class:`QgsSymbol`). Symbol has to be of the same
24type as the chosen :py:func:`~geometryType` - i.e. :py:class:`QgsMarkerSymbol` for points, :py:class:`QgsLineSymbol` for linestrings
25and :py:class:`QgsFillSymbol` for polygons.
26
27It is possible to further constrain when this style is applied by setting a range of allowed
28zoom levels, or by disabling it.
29
30.. versionadded:: 3.14
31%End
32
33%TypeHeaderCode
34#include "qgsvectortilebasicrenderer.h"
35%End
36  public:
37    QgsVectorTileBasicRendererStyle( const QString &stName = QString(), const QString &laName = QString(), QgsWkbTypes::GeometryType geomType = QgsWkbTypes::UnknownGeometry );
38%Docstring
39Constructs a style object
40%End
41    QgsVectorTileBasicRendererStyle( const QgsVectorTileBasicRendererStyle &other );
42%Docstring
43Constructs a style object as a copy of another style
44%End
45    ~QgsVectorTileBasicRendererStyle();
46
47    void setStyleName( const QString &name );
48%Docstring
49Sets human readable name of this style
50%End
51    QString styleName() const;
52%Docstring
53Returns human readable name of this style
54%End
55
56    void setLayerName( const QString &name );
57%Docstring
58Sets name of the sub-layer to render (empty layer means that all layers match)
59%End
60    QString layerName() const;
61%Docstring
62Returns name of the sub-layer to render (empty layer means that all layers match)
63%End
64
65    void setGeometryType( QgsWkbTypes::GeometryType geomType );
66%Docstring
67Sets type of the geometry that will be used (point / line / polygon)
68%End
69    QgsWkbTypes::GeometryType geometryType() const;
70%Docstring
71Returns type of the geometry that will be used (point / line / polygon)
72%End
73
74    void setFilterExpression( const QString &expr );
75%Docstring
76Sets filter expression (empty filter means that all features match)
77%End
78    QString filterExpression() const;
79%Docstring
80Returns filter expression (empty filter means that all features match)
81%End
82
83    void setSymbol( QgsSymbol *sym /Transfer/ );
84%Docstring
85Sets symbol for rendering. Takes ownership of the symbol.
86%End
87    QgsSymbol *symbol() const;
88%Docstring
89Returns symbol for rendering
90%End
91
92    void setEnabled( bool enabled );
93%Docstring
94Sets whether this style is enabled (used for rendering)
95%End
96    bool isEnabled() const;
97%Docstring
98Returns whether this style is enabled (used for rendering)
99%End
100
101    void setMinZoomLevel( int minZoom );
102%Docstring
103Sets minimum zoom level index (negative number means no limit)
104%End
105    int minZoomLevel() const;
106%Docstring
107Returns minimum zoom level index (negative number means no limit)
108%End
109
110    void setMaxZoomLevel( int maxZoom );
111%Docstring
112Sets maximum zoom level index (negative number means no limit)
113%End
114    int maxZoomLevel() const;
115%Docstring
116Returns maxnimum zoom level index (negative number means no limit)
117%End
118
119    bool isActive( int zoomLevel ) const;
120%Docstring
121Returns whether the style is active at given zoom level (also checks "enabled" flag)
122%End
123
124    void writeXml( QDomElement &elem, const QgsReadWriteContext &context ) const;
125%Docstring
126Writes object content to given DOM element
127%End
128    void readXml( const QDomElement &elem, const QgsReadWriteContext &context );
129%Docstring
130Reads object content from given DOM element
131%End
132
133};
134
135
136class QgsVectorTileBasicRenderer : QgsVectorTileRenderer
137{
138%Docstring(signature="appended")
139The default vector tile renderer implementation. It has an ordered list of "styles",
140each defines a rendering rule.
141
142.. versionadded:: 3.14
143%End
144
145%TypeHeaderCode
146#include "qgsvectortilebasicrenderer.h"
147%End
148  public:
149    QgsVectorTileBasicRenderer();
150%Docstring
151Constructs renderer with no styles
152%End
153
154    virtual QString type() const;
155
156    virtual QgsVectorTileBasicRenderer *clone() const /Factory/;
157
158    virtual void startRender( QgsRenderContext &context, int tileZoom, const QgsTileRange &tileRange );
159
160    virtual QSet< QString > requiredLayers( QgsRenderContext &context, int tileZoom ) const;
161
162    virtual void stopRender( QgsRenderContext &context );
163
164    virtual void renderTile( const QgsVectorTileRendererData &tile, QgsRenderContext &context );
165
166    virtual void writeXml( QDomElement &elem, const QgsReadWriteContext &context ) const;
167
168    virtual void readXml( const QDomElement &elem, const QgsReadWriteContext &context );
169
170
171    void setStyles( const QList<QgsVectorTileBasicRendererStyle> &styles );
172%Docstring
173Sets list of styles of the renderer
174%End
175    QList<QgsVectorTileBasicRendererStyle> styles() const;
176%Docstring
177Returns list of styles of the renderer
178%End
179    void setStyle( int index, const QgsVectorTileBasicRendererStyle &style );
180%Docstring
181Updates style definition at the paricular index of the list (the index must be in interval [0,N-1] otherwise this function does nothing)
182%End
183    QgsVectorTileBasicRendererStyle style( int index ) const;
184%Docstring
185Returns style definition at the particular index
186%End
187
188    static QList<QgsVectorTileBasicRendererStyle> simpleStyle(
189      const QColor &polygonFillColor, const QColor &polygonStrokeColor, double polygonStrokeWidth,
190      const QColor &lineStrokeColor, double lineStrokeWidth,
191      const QColor &pointFillColor, const QColor &pointStrokeColor, double pointSize );
192%Docstring
193Returns a list of styles to render all layers with the given fill/stroke colors, stroke widths and marker sizes
194%End
195
196    static QList<QgsVectorTileBasicRendererStyle> simpleStyleWithRandomColors();
197%Docstring
198Returns a list of styles to render all layers, using random colors
199%End
200
201};
202
203/************************************************************************
204 * This file has been generated automatically from                      *
205 *                                                                      *
206 * src/core/vectortile/qgsvectortilebasicrenderer.h                     *
207 *                                                                      *
208 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
209 ************************************************************************/
210