QGIS API Documentation 3.29.0-Master (ade4f0cf0f)
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
QgsWfs::QgsWfsParameter Class Reference

WFS parameter received from the client. More...

#include <qgswfsparameters.h>

Inheritance diagram for QgsWfs::QgsWfsParameter:
Inheritance graph
[legend]

Public Types

enum  Name {
  UNKNOWN , OUTPUTFORMAT , RESULTTYPE , PROPERTYNAME ,
  MAXFEATURES , STARTINDEX , SRSNAME , TYPENAME ,
  FEATUREID , FILTER , BBOX , SORTBY ,
  EXP_FILTER , GEOMETRYNAME
}
 Available parameters for WFS requests. More...
 

Public Member Functions

 QgsWfsParameter (const QgsWfsParameter::Name name=QgsWfsParameter::UNKNOWN, const QVariant::Type type=QVariant::String, const QVariant defaultValue=QVariant(""))
 Constructor for QgsWfsParameter. More...
 
virtual ~QgsWfsParameter ()=default
 Default destructor for QgsWfsParameter. More...
 
void raiseError () const
 Raises an error in case of an invalid conversion. More...
 
int toInt () const
 Converts the parameter into an integer. More...
 
QgsRectangle toRectangle () const
 Converts the parameter into a rectangle. More...
 
QStringList toStringListWithExp (const QString &exp="\\‍(([^()]+)\\‍)") const
 Converts the parameter into a list of string. More...
 
- Public Member Functions inherited from QgsServerParameterDefinition
 QgsServerParameterDefinition (const QVariant::Type type=QVariant::String, const QVariant defaultValue=QVariant(""))
 Constructor for QgsServerParameterDefinition. More...
 
virtual ~QgsServerParameterDefinition ()=default
 Default destructor for QgsServerParameterDefinition. More...
 
virtual bool isValid () const
 Returns true if the parameter is valid, false otherwise. More...
 
QString loadUrl (bool &ok) const
 Loads the data associated to the parameter converted into an url. More...
 
bool toBool () const
 Converts the parameter into a boolean. More...
 
QColor toColor (bool &ok) const
 Converts the parameter into a color. More...
 
QList< QColor > toColorList (bool &ok, char delimiter=',') const
 Converts the parameter into a list of colors. More...
 
double toDouble (bool &ok) const
 Converts the parameter into a double. More...
 
QList< double > toDoubleList (bool &ok, char delimiter=',') const
 Converts the parameter into a list of doubles. More...
 
QStringList toExpressionList () const
 Converts the parameter into a list of QGIS expressions. More...
 
QList< QgsGeometrytoGeomList (bool &ok, char delimiter=',') const
 Converts the parameter into a list of geometries. More...
 
int toInt (bool &ok) const
 Converts the parameter into an integer. More...
 
QList< int > toIntList (bool &ok, char delimiter=',') const
 Converts the parameter into a list of integers. More...
 
QStringList toOgcFilterList () const
 Converts the parameter into a list of OGC filters. More...
 
QgsRectangle toRectangle (bool &ok) const
 Converts the parameter into a rectangle. More...
 
QString toString (bool defaultValue=false) const
 Converts the parameter into a string. More...
 
QStringList toStringList (char delimiter=',', bool skipEmptyParts=true) const
 Converts the parameter into a list of strings. More...
 
QUrl toUrl (bool &ok) const
 Converts the parameter into an url. More...
 
QString typeName () const
 Returns the type of the parameter as a string. More...
 

Static Public Member Functions

static QString name (const QgsWfsParameter::Name)
 Converts a parameter's name into its string representation. More...
 
static QgsWfsParameter::Name name (const QString &name)
 Converts a string into a parameter's name (UNKNOWN in case of an invalid string). More...
 
- Static Public Member Functions inherited from QgsServerParameterDefinition
static void raiseError (const QString &msg)
 Raises an exception in case of an invalid parameters. More...
 

Public Attributes

QgsWfsParameter::Name mName
 
- Public Attributes inherited from QgsServerParameterDefinition
QVariant mDefaultValue
 
QVariant::Type mType
 
QVariant mValue
 

Detailed Description

WFS parameter received from the client.

Since
QGIS 3.4

Definition at line 37 of file qgswfsparameters.h.

Member Enumeration Documentation

◆ Name

Available parameters for WFS requests.

Enumerator
UNKNOWN 
OUTPUTFORMAT 
RESULTTYPE 
PROPERTYNAME 
MAXFEATURES 
STARTINDEX 
SRSNAME 
TYPENAME 
FEATUREID 
FILTER 
BBOX 
SORTBY 
EXP_FILTER 
GEOMETRYNAME 

Definition at line 43 of file qgswfsparameters.h.

Constructor & Destructor Documentation

◆ QgsWfsParameter()

QgsWfs::QgsWfsParameter::QgsWfsParameter ( const QgsWfsParameter::Name  name = QgsWfsParameter::UNKNOWN,
const QVariant::Type  type = QVariant::String,
const QVariant  defaultValue = QVariant( "" ) 
)

Constructor for QgsWfsParameter.

Parameters
nameName of the WMS parameter
typeType of the parameter
defaultValueDefault value of the parameter

Definition at line 28 of file qgswfsparameters.cpp.

◆ ~QgsWfsParameter()

virtual QgsWfs::QgsWfsParameter::~QgsWfsParameter ( )
virtualdefault

Default destructor for QgsWfsParameter.

Member Function Documentation

◆ name() [1/2]

QString QgsWfs::QgsWfsParameter::name ( const QgsWfsParameter::Name  name)
static

Converts a parameter's name into its string representation.

Definition at line 115 of file qgswfsparameters.cpp.

◆ name() [2/2]

QgsWfsParameter::Name QgsWfs::QgsWfsParameter::name ( const QString &  name)
static

Converts a string into a parameter's name (UNKNOWN in case of an invalid string).

Definition at line 121 of file qgswfsparameters.cpp.

◆ raiseError()

void QgsWfs::QgsWfsParameter::raiseError ( ) const

Raises an error in case of an invalid conversion.

Exceptions
QgsBadRequestExceptionInvalid parameter exception

Definition at line 109 of file qgswfsparameters.cpp.

◆ toInt()

int QgsWfs::QgsWfsParameter::toInt ( ) const

Converts the parameter into an integer.

Returns
An integer
Exceptions
QgsBadRequestExceptionInvalid parameter exception

Definition at line 36 of file qgswfsparameters.cpp.

◆ toRectangle()

QgsRectangle QgsWfs::QgsWfsParameter::toRectangle ( ) const

Converts the parameter into a rectangle.

Returns
A rectangle
Exceptions
QgsBadRequestExceptionInvalid parameter exception

Definition at line 49 of file qgswfsparameters.cpp.

◆ toStringListWithExp()

QStringList QgsWfs::QgsWfsParameter::toStringListWithExp ( const QString &  exp = "\\(([^()]+)\\)") const

Converts the parameter into a list of string.

Parameters
expThe expression to use for splitting, pass an empty string to avoid splitting
Returns
A list of strings
Exceptions
QgsBadRequestExceptionInvalid parameter exception

Definition at line 73 of file qgswfsparameters.cpp.

Member Data Documentation

◆ mName

QgsWfsParameter::Name QgsWfs::QgsWfsParameter::mName

Definition at line 116 of file qgswfsparameters.h.


The documentation for this class was generated from the following files: