QGIS/python/PyQt6/server/auto_generated/qgsserverquerystringparameter.sip.in
Nyall Dawson 3f6b490218 Sipify
2025-04-02 11:11:10 +10:00

127 lines
3.5 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/server/qgsserverquerystringparameter.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsServerQueryStringParameter
{
%Docstring(signature="appended")
Holds the information regarding a query string input parameter and its
validation.
The class is extendable through custom validators (C++ only) and/or by
subclassing and overriding the :py:func:`~value` method.
.. versionadded:: 3.10
%End
%TypeHeaderCode
#include "qgsserverquerystringparameter.h"
%End
public:
static const QMetaObject staticMetaObject;
public:
enum class Type
{
String,
Integer,
Double,
Boolean,
List,
};
QgsServerQueryStringParameter( const QString name, bool required = false, Type type = QgsServerQueryStringParameter::Type::String, const QString &description = QString(), const QVariant &defaultValue = QVariant() );
%Docstring
Constructs a QgsServerQueryStringParameter object.
:param name: parameter name
:param required:
:param type: the parameter type
:param description: parameter description
:param defaultValue: default value, it is ignored if the parameter is
required
%End
virtual ~QgsServerQueryStringParameter();
virtual QVariant value( const QgsServerApiContext &context ) const;
%Docstring
Extracts the value from the request ``context`` by validating the
parameter value and converting it to its proper Type. If the value is
not set and a default was not provided an invalid QVariant is returned.
Validation steps:
- required
- can convert to proper Type
- custom validator (if set - not available in Python bindings)
.. seealso:: :py:func:`setCustomValidator` (not available in Python bindings)
:return: the parameter value or an invalid QVariant if not found (and
not required)
:raises QgsServerApiBadRequestError: if validation fails
%End
QString description() const;
%Docstring
Returns parameter description
%End
static QString typeName( const Type type );
%Docstring
Returns the name of the ``type``
%End
QString name() const;
%Docstring
Returns the name of the parameter
%End
void setDescription( const QString &description );
%Docstring
Sets validator ``description``
%End
bool hidden() const;
%Docstring
Returns ``True`` if the parameter is hidden from the schema.
Hidden params can be useful to implement legacy parameters or parameters
that can be accepted without being advertised.
.. versionadded:: 3.28
%End
void setHidden( bool hidden );
%Docstring
Set the parameter's ``hidden`` status, parameters are not hidden by
default.
.. versionadded:: 3.28
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/server/qgsserverquerystringparameter.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/