File: qgsrasterpipe.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 (276 lines) | stat: -rw-r--r-- 7,192 bytes parent folder | download | duplicates (6)
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
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/raster/qgsrasterpipe.h                                      *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/







class QgsRasterPipe
{
%Docstring(signature="appended")
Contains a pipeline of raster interfaces for sequential raster
processing.
%End

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


    enum class Property /BaseType=IntEnum/
      {
      RendererOpacity,
    };

    QgsRasterPipe();
%Docstring
Constructor for an empty QgsRasterPipe.
%End


    ~QgsRasterPipe();


    void moveToThread( QThread *thread );
%Docstring
Moves the pipe to another ``thread``.

This effects all QObject derived interfaces in the pipe, and follows the
same behavior as QObject.moveToThread. Specifically, it is permitted to
PUSH the pipe from the current thread to another thread, but NOT to PULL
a pipe from another thread over to the current thread. Pulling is only
supported by first pushsing the pipe from its current thread to a
``None`` thread, and then later pulling to the current thread. See
QObject documentation for more details.

.. versionadded:: 3.30
%End

    bool insert( int idx, QgsRasterInterface *interface /Transfer/ );
%Docstring
Attempts to insert interface at specified index and connect if
connection would fail, the interface is not inserted and ``False`` is
returned

.. seealso:: :py:func:`set`

.. seealso:: :py:func:`replace`
%End
%MethodCode
    sipRes = sipCpp->insert( a0, a1 );
    if ( !sipRes )
    {
      // if insertion failed transfer ownership back to python
      PyObject *o = sipGetPyObject( a1, sipType_QgsRasterInterface );
      if ( o )
        sipTransferTo( o, NULL );
    }
%End

    bool replace( int idx, QgsRasterInterface *interface /Transfer/ );
%Docstring
Attempts to replace the interface at specified index and reconnect the
pipe.

If the connection would fail, the interface is not inserted and
``False`` is returned.

.. seealso:: :py:func:`insert`

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

    bool set( QgsRasterInterface *interface /Transfer/ );
%Docstring
Inserts a new known interface in default place or replace interface of
the same role if it already exists.

Known interfaces are:

- :py:class:`QgsRasterDataProvider`,
- :py:class:`QgsRasterRenderer`
- :py:class:`QgsRasterResampleFilter`
- :py:class:`QgsRasterProjector`
- :py:class:`QgsHueSaturationFilter`
- :py:class:`QgsBrightnessContrastFilter`

(and their subclasses).

For other interfaces the position of the interface in the pipe must be
explicitly specified using the :py:func:`~QgsRasterPipe.insert` method.

.. seealso:: :py:func:`insert`

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

    bool remove( int idx );
%Docstring
Removes and deletes the interface at given index (if possible).

Returns ``True`` if the interface was successfully removed.
%End

    bool remove( QgsRasterInterface *interface );
%Docstring
Removes and deletes interface from pipe (if possible).

Returns ``True`` if the interface was successfully removed.
%End

    int size() const;
%Docstring
Returns the size of the pipe (the number of interfaces contained in the
pipe).
%End

    QgsRasterInterface *at( int idx ) const;
%Docstring
Returns the interface at the specified index.
%End

    QgsRasterInterface *last() const;
%Docstring
Returns last interface in the pipe.
%End

    bool setOn( int idx, bool on );
%Docstring
Set whether the interface at the specified index is enabled.

Returns ``True`` on success.
%End

    bool canSetOn( int idx, bool on );
%Docstring
Returns ``True`` if the interface at the specified index may be switched
on or off.
%End


    QgsRasterDataProvider *provider() const;
%Docstring
Returns the data provider interface, or ``None`` if no data provider is
present in the pipe.
%End

    QgsRasterRenderer *renderer() const;
%Docstring
Returns the raster renderer interface, or ``None`` if no raster renderer
is present in the pipe.
%End

    QgsRasterResampleFilter *resampleFilter() const;
%Docstring
Returns the resample filter interface, or ``None`` if no resample filter
is present in the pipe.
%End

    QgsBrightnessContrastFilter *brightnessFilter() const;
%Docstring
Returns the brightness filter interface, or ``None`` if no brightness
filter is present in the pipe.
%End

    QgsHueSaturationFilter *hueSaturationFilter() const;
%Docstring
Returns the hue/saturation interface, or ``None`` if no hue/saturation
filter is present in the pipe.
%End

    QgsRasterProjector *projector() const;
%Docstring
Returns the projector interface, or ``None`` if no projector is present
in the pipe.
%End

    QgsRasterNuller *nuller() const;
%Docstring
Returns the raster nuller interface, or ``None`` if no raster nuller is
present in the pipe.
%End

    void setResamplingStage( Qgis::RasterResamplingStage stage );
%Docstring
Sets which stage of the pipe should apply resampling.

Provider resampling is only supported if provider sets
ProviderHintCanPerformProviderResampling in
:py:func:`~QgsRasterPipe.providerCapabilities`.

.. seealso:: :py:func:`resamplingStage`

.. versionadded:: 3.16
%End

    Qgis::RasterResamplingStage resamplingStage() const;
%Docstring
Returns which stage of the pipe should apply resampling

.. seealso:: :py:func:`setResamplingStage`

.. versionadded:: 3.16
%End

    QgsPropertyCollection &dataDefinedProperties();
%Docstring
Returns a reference to the pipe's property collection, used for data
defined overrides.

.. seealso:: :py:func:`setDataDefinedProperties`

.. versionadded:: 3.22
%End


    void setDataDefinedProperties( const QgsPropertyCollection &collection );
%Docstring
Sets the pipe's property ``collection``, used for data defined
overrides.

Any existing properties will be discarded.

.. seealso:: :py:func:`dataDefinedProperties`

.. seealso:: Property

.. versionadded:: 3.22
%End

    void evaluateDataDefinedProperties( QgsExpressionContext &context );
%Docstring
Evaluates any data defined properties set on the pipe, applying their
results to the corresponding interfaces in place.

.. versionadded:: 3.22
%End

    static QgsPropertiesDefinition propertyDefinitions();
%Docstring
Returns the definitions for data defined properties available for use in
raster pipes.

.. versionadded:: 3.22
%End

  private:
    QgsRasterPipe( const QgsRasterPipe &pipe );
};



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