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

Static Public Member Functions

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

Public Attributes

QgsWfsParameter::Name mName
 
- Public Attributes inherited from QgsServerParameterDefinition
QVariant mDefaultValue
 
QMetaType::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 QMetaType::Type  type = QMetaType::Type::QString,
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 29 of file qgswfsparameters.cpp.

◆ ~QgsWfsParameter()

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

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 114 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 120 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 108 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 35 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 48 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 72 of file qgswfsparameters.cpp.

Member Data Documentation

◆ mName

QgsWfsParameter::Name QgsWfs::QgsWfsParameter::mName

Definition at line 111 of file qgswfsparameters.h.


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