Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update sip binding
  • Loading branch information
pblottiere committed Jul 23, 2018
1 parent 93ee304 commit a946c52
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 14 deletions.
2 changes: 1 addition & 1 deletion python/server/auto_additions/qgsserverparameters.py
@@ -1,2 +1,2 @@
# The following has been generated automatically from src/server/qgsserverparameters.h
QgsServerParameters.ParameterName.baseClass = QgsServerParameters
QgsServerParameter.Name.baseClass = QgsServerParameter
86 changes: 73 additions & 13 deletions python/server/auto_generated/qgsserverparameters.sip.in
Expand Up @@ -9,39 +9,96 @@



class QgsServerParameters
class QgsServerParameterDefinition
{
%Docstring
QgsServerParameters provides an interface to retrieve and manipulate
global parameters received from the client.
*************************************************************************

.. versionadded:: 3.4
This program is free software; you can redistribute it and/or modify *
it under the terms of the GNU General Public License as published by *
the Free Software Foundation; either version 2 of the License, or *
(at your option) any later version. *

**************************************************************************
%End

%TypeHeaderCode
#include "qgsserverparameters.h"
%End
public:
QgsServerParameterDefinition( const QVariant::Type type = QVariant::String,
const QVariant defaultValue = QVariant( "" ) );

QString typeName() const;
virtual bool isValid() const;

QString toString() const;
QStringList toStringList( char delimiter = ',' ) const;
QList<int> toIntList( bool &ok, char delimiter = ',' ) const;
QList<double> toDoubleList( bool &ok, char delimiter = ',' ) const;
QList<QColor> toColorList( bool &ok, char delimiter = ',' ) const;
QList<QgsGeometry> toGeomList( bool &ok, char delimiter = ',' ) const;
QgsRectangle toRectangle( bool &ok ) const;
int toInt( bool &ok ) const;
double toDouble( bool &ok ) const;
bool toBool() const;
QColor toColor( bool &ok ) const;

static void raiseError( const QString &msg );

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

class QgsServerParameter : QgsServerParameterDefinition
{

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

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

struct Parameter
{
ParameterName mName;
QVariant::Type mType;
QVariant mDefaultValue;
QVariant mValue;
bool mDefined;
};
QgsServerParameter( const QgsServerParameter::Name name = QgsServerParameter::UNKNOWN,
const QVariant::Type type = QVariant::String,
const QVariant defaultValue = QVariant( "" ) );

void raiseError() const;

static QString name( const QgsServerParameter::Name name );
static QgsServerParameter::Name name( const QString &name );

QgsServerParameter::Name mName;
};

class QgsServerParameters
{
%Docstring
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
Expand Down Expand Up @@ -137,6 +194,9 @@ defined.
:return: version
%End

protected:
virtual bool loadParameter( const QPair<QString, QString> &item );

};

/************************************************************************
Expand Down

0 comments on commit a946c52

Please sign in to comment.