26 return QStringLiteral(
"expression" );
31 return QObject::tr(
"Custom Expression" );
44 return mExpression.
evaluate( &expContext ).toString();
54 std::unique_ptr< QgsExpressionBasedNumericFormat > res = std::make_unique< QgsExpressionBasedNumericFormat >();
55 res->mExpression =
QgsExpression(
configuration.value( QStringLiteral(
"expression" ), QStringLiteral(
"@value" ) ).toString() );
62 res.insert( QStringLiteral(
"expression" ), mExpression.
expression() );
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
void setOriginalValueVariable(const QVariant &value)
Sets the original value variable value for the context.
Class for parsing and evaluation of expressions (formerly called "search strings").
QString expression() const
Returns the original, unmodified expression string.
QVariant evaluate()
Evaluate the feature and return the result.
A context for numeric formats.
QgsExpressionContext expressionContext() const
Returns the expression context to use when evaluating QgsExpressions.
The class is used as a container of context for various read/write operations on other objects.