QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
QgsExpressionContextScope::StaticVariable Struct Reference

Single variable definition for use within a QgsExpressionContextScope. More...

#include <qgsexpressioncontext.h>

Public Member Functions

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

Public Attributes

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.
 

Detailed Description

Single variable definition for use within a QgsExpressionContextScope.

Definition at line 121 of file qgsexpressioncontext.h.

Constructor & Destructor Documentation

◆ StaticVariable()

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

Constructor for StaticVariable.

Parameters
namevariable name (should be unique within the QgsExpressionContextScope)
valueinitial variable value
readOnlytrue if variable should not be editable by users
isStatictrue if the variable will not change during the lifteime of an iterator.
descriptionoptional translated description of variable, for use in expression builder widgets

Definition at line 132 of file qgsexpressioncontext.h.

Member Data Documentation

◆ description

QString QgsExpressionContextScope::StaticVariable::description

Translated description of variable, for use within expression builder widgets.

Definition at line 153 of file qgsexpressioncontext.h.

◆ isStatic

bool QgsExpressionContextScope::StaticVariable::isStatic

A static variable can be cached for the lifetime of a context.

Definition at line 150 of file qgsexpressioncontext.h.

◆ name

QString QgsExpressionContextScope::StaticVariable::name

Variable name.

Definition at line 141 of file qgsexpressioncontext.h.

◆ readOnly

bool QgsExpressionContextScope::StaticVariable::readOnly

True if variable should not be editable by users.

Definition at line 147 of file qgsexpressioncontext.h.

◆ value

QVariant QgsExpressionContextScope::StaticVariable::value

Variable value.

Definition at line 144 of file qgsexpressioncontext.h.


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