Skip to content

Commit 3e00b10

Browse files
committedJul 23, 2018
Update doc for QgsServerParameters and QgsServerParameter
1 parent 9e4c3f2 commit 3e00b10

File tree

2 files changed

+53
-4
lines changed

2 files changed

+53
-4
lines changed
 

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

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ the Free Software Foundation; either version 2 of the License, or *
5555

5656
class QgsServerParameter : QgsServerParameterDefinition
5757
{
58+
%Docstring
59+
Parameter common to all services (WMS, WFS, ...)
60+
61+
.. versionadded:: 3.4
62+
%End
5863

5964
%TypeHeaderCode
6065
#include "qgsserverparameters.h"
@@ -76,20 +81,38 @@ class QgsServerParameter : QgsServerParameterDefinition
7681
QgsServerParameter( const QgsServerParameter::Name name = QgsServerParameter::UNKNOWN,
7782
const QVariant::Type type = QVariant::String,
7883
const QVariant defaultValue = QVariant( "" ) );
84+
%Docstring
85+
Constructor for QgsServerParameter.
86+
87+
:param name: The name of the parameter
88+
:param type: The type of the parameter
89+
:param defaultValue: The default value to use if not defined
90+
%End
7991

8092
void raiseError() const;
93+
%Docstring
94+
Raises an error in case of an invalid conversion.
95+
\throws QgsBadRequestException Invalid parameter exception
96+
%End
8197

8298
static QString name( const QgsServerParameter::Name name );
99+
%Docstring
100+
Converts a parameter's name into its string representation.
101+
%End
102+
83103
static QgsServerParameter::Name name( const QString &name );
104+
%Docstring
105+
Converts a string into a parameter's name (UNKNOWN in case of an
106+
invalid string).
107+
%End
84108

85109
QgsServerParameter::Name mName;
86110
};
87111

88112
class QgsServerParameters
89113
{
90114
%Docstring
91-
QgsServerParameters provides an interface to retrieve and manipulate
92-
global parameters received from the client.
115+
QgsServerParameters provides an interface to retrieve and manipulate global parameters received from the client.
93116

94117
.. versionadded:: 3.4
95118
%End

‎src/server/qgsserverparameters.h

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,18 @@ class SERVER_EXPORT QgsServerParameterDefinition
5656
QVariant mDefaultValue;
5757
};
5858

59+
/**
60+
* \ingroup server
61+
* \class QgsServerParameter
62+
* \brief Parameter common to all services (WMS, WFS, ...)
63+
* \since QGIS 3.4
64+
*/
5965
class SERVER_EXPORT QgsServerParameter : public QgsServerParameterDefinition
6066
{
6167
Q_GADGET
6268

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

82+
/**
83+
* Constructor for QgsServerParameter.
84+
* \param name The name of the parameter
85+
* \param type The type of the parameter
86+
* \param defaultValue The default value to use if not defined
87+
*/
7588
QgsServerParameter( const QgsServerParameter::Name name = QgsServerParameter::UNKNOWN,
7689
const QVariant::Type type = QVariant::String,
7790
const QVariant defaultValue = QVariant( "" ) );
7891

92+
/**
93+
* Raises an error in case of an invalid conversion.
94+
* \throws QgsBadRequestException Invalid parameter exception
95+
*/
7996
void raiseError() const;
8097

98+
/**
99+
* Converts a parameter's name into its string representation.
100+
*/
81101
static QString name( const QgsServerParameter::Name name );
102+
103+
/**
104+
* Converts a string into a parameter's name (UNKNOWN in case of an
105+
* invalid string).
106+
*/
82107
static QgsServerParameter::Name name( const QString &name );
83108

84109
QgsServerParameter::Name mName;
85110
};
86111

87112
/**
88-
* QgsServerParameters provides an interface to retrieve and manipulate
89-
* global parameters received from the client.
113+
* \ingroup server
114+
* \class QgsServerParameters
115+
* \brief QgsServerParameters provides an interface to retrieve and manipulate global parameters received from the client.
90116
* \since QGIS 3.4
91117
*/
92118
class SERVER_EXPORT QgsServerParameters

0 commit comments

Comments
 (0)
Please sign in to comment.