Skip to content
Permalink
Browse files

Update doc for QgsServerParameters and QgsServerParameter

  • Loading branch information
pblottiere committed Jul 20, 2018
1 parent 9e4c3f2 commit 3e00b10cc216d9ab4bb6a88232b19e4ecfe675d1
Showing with 53 additions and 4 deletions.
  1. +25 −2 python/server/auto_generated/qgsserverparameters.sip.in
  2. +28 −2 src/server/qgsserverparameters.h
@@ -55,6 +55,11 @@ the Free Software Foundation; either version 2 of the License, or *

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

.. versionadded:: 3.4
%End

%TypeHeaderCode
#include "qgsserverparameters.h"
@@ -76,20 +81,38 @@ class QgsServerParameter : QgsServerParameterDefinition
QgsServerParameter( const QgsServerParameter::Name name = QgsServerParameter::UNKNOWN,
const QVariant::Type type = QVariant::String,
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

void raiseError() const;
%Docstring
Raises an error in case of an invalid conversion.
\throws 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
QgsServerParameters provides an interface to retrieve and manipulate
global parameters received from the client.
QgsServerParameters provides an interface to retrieve and manipulate global parameters received from the client.

.. versionadded:: 3.4
%End
@@ -56,11 +56,18 @@ class SERVER_EXPORT QgsServerParameterDefinition
QVariant mDefaultValue;
};

/**
* \ingroup server
* \class QgsServerParameter
* \brief Parameter common to all services (WMS, WFS, ...)
* \since QGIS 3.4
*/
class SERVER_EXPORT QgsServerParameter : public QgsServerParameterDefinition
{
Q_GADGET

public:
//! Parameter's name common to all services
enum Name
{
UNKNOWN,
@@ -72,21 +79,40 @@ class SERVER_EXPORT QgsServerParameter : public QgsServerParameterDefinition
};
Q_ENUM( Name )

/**
* 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
*/
QgsServerParameter( const QgsServerParameter::Name name = QgsServerParameter::UNKNOWN,
const QVariant::Type type = QVariant::String,
const QVariant defaultValue = QVariant( "" ) );

/**
* Raises an error in case of an invalid conversion.
* \throws QgsBadRequestException Invalid parameter exception
*/
void raiseError() const;

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

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

QgsServerParameter::Name mName;
};

/**
* QgsServerParameters provides an interface to retrieve and manipulate
* global parameters received from the client.
* \ingroup server
* \class QgsServerParameters
* \brief QgsServerParameters provides an interface to retrieve and manipulate global parameters received from the client.
* \since QGIS 3.4
*/
class SERVER_EXPORT QgsServerParameters

0 comments on commit 3e00b10

Please sign in to comment.
You can’t perform that action at this time.