Skip to content

Commit a946c52

Browse files
committedJul 23, 2018
Update sip binding
1 parent 93ee304 commit a946c52

File tree

2 files changed

+74
-14
lines changed

2 files changed

+74
-14
lines changed
 
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# The following has been generated automatically from src/server/qgsserverparameters.h
2-
QgsServerParameters.ParameterName.baseClass = QgsServerParameters
2+
QgsServerParameter.Name.baseClass = QgsServerParameter

‎python/server/auto_generated/qgsserverparameters.sip.in

Lines changed: 73 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,96 @@
99

1010

1111

12-
class QgsServerParameters
12+
class QgsServerParameterDefinition
1313
{
1414
%Docstring
15-
QgsServerParameters provides an interface to retrieve and manipulate
16-
global parameters received from the client.
15+
*************************************************************************
1716

18-
.. versionadded:: 3.4
17+
This program is free software; you can redistribute it and/or modify *
18+
it under the terms of the GNU General Public License as published by *
19+
the Free Software Foundation; either version 2 of the License, or *
20+
(at your option) any later version. *
21+
22+
**************************************************************************
1923
%End
2024

25+
%TypeHeaderCode
26+
#include "qgsserverparameters.h"
27+
%End
28+
public:
29+
QgsServerParameterDefinition( const QVariant::Type type = QVariant::String,
30+
const QVariant defaultValue = QVariant( "" ) );
31+
32+
QString typeName() const;
33+
virtual bool isValid() const;
34+
35+
QString toString() const;
36+
QStringList toStringList( char delimiter = ',' ) const;
37+
QList<int> toIntList( bool &ok, char delimiter = ',' ) const;
38+
QList<double> toDoubleList( bool &ok, char delimiter = ',' ) const;
39+
QList<QColor> toColorList( bool &ok, char delimiter = ',' ) const;
40+
QList<QgsGeometry> toGeomList( bool &ok, char delimiter = ',' ) const;
41+
QgsRectangle toRectangle( bool &ok ) const;
42+
int toInt( bool &ok ) const;
43+
double toDouble( bool &ok ) const;
44+
bool toBool() const;
45+
QColor toColor( bool &ok ) const;
46+
47+
static void raiseError( const QString &msg );
48+
49+
QVariant::Type mType;
50+
QVariant mValue;
51+
QVariant mDefaultValue;
52+
};
53+
54+
class QgsServerParameter : QgsServerParameterDefinition
55+
{
56+
2157
%TypeHeaderCode
2258
#include "qgsserverparameters.h"
2359
%End
2460
public:
2561
static const QMetaObject staticMetaObject;
2662

2763
public:
28-
enum ParameterName
64+
enum Name
2965
{
66+
UNKNOWN,
3067
SERVICE,
3168
VERSION_SERVICE,
3269
REQUEST,
3370
MAP,
3471
FILE_NAME
3572
};
3673

37-
struct Parameter
38-
{
39-
ParameterName mName;
40-
QVariant::Type mType;
41-
QVariant mDefaultValue;
42-
QVariant mValue;
43-
bool mDefined;
44-
};
74+
QgsServerParameter( const QgsServerParameter::Name name = QgsServerParameter::UNKNOWN,
75+
const QVariant::Type type = QVariant::String,
76+
const QVariant defaultValue = QVariant( "" ) );
77+
78+
void raiseError() const;
79+
80+
static QString name( const QgsServerParameter::Name name );
81+
static QgsServerParameter::Name name( const QString &name );
82+
83+
QgsServerParameter::Name mName;
84+
};
85+
86+
class QgsServerParameters
87+
{
88+
%Docstring
89+
QgsServerParameters provides an interface to retrieve and manipulate
90+
global parameters received from the client.
91+
92+
.. versionadded:: 3.4
93+
%End
94+
95+
%TypeHeaderCode
96+
#include "qgsserverparameters.h"
97+
%End
98+
public:
99+
static const QMetaObject staticMetaObject;
100+
101+
public:
45102

46103
QgsServerParameters();
47104
%Docstring
@@ -137,6 +194,9 @@ defined.
137194
:return: version
138195
%End
139196

197+
protected:
198+
virtual bool loadParameter( const QPair<QString, QString> &item );
199+
140200
};
141201

142202
/************************************************************************

0 commit comments

Comments
 (0)
Please sign in to comment.