QgsExpressionContextScope::StaticVariable struct

Single variable definition for use within a QgsExpressionContextScope.

Constructors, destructors, conversion operators

StaticVariable(const QString& name = QString(), const QVariant& value = QVariant(), bool readOnly = false, bool isStatic = false, const QString& description = QString())
Constructor for StaticVariable.

Public variables

QString description
Translated description of variable, for use within expression builder widgets.
bool isStatic
A static variable can be cached for the lifetime of a context.
QString name
Variable name.
bool readOnly
True if variable should not be editable by users.
QVariant value
Variable value.

Function documentation

QgsExpressionContextScope::StaticVariable::StaticVariable(const QString& name = QString(), const QVariant& value = QVariant(), bool readOnly = false, bool isStatic = false, const QString& description = QString())

Constructor for StaticVariable.

Parameters
name variable name (should be unique within the QgsExpressionContextScope)
value initial variable value
readOnly true if variable should not be editable by users
isStatic true if the variable will not change during the lifteime of an iterator.
description optional translated description of variable, for use in expression builder widgets