| QGIS API Documentation
    3.20.0-Odense (decaadbb31)
    | 
WMS parameter received from the client. More...
#include <qgswmsparameters.h>

| Public Member Functions | |
| QgsWmsParameter (const QgsWmsParameter::Name name=QgsWmsParameter::UNKNOWN, const QVariant::Type type=QVariant::String, const QVariant defaultValue=QVariant("")) | |
| Constructor for QgsWmsParameter.  More... | |
| virtual | ~QgsWmsParameter () override=default | 
| Default destructor for QgsWmsParameter.  More... | |
| bool | isValid () const override | 
| Returns trueif the parameter is valid,falseotherwise.  More... | |
| QString | loadUrl () const | 
| Loads the data associated to the parameter converted into an url.  More... | |
| QString | name () const | 
| Returns the name of the parameter.  More... | |
| void | raiseError () const | 
| Raises an error in case of an invalid conversion.  More... | |
| QColor | toColor () const | 
| Converts the parameter into a color.  More... | |
| QList< QColor > | toColorList (const char delimiter=',') const | 
| Converts the parameter into a list of colors.  More... | |
| double | toDouble () const | 
| Converts the parameter into a double.  More... | |
| QList< double > | toDoubleList (const char delimiter=',') const | 
| Converts the parameter into a list of doubles.  More... | |
| QList< QgsGeometry > | toGeomList (const char delimiter=',') const | 
| Converts the parameter into a list of geometries.  More... | |
| int | toInt () const | 
| Converts the parameter into an integer.  More... | |
| QList< int > | toIntList (const char delimiter=',') const | 
| Converts the parameter into a list of integers.  More... | |
| QgsRectangle | toRectangle () const | 
| Converts the parameter into a rectangle.  More... | |
| QStringList | toStyleList (const char delimiter=',') const | 
| Converts the parameter into a list of strings and keeps empty parts Default style value is an empty string.  More... | |
| QUrl | toUrl () const | 
| Converts the parameter into an url.  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... | |
| 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... | |
| QList< QgsGeometry > | toGeomList (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... | |
| 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 QgsWmsParameter::Name) | 
| Converts a parameter's name into its string representation.  More... | |
| static QgsWmsParameter::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 | |
| int | mId = -1 | 
| QgsWmsParameter::Name | mName | 
|  Public Attributes inherited from QgsServerParameterDefinition | |
| QVariant | mDefaultValue | 
| QVariant::Type | mType | 
| QVariant | mValue | 
WMS parameter received from the client.
Definition at line 98 of file qgswmsparameters.h.
Available parameters for WMS requests.
Definition at line 104 of file qgswmsparameters.h.
| QgsWms::QgsWmsParameter::QgsWmsParameter | ( | const QgsWmsParameter::Name | name = QgsWmsParameter::UNKNOWN, | 
| const QVariant::Type | type = QVariant::String, | ||
| const QVariant | defaultValue = QVariant( "" ) | ||
| ) | 
Constructor for QgsWmsParameter.
| name | Name of the WMS parameter | 
| type | Type of the parameter | 
| defaultValue | Default value of the parameter | 
Definition at line 31 of file qgswmsparameters.cpp.
| 
 | overridevirtualdefault | 
Default destructor for QgsWmsParameter.
| 
 | overridevirtual | 
Returns true if the parameter is valid, false otherwise. 
Reimplemented from QgsServerParameterDefinition.
Definition at line 39 of file qgswmsparameters.cpp.
| QString QgsWms::QgsWmsParameter::loadUrl | ( | ) | const | 
Loads the data associated to the parameter converted into an url.
| QgsBadRequestException | Invalid parameter exception | 
Definition at line 96 of file qgswmsparameters.cpp.
| QString QgsWms::QgsWmsParameter::name | ( | ) | const | 
Returns the name of the parameter.
Definition at line 194 of file qgswmsparameters.cpp.
| 
 | static | 
Converts a parameter's name into its string representation.
Definition at line 199 of file qgswmsparameters.cpp.
| 
 | static | 
Converts a string into a parameter's name (UNKNOWN in case of an invalid string).
Definition at line 205 of file qgswmsparameters.cpp.
| void QgsWms::QgsWmsParameter::raiseError | ( | ) | const | 
Raises an error in case of an invalid conversion.
| QgsBadRequestException | Invalid parameter exception | 
Definition at line 44 of file qgswmsparameters.cpp.
| QColor QgsWms::QgsWmsParameter::toColor | ( | ) | const | 
Converts the parameter into a color.
| QgsBadRequestException | Invalid parameter exception | 
Definition at line 126 of file qgswmsparameters.cpp.
| QList< QColor > QgsWms::QgsWmsParameter::toColorList | ( | const char | delimiter = ',' | ) | const | 
Converts the parameter into a list of colors.
| delimiter | The character delimiting string colors | 
| QgsBadRequestException | Invalid parameter exception | 
Definition at line 139 of file qgswmsparameters.cpp.
| double QgsWms::QgsWmsParameter::toDouble | ( | ) | const | 
Converts the parameter into a double.
| QgsBadRequestException | Invalid parameter exception | 
Definition at line 181 of file qgswmsparameters.cpp.
| QList< double > QgsWms::QgsWmsParameter::toDoubleList | ( | const char | delimiter = ',' | ) | const | 
Converts the parameter into a list of doubles.
| delimiter | The character delimiting string doubles | 
| QgsBadRequestException | Invalid parameter exception | 
Definition at line 167 of file qgswmsparameters.cpp.
| QList< QgsGeometry > QgsWms::QgsWmsParameter::toGeomList | ( | const char | delimiter = ',' | ) | const | 
Converts the parameter into a list of geometries.
| delimiter | The character delimiting string geometries | 
| QgsBadRequestException | Invalid parameter exception | 
Definition at line 55 of file qgswmsparameters.cpp.
| int QgsWms::QgsWmsParameter::toInt | ( | ) | const | 
Converts the parameter into an integer.
| QgsBadRequestException | Invalid parameter exception | 
Definition at line 83 of file qgswmsparameters.cpp.
| QList< int > QgsWms::QgsWmsParameter::toIntList | ( | const char | delimiter = ',' | ) | const | 
Converts the parameter into a list of integers.
| delimiter | The character delimiting string integers | 
| QgsBadRequestException | Invalid parameter exception | 
Definition at line 153 of file qgswmsparameters.cpp.
| QgsRectangle QgsWms::QgsWmsParameter::toRectangle | ( | ) | const | 
Converts the parameter into a rectangle.
| QgsBadRequestException | Invalid parameter exception | 
Definition at line 69 of file qgswmsparameters.cpp.
| QStringList QgsWms::QgsWmsParameter::toStyleList | ( | const char | delimiter = ',' | ) | const | 
Converts the parameter into a list of strings and keeps empty parts Default style value is an empty string.
| delimiter | The character used for delimiting | 
Definition at line 50 of file qgswmsparameters.cpp.
| QUrl QgsWms::QgsWmsParameter::toUrl | ( | ) | const | 
Converts the parameter into an url.
| QgsBadRequestException | Invalid parameter exception | 
Definition at line 113 of file qgswmsparameters.cpp.
| int QgsWms::QgsWmsParameter::mId = -1 | 
Definition at line 314 of file qgswmsparameters.h.
| QgsWmsParameter::Name QgsWms::QgsWmsParameter::mName | 
Definition at line 313 of file qgswmsparameters.h.