15 #ifndef QGSEXPRESSIONCONTEXT_H 16 #define QGSEXPRESSIONCONTEXT_H 21 #include <QStringList> 48 bool usesGeometry =
false,
50 bool lazyEval =
false,
51 bool handlesNull =
false,
52 bool isContextual =
true )
53 :
QgsExpression::Function( fnname, params, group, helpText, usesGeometry, referencedColumns, lazyEval, handlesNull, isContextual )
139 bool removeVariable(
const QString& name );
147 bool hasVariable(
const QString& name )
const;
175 bool isReadOnly(
const QString& name )
const;
187 bool hasFunction(
const QString &name )
const;
221 void setFields(
const QgsFields& fields );
260 bool hasVariable(
const QString& name )
const;
278 bool isHighlightedVariable(
const QString& name )
const;
285 void setHighlightedVariables(
const QStringList& variableNames );
348 bool isReadOnly(
const QString& name )
const;
355 bool hasFunction(
const QString& name )
const;
374 int scopeCount()
const;
413 void setFields(
const QgsFields& fields );
425 void setOriginalValueVariable(
const QVariant& value );
473 static void setGlobalVariable(
const QString& name,
const QVariant& value );
481 static void setGlobalVariables(
const QgsStringMap& variables );
496 static void setProjectVariable(
const QString& name,
const QVariant& value );
504 static void setProjectVariables(
const QgsStringMap& variables );
607 static void registerContextFunctions();
611 #endif // QGSEXPRESSIONCONTEXT_H static const QString EXPR_ORIGINAL_VALUE
Inbuilt variable name for value original value variable.
Class for parsing and evaluation of expressions (formerly called "search strings").
Single variable definition for use within a QgsExpressionContextScope.
Base class for all map layer types.
A abstract base class for defining QgsExpression functions.
QList< QgsExpressionContextScope * > scopes()
Returns a list of scopes contained within the stack.
A item that forms part of a map composition.
QgsScopedExpressionFunction(const QString &fnname, int params, const QString &group, const QString &helpText=QString(), bool usesGeometry=false, const QStringList &referencedColumns=QStringList(), bool lazyEval=false, bool handlesNull=false, bool isContextual=true)
Container of fields for a vector layer.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
The QgsMapSettings class contains configuration for rendering of the map.
QString name() const
Returns the friendly display name of the context scope.
static const QString EXPR_SYMBOL_ANGLE
Inbuilt variable name for symbol angle variable.
virtual ~QgsScopedExpressionFunction()
virtual Q_DECL_DEPRECATED QVariant func(const QVariantList &, const QgsFeature *, QgsExpression *)
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
bool readOnly
True if variable should not be editable by users.
static const QString EXPR_SYMBOL_COLOR
Inbuilt variable name for symbol color variable.
std::ostream & operator<<(std::ostream &os, const QgsCoordinateReferenceSystem &r)
Output stream operator.
static const QString EXPR_FIELDS
Inbuilt variable name for fields storage.
Single scope for storing variables and functions for use within a QgsExpressionContext.
Graphics scene for map printing.
Contains utilities for working with QgsExpressionContext objects, including methods for creating scop...
static const QString EXPR_FEATURE
Inbuilt variable name for feature storage.
StaticVariable(const QString &name=QString(), const QVariant &value=QVariant(), bool readOnly=false)
Constructor for StaticVariable.
Class used to render an Atlas, iterating over geometry features.
int variableCount() const
Returns the count of variables contained within the scope.
static const QString EXPR_GEOMETRY_PART_NUM
Inbuilt variable name for geometry part number variable.
static const QString EXPR_GEOMETRY_PART_COUNT
Inbuilt variable name for geometry part count variable.
Expression function for use within a QgsExpressionContextScope.
QString name
Variable name.
QVariant value
Variable value.