File: qgstiledscenerenderer.sip.in

package info (click to toggle)
qgis 3.40.11%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,183,800 kB
  • sloc: cpp: 1,595,841; python: 372,637; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,257; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 154
file content (296 lines) | stat: -rw-r--r-- 8,368 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/tiledscene/qgstiledscenerenderer.h                          *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/






class QgsTiledSceneRenderContext
{
%Docstring(signature="appended")
Encapsulates the render context for a 2D tiled scene rendering
operation.

.. versionadded:: 3.34
%End

%TypeHeaderCode
#include "qgstiledscenerenderer.h"
%End
  public:

    QgsTiledSceneRenderContext( QgsRenderContext &context, QgsFeedback *feedback = 0 );
%Docstring
Constructor for QgsTiledSceneRenderContext.
%End


    QgsRenderContext &renderContext();
%Docstring
Returns a reference to the context's render context.
%End


    QgsFeedback *feedback() const;
%Docstring
Returns the feedback object used to cancel rendering

.. versionadded:: 3.20
%End

    QImage textureImage() const;
%Docstring
Returns the current texture image.

.. seealso:: :py:func:`setTextureImage`
%End

    void setTextureImage( const QImage &image );
%Docstring
Sets the current texture ``image``.

.. seealso:: :py:func:`textureImage`
%End

    void setTextureCoordinates(
      float textureX1, float textureY1,
      float textureX2, float textureY2,
      float textureX3, float textureY3
    );
%Docstring
Sets the current texture coordinates.

.. seealso:: :py:func:`textureCoordinates`
%End

    void textureCoordinates( float &textureX1 /Out/, float &textureY1 /Out/, float &textureX2 /Out/, float &textureY2 /Out/, float &textureX3 /Out/, float &textureY3 /Out/ ) const;
%Docstring
Returns the current texture coordinates.

.. seealso:: :py:func:`setTextureCoordinates`
%End

  private:
    QgsTiledSceneRenderContext( const QgsTiledSceneRenderContext &rh );
};

class QgsTiledSceneRenderer
{
%Docstring(signature="appended")
Abstract base class for 2d tiled scene renderers.

.. versionadded:: 3.34
%End

%TypeHeaderCode
#include "qgstiledscenerenderer.h"
%End
%ConvertToSubClassCode

    const QString type = sipCpp->type();
    if ( type == QLatin1String( "texture" ) )
      sipType = sipType_QgsTiledSceneTextureRenderer;
    else if ( type == QLatin1String( "wireframe" ) )
      sipType = sipType_QgsTiledSceneWireframeRenderer;
    else
      sipType = 0;

%End
  public:

    QgsTiledSceneRenderer();

    virtual ~QgsTiledSceneRenderer();

    virtual QString type() const = 0;
%Docstring
Returns the identifier of the renderer type.
%End

    virtual QgsTiledSceneRenderer *clone() const = 0 /Factory/;
%Docstring
Create a deep copy of this renderer. Should be implemented by all
subclasses and generate a proper subclass.
%End



    virtual Qgis::TiledSceneRendererFlags flags() const;
%Docstring
Returns flags which control how the renderer behaves.
%End

    static QgsTiledSceneRenderer *load( QDomElement &element, const QgsReadWriteContext &context ) /Factory/;
%Docstring
Creates a renderer from an XML ``element``.

Caller takes ownership of the returned renderer.

.. seealso:: :py:func:`save`
%End

    virtual QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context ) const = 0;
%Docstring
Saves the renderer configuration to an XML element.

.. seealso:: :py:func:`load`
%End

    double maximumScreenError() const;
%Docstring
Returns the maximum screen error allowed when rendering the tiled scene.

Larger values result in a faster render with less detailed features
rendered.

Units are retrieved via
:py:func:`~QgsTiledSceneRenderer.maximumScreenErrorUnit`.

.. seealso:: :py:func:`setMaximumScreenError`

.. seealso:: :py:func:`maximumScreenErrorUnit`
%End

    void setMaximumScreenError( double error );
%Docstring
Sets the maximum screen ``error`` allowed when rendering the tiled
scene.

Larger values result in a faster render with less detailed features
rendered.

Units are set via
:py:func:`~QgsTiledSceneRenderer.setMaximumScreenErrorUnit`.

.. seealso:: :py:func:`maximumScreenError`

.. seealso:: :py:func:`setMaximumScreenErrorUnit`
%End

    Qgis::RenderUnit maximumScreenErrorUnit() const;
%Docstring
Returns the unit for the maximum screen error allowed when rendering the
tiled scene.

.. seealso:: :py:func:`maximumScreenError`

.. seealso:: :py:func:`setMaximumScreenErrorUnit`
%End

    void setMaximumScreenErrorUnit( Qgis::RenderUnit unit );
%Docstring
Sets the ``unit`` for the maximum screen error allowed when rendering
the tiled scene.

.. seealso:: :py:func:`setMaximumScreenError`

.. seealso:: :py:func:`maximumScreenErrorUnit`
%End

    void setTileBorderRenderingEnabled( bool enabled );
%Docstring
Sets whether to render the borders of tiles.

.. seealso:: :py:func:`isTileBorderRenderingEnabled`
%End

    bool isTileBorderRenderingEnabled() const;
%Docstring
Returns whether to render also borders of tiles.

see :py:func:`~QgsTiledSceneRenderer.setTileBorderRenderingEnabled`
%End

    virtual void startRender( QgsTiledSceneRenderContext &context );
%Docstring
Must be called when a new render cycle is started. A call to
:py:func:`~QgsTiledSceneRenderer.startRender` must always be followed by
a corresponding call to :py:func:`~QgsTiledSceneRenderer.stopRender`
after all features have been rendered.

.. seealso:: :py:func:`stopRender`

.. warning::

   This method is not thread safe. Before calling :py:func:`~QgsTiledSceneRenderer.startRender` in a non-main thread,
   the renderer should instead be cloned and :py:func:`~QgsTiledSceneRenderer.startRender`/:py:func:`~QgsTiledSceneRenderer.stopRender` called on the clone.
%End

    virtual void stopRender( QgsTiledSceneRenderContext &context );
%Docstring
Must be called when a render cycle has finished, to allow the renderer
to clean up.

Calls to :py:func:`~QgsTiledSceneRenderer.stopRender` must always be
preceded by a call to :py:func:`~QgsTiledSceneRenderer.startRender`.

.. warning::

   This method is not thread safe. Before calling :py:func:`~QgsTiledSceneRenderer.startRender` in a non-main thread,
   the renderer should instead be cloned and :py:func:`~QgsTiledSceneRenderer.startRender`/:py:func:`~QgsTiledSceneRenderer.stopRender` called on the clone.

.. seealso:: :py:func:`startRender`
%End

    virtual QList<QgsLayerTreeModelLegendNode *> createLegendNodes( QgsLayerTreeLayer *nodeLayer ) /Factory/;
%Docstring
Creates a set of legend nodes representing the renderer.
%End

    virtual QStringList legendRuleKeys() const;
%Docstring
Returns a list of all rule keys for legend nodes created by the
renderer.
%End

    virtual void renderTriangle( QgsTiledSceneRenderContext &context, const QPolygonF &triangle ) = 0;
%Docstring
Renders a ``triangle``.
%End

    virtual void renderLine( QgsTiledSceneRenderContext &context, const QPolygonF &line ) = 0;
%Docstring
Renders a ``line``.
%End

  protected:

    void copyCommonProperties( QgsTiledSceneRenderer *destination ) const;
%Docstring
Copies common tiled scene renderer properties (such as screen error) to
the ``destination`` renderer.
%End

    void restoreCommonProperties( const QDomElement &element, const QgsReadWriteContext &context );
%Docstring
Restores common renderer properties (such as screen error) from the
specified DOM ``element``.

.. seealso:: :py:func:`saveCommonProperties`
%End

    void saveCommonProperties( QDomElement &element, const QgsReadWriteContext &context ) const;
%Docstring
Saves common renderer properties (such as point size and screen error)
to the specified DOM ``element``.

.. seealso:: :py:func:`restoreCommonProperties`
%End

  private:
    QgsTiledSceneRenderer( const QgsTiledSceneRenderer &other );
};

/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/tiledscene/qgstiledscenerenderer.h                          *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/