File: qgsserverparameters.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 (425 lines) | stat: -rw-r--r-- 10,310 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
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/server/qgsserverparameters.h                                     *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/




class QgsServerParameterDefinition
{
%Docstring(signature="appended")
Definition of a parameter with basic conversion methods

.. versionadded:: 3.4
%End

%TypeHeaderCode
#include "qgsserverparameters.h"
%End
  public:
    QgsServerParameterDefinition( const QMetaType::Type type = QMetaType::Type::QString, const QVariant defaultValue = QVariant( "" ) );
%Docstring
Constructor for QgsServerParameterDefinition.

:param type: The type of the parameter
:param defaultValue: The default value of the parameter
%End


 QgsServerParameterDefinition( const QVariant::Type type, const QVariant defaultValue = QVariant( "" ) ) /Deprecated/;
%Docstring
Constructor for QgsServerParameterDefinition.

:param type: The type of the parameter
:param defaultValue: The default value of the parameter

.. deprecated:: 3.38

   Use the method with a QMetaType.Type argument instead.
%End

    virtual ~QgsServerParameterDefinition();

    QString typeName() const;
%Docstring
Returns the type of the parameter as a string.
%End

    virtual bool isValid() const;
%Docstring
Returns ``True`` if the parameter is valid, ``False`` otherwise.
%End

    QString toString( bool defaultValue = false ) const;
%Docstring
Converts the parameter into a string. If ``defaultValue`` is true and
current value is empty, then the default value is returned.
%End

    QStringList toStringList( char delimiter = ',', bool skipEmptyParts = true ) const;
%Docstring
Converts the parameter into a list of strings

:param delimiter: The character used for delimiting
:param skipEmptyParts: To use QString.SkipEmptyParts for splitting

:return: A list of strings
%End

    QList<int> toIntList( bool &ok, char delimiter = ',', bool skipEmptyParts = true ) const;
%Docstring
Converts the parameter into a list of integers.

:param ok: ``True`` if there's no error during the conversion, ``False``
           otherwise
:param delimiter: The character used for delimiting
:param skipEmptyParts: for splitting

:return: A list of integers
%End

    QList<double> toDoubleList( bool &ok, char delimiter = ',', bool skipEmptyParts = true ) const;
%Docstring
Converts the parameter into a list of doubles.

:param ok: ``True`` if there's no error during the conversion, ``False``
           otherwise
:param delimiter: The character used for delimiting
:param skipEmptyParts: for splitting

:return: A list of doubles
%End

    QList<QColor> toColorList( bool &ok, char delimiter = ',', bool skipEmptyParts = true ) const;
%Docstring
Converts the parameter into a list of colors.

:param ok: ``True`` if there's no error during the conversion, ``False``
           otherwise
:param delimiter: The character used for delimiting
:param skipEmptyParts: for splitting

:return: A list of colors
%End

    QList<QgsGeometry> toGeomList( bool &ok, char delimiter = ',', bool skipEmptyParts = true ) const;
%Docstring
Converts the parameter into a list of geometries.

:param ok: ``True`` if there's no error during the conversion, ``False``
           otherwise
:param delimiter: The character used for delimiting
:param skipEmptyParts: for splitting

:return: A list of geometries
%End

    QStringList toOgcFilterList() const;
%Docstring
Converts the parameter into a list of OGC filters.

:return: A list of strings

.. versionadded:: 3.24
%End

    QStringList toExpressionList() const;
%Docstring
Converts the parameter into a list of QGIS expressions.

:return: A list of strings

.. versionadded:: 3.24
%End

    QgsRectangle toRectangle( bool &ok ) const;
%Docstring
Converts the parameter into a rectangle.

:param ok: ``True`` if there's no error during the conversion, ``False``
           otherwise

:return: A rectangle
%End

    int toInt( bool &ok ) const;
%Docstring
Converts the parameter into an integer.

:param ok: ``True`` if there's no error during the conversion, ``False``
           otherwise

:return: An integer
%End

    double toDouble( bool &ok ) const;
%Docstring
Converts the parameter into a double.

:param ok: ``True`` if there's no error during the conversion, ``False``
           otherwise

:return: A double
%End

    bool toBool() const;
%Docstring
Converts the parameter into a boolean.

:return: A boolean
%End

    QColor toColor( bool &ok ) const;
%Docstring
Converts the parameter into a color.

:param ok: ``True`` if there's no error during the conversion, ``False``
           otherwise

:return: A color
%End

    QUrl toUrl( bool &ok ) const;
%Docstring
Converts the parameter into an url.

:param ok: ``True`` if there's no error during the conversion, ``False``
           otherwise

:return: An url

.. versionadded:: 3.4
%End

    QString loadUrl( bool &ok ) const;
%Docstring
Loads the data associated to the parameter converted into an url.

:param ok: ``True`` if there's no error during the load, ``False``
           otherwise

:return: The content loaded

.. versionadded:: 3.4
%End

    static void raiseError( const QString &msg );
%Docstring
Raises an exception in case of an invalid parameters.

:param msg: The message describing the exception

:raises QgsBadRequestException: Invalid parameter exception
%End

    QMetaType::Type mType;
    QVariant mValue;
    QVariant mDefaultValue;
};

class QgsServerParameter : QgsServerParameterDefinition
{
%Docstring(signature="appended")
Parameter common to all services (WMS, WFS, ...)

.. versionadded:: 3.4
%End

%TypeHeaderCode
#include "qgsserverparameters.h"
%End
  public:
    static const QMetaObject staticMetaObject;

  public:
    enum Name
    {
      UNKNOWN,
      SERVICE,
      VERSION_SERVICE,
      REQUEST,
      MAP,
      FILE_NAME
    };

    QgsServerParameter( const QgsServerParameter::Name name = QgsServerParameter::UNKNOWN, const QMetaType::Type type = QMetaType::Type::QString, const QVariant defaultValue = QVariant( "" ) );
%Docstring
Constructor for QgsServerParameter.

:param name: The name of the parameter
:param type: The type of the parameter
:param defaultValue: The default value to use if not defined
%End

 QgsServerParameter( const QgsServerParameter::Name name, const QVariant::Type type, const QVariant defaultValue = QVariant( "" ) ) /Deprecated/;
%Docstring
Constructor for QgsServerParameter.

:param name: The name of the parameter
:param type: The type of the parameter
:param defaultValue: The default value to use if not defined

.. deprecated:: 3.38

   Use the method with a QMetaType.Type argument instead.
%End

    void raiseError() const;
%Docstring
Raises an error in case of an invalid conversion.

:raises QgsBadRequestException: Invalid parameter exception
%End

    static QString name( const QgsServerParameter::Name name );
%Docstring
Converts a parameter's name into its string representation.
%End

    static QgsServerParameter::Name name( const QString &name );
%Docstring
Converts a string into a parameter's name (UNKNOWN in case of an invalid
string).
%End

    QgsServerParameter::Name mName;
};

class QgsServerParameters
{
%Docstring(signature="appended")
:py:class:`QgsServerParameters` provides an interface to retrieve and
manipulate global parameters received from the client.

.. versionadded:: 3.4
%End

%TypeHeaderCode
#include "qgsserverparameters.h"
%End
  public:
    static const QMetaObject staticMetaObject;

  public:
    QgsServerParameters();
%Docstring
Constructor.
%End

    QgsServerParameters( const QUrlQuery &query );
%Docstring
Constructor.
%End

    virtual ~QgsServerParameters();

    void load( const QUrlQuery &query );
%Docstring
Loads new parameters.

:param query: url query
%End

    void clear();
%Docstring
Removes all parameters.
%End

    void add( const QString &key, const QString &value );
%Docstring
Adds a parameter.

:param key: the name of the parameter
:param value: the value of the parameter
%End

    void remove( const QString &key );
%Docstring
Removes a parameter.

:param key: the name of the parameter
%End

    void remove( QgsServerParameter::Name name );
%Docstring
Removes a parameter.

:param name: The name of the parameter

.. versionadded:: 3.4
%End

    QString value( const QString &key ) const;
%Docstring
Returns the value of a parameter.

:param key: the name of the parameter
%End

    QUrlQuery urlQuery() const;
%Docstring
Returns a url query with underlying parameters.
%End

    QMap<QString, QString> toMap() const;
%Docstring
Returns all parameters in a map.
%End

    QString service() const;
%Docstring
Returns SERVICE parameter as a string or an empty string if not defined.

:return: service
%End

    virtual QString request() const;
%Docstring
Returns REQUEST parameter as a string or an empty string if not defined.

:return: request
%End

    QString map() const;
%Docstring
Returns MAP parameter as a string or an empty string if not defined.

:return: map
%End

    QString fileName() const;
%Docstring
Returns FILE_NAME parameter as a string or an empty string if not
defined.

:return: filename
%End

    virtual QString version() const;
%Docstring
Returns VERSION parameter as a string or an empty string if not defined.

:return: version
%End

  protected:
    virtual bool loadParameter( const QString &name, const QString &value );
%Docstring
Loads a parameter with a specific value. This method should be
implemented in subclasses.
%End


};

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