QGIS API Documentation
3.6.0-Noosa (5873452)
|
Definition of a parameter with basic conversion methods. More...
#include <qgsserverparameters.h>
Public Member Functions | |
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... | |
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 () const |
Converts the parameter into a string. More... | |
QStringList | toStringList (char delimiter=',') 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 void | raiseError (const QString &msg) |
Raises an exception in case of an invalid parameters. More... | |
Public Attributes | |
QVariant | mDefaultValue |
QVariant::Type | mType |
QVariant | mValue |
Definition of a parameter with basic conversion methods.
Definition at line 34 of file qgsserverparameters.h.
QgsServerParameterDefinition::QgsServerParameterDefinition | ( | const QVariant::Type | type = QVariant::String , |
const QVariant | defaultValue = QVariant( "" ) |
||
) |
Constructor for QgsServerParameterDefinition.
type | The type of the parameter |
defaultValue | The default value of the parameter |
Definition at line 31 of file qgsserverparameters.cpp.
|
virtualdefault |
Default destructor for QgsServerParameterDefinition.
|
virtual |
Returns true if the parameter is valid, false otherwise.
Reimplemented in QgsWms::QgsWmsParameter.
Definition at line 334 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 210 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 339 of file qgsserverparameters.cpp.
bool QgsServerParameterDefinition::toBool | ( | ) | const |
Converts the parameter into a boolean.
Definition at line 309 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 43 of file qgsserverparameters.cpp.
QList< QColor > QgsServerParameterDefinition::toColorList | ( | bool & | ok, |
char | delimiter = ',' |
||
) | 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 |
Definition at line 98 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 321 of file qgsserverparameters.cpp.
QList< double > QgsServerParameterDefinition::toDoubleList | ( | bool & | ok, |
char | delimiter = ',' |
||
) | 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 |
Definition at line 149 of file qgsserverparameters.cpp.
QList< QgsGeometry > QgsServerParameterDefinition::toGeomList | ( | bool & | ok, |
char | delimiter = ',' |
||
) | 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 |
Definition at line 75 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 296 of file qgsserverparameters.cpp.
QList< int > QgsServerParameterDefinition::toIntList | ( | bool & | ok, |
char | delimiter = ',' |
||
) | 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 |
Definition at line 129 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 169 of file qgsserverparameters.cpp.
QString QgsServerParameterDefinition::toString | ( | ) | const |
Converts the parameter into a string.
Definition at line 65 of file qgsserverparameters.cpp.
QStringList QgsServerParameterDefinition::toStringList | ( | char | delimiter = ',' | ) | const |
Converts the parameter into a list of strings.
delimiter | The character used for delimiting |
Definition at line 70 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 282 of file qgsserverparameters.cpp.
QString QgsServerParameterDefinition::typeName | ( | ) | const |
Returns the type of the parameter as a string.
Definition at line 38 of file qgsserverparameters.cpp.
QVariant QgsServerParameterDefinition::mDefaultValue |
Definition at line 164 of file qgsserverparameters.h.
QVariant::Type QgsServerParameterDefinition::mType |
Definition at line 162 of file qgsserverparameters.h.
QVariant QgsServerParameterDefinition::mValue |
Definition at line 163 of file qgsserverparameters.h.