|
QGIS API Documentation 3.99.0-Master (2fe06baccd8)
|
Definition of a parameter with basic conversion methods. More...
#include <qgsserverparameters.h>

Public Member Functions | |
| 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=',', bool skipEmptyParts=true) 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=',', bool skipEmptyParts=true) const |
| Converts the parameter into a list of doubles. | |
| QStringList | toExpressionList () const |
| Converts the parameter into a list of QGIS expressions. | |
| QList< QgsGeometry > | toGeomList (bool &ok, char delimiter=',', bool skipEmptyParts=true) 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=',', bool skipEmptyParts=true) 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 void | raiseError (const QString &msg) |
| Raises an exception in case of an invalid parameters. | |
Public Attributes | |
| QVariant | mDefaultValue |
| QMetaType::Type | mType |
| QVariant | mValue |
Definition of a parameter with basic conversion methods.
Definition at line 35 of file qgsserverparameters.h.
| QgsServerParameterDefinition::QgsServerParameterDefinition | ( | const QMetaType::Type | type = QMetaType::Type::QString, |
| const QVariant | defaultValue = QVariant( "" ) ) |
Constructor for QgsServerParameterDefinition.
| type | The type of the parameter |
| defaultValue | The default value of the parameter |
Definition at line 36 of file qgsserverparameters.cpp.
| QgsServerParameterDefinition::QgsServerParameterDefinition | ( | const QVariant::Type | type, |
| const QVariant | defaultValue = QVariant( "" ) ) |
Constructor for QgsServerParameterDefinition.
| type | The type of the parameter |
| defaultValue | The default value of the parameter |
Definition at line 42 of file qgsserverparameters.cpp.
|
virtualdefault |
|
virtual |
Returns true if the parameter is valid, false otherwise.
Reimplemented in QgsWms::QgsWmsParameter.
Definition at line 410 of file qgsserverparameters.cpp.
| QString QgsServerParameterDefinition::loadUrl | ( | bool & | ok | ) | const |
Loads the data associated to the parameter converted into an url.
| ok | true if there's no error during the load, false otherwise |
Definition at line 323 of file qgsserverparameters.cpp.
|
static |
Raises an exception in case of an invalid parameters.
| msg | The message describing the exception |
| QgsBadRequestException | Invalid parameter exception |
Definition at line 415 of file qgsserverparameters.cpp.
| bool QgsServerParameterDefinition::toBool | ( | ) | const |
Converts the parameter into a boolean.
Definition at line 385 of file qgsserverparameters.cpp.
| QColor QgsServerParameterDefinition::toColor | ( | bool & | ok | ) | const |
Converts the parameter into a color.
| ok | true if there's no error during the conversion, false otherwise |
Definition at line 52 of file qgsserverparameters.cpp.
| QList< QColor > QgsServerParameterDefinition::toColorList | ( | bool & | ok, |
| char | delimiter = ',', | ||
| bool | skipEmptyParts = true ) const |
Converts the parameter into a list of colors.
| ok | true if there's no error during the conversion, false otherwise |
| delimiter | The character used for delimiting |
| skipEmptyParts | for splitting |
Definition at line 208 of file qgsserverparameters.cpp.
| double QgsServerParameterDefinition::toDouble | ( | bool & | ok | ) | const |
Converts the parameter into a double.
| ok | true if there's no error during the conversion, false otherwise |
Definition at line 397 of file qgsserverparameters.cpp.
| QList< double > QgsServerParameterDefinition::toDoubleList | ( | bool & | ok, |
| char | delimiter = ',', | ||
| bool | skipEmptyParts = true ) const |
Converts the parameter into a list of doubles.
| ok | true if there's no error during the conversion, false otherwise |
| delimiter | The character used for delimiting |
| skipEmptyParts | for splitting |
Definition at line 261 of file qgsserverparameters.cpp.
| QStringList QgsServerParameterDefinition::toExpressionList | ( | ) | const |
Converts the parameter into a list of QGIS expressions.
Definition at line 165 of file qgsserverparameters.cpp.
| QList< QgsGeometry > QgsServerParameterDefinition::toGeomList | ( | bool & | ok, |
| char | delimiter = ',', | ||
| bool | skipEmptyParts = true ) const |
Converts the parameter into a list of geometries.
| ok | true if there's no error during the conversion, false otherwise |
| delimiter | The character used for delimiting |
| skipEmptyParts | for splitting |
Definition at line 101 of file qgsserverparameters.cpp.
| int QgsServerParameterDefinition::toInt | ( | bool & | ok | ) | const |
Converts the parameter into an integer.
| ok | true if there's no error during the conversion, false otherwise |
Definition at line 372 of file qgsserverparameters.cpp.
| QList< int > QgsServerParameterDefinition::toIntList | ( | bool & | ok, |
| char | delimiter = ',', | ||
| bool | skipEmptyParts = true ) const |
Converts the parameter into a list of integers.
| ok | true if there's no error during the conversion, false otherwise |
| delimiter | The character used for delimiting |
| skipEmptyParts | for splitting |
Definition at line 240 of file qgsserverparameters.cpp.
| QStringList QgsServerParameterDefinition::toOgcFilterList | ( | ) | const |
Converts the parameter into a list of OGC filters.
Definition at line 125 of file qgsserverparameters.cpp.
| QgsRectangle QgsServerParameterDefinition::toRectangle | ( | bool & | ok | ) | const |
Converts the parameter into a rectangle.
| ok | true if there's no error during the conversion, false otherwise |
Definition at line 282 of file qgsserverparameters.cpp.
| QString QgsServerParameterDefinition::toString | ( | bool | defaultValue = false | ) | const |
Converts the parameter into a string.
If defaultValue is true and current value is empty, then the default value is returned.
Definition at line 74 of file qgsserverparameters.cpp.
| QStringList QgsServerParameterDefinition::toStringList | ( | char | delimiter = ',', |
| bool | skipEmptyParts = true ) const |
Converts the parameter into a list of strings.
| delimiter | The character used for delimiting |
| skipEmptyParts | To use QString::SkipEmptyParts for splitting |
Definition at line 84 of file qgsserverparameters.cpp.
| QUrl QgsServerParameterDefinition::toUrl | ( | bool & | ok | ) | const |
Converts the parameter into an url.
| ok | true if there's no error during the conversion, false otherwise |
Definition at line 358 of file qgsserverparameters.cpp.
| QString QgsServerParameterDefinition::typeName | ( | ) | const |
Returns the type of the parameter as a string.
Definition at line 47 of file qgsserverparameters.cpp.
| QVariant QgsServerParameterDefinition::mDefaultValue |
Definition at line 189 of file qgsserverparameters.h.
| QMetaType::Type QgsServerParameterDefinition::mType |
Definition at line 187 of file qgsserverparameters.h.
| QVariant QgsServerParameterDefinition::mValue |
Definition at line 188 of file qgsserverparameters.h.