QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Public Member Functions | List of all members
QgsExpression::Parameter Class Reference

Represents a single parameter passed to a function. More...

#include <qgsexpression.h>

Public Member Functions

 Parameter (const QString &name, bool optional=false, const QVariant &defaultValue=QVariant())
 Constructor for Parameter. More...
 
QVariant defaultValue () const
 Returns the default value for the parameter. More...
 
QString name () const
 Returns the name of the parameter. More...
 
bool operator== (const Parameter &other) const
 
bool optional () const
 Returns true if the parameter is optional. More...
 

Detailed Description

Represents a single parameter passed to a function.

Note
added in QGIS 2.16

Definition at line 466 of file qgsexpression.h.

Constructor & Destructor Documentation

◆ Parameter()

QgsExpression::Parameter::Parameter ( const QString name,
bool  optional = false,
const QVariant defaultValue = QVariant() 
)
inline

Constructor for Parameter.

Parameters
nameparameter name, used when named parameter are specified in an expression
optionalset to true if parameter should be optional
defaultValuedefault value to use for optional parameters

Definition at line 475 of file qgsexpression.h.

Member Function Documentation

◆ defaultValue()

QVariant QgsExpression::Parameter::defaultValue ( ) const
inline

Returns the default value for the parameter.

Definition at line 490 of file qgsexpression.h.

◆ name()

QString QgsExpression::Parameter::name ( ) const
inline

Returns the name of the parameter.

Definition at line 484 of file qgsexpression.h.

◆ operator==()

bool QgsExpression::Parameter::operator== ( const Parameter other) const
inline

Definition at line 492 of file qgsexpression.h.

◆ optional()

bool QgsExpression::Parameter::optional ( ) const
inline

Returns true if the parameter is optional.

Definition at line 487 of file qgsexpression.h.


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