22QString QgsCalculateExpressionAlgorithm::name()
const
24 return QStringLiteral(
"calculateexpression" );
32QString QgsCalculateExpressionAlgorithm::displayName()
const
34 return QObject::tr(
"Calculate expression" );
37QStringList QgsCalculateExpressionAlgorithm::tags()
const
39 return QObject::tr(
"evaluate,variable,store" ).split(
',' );
42QString QgsCalculateExpressionAlgorithm::group()
const
44 return QObject::tr(
"Modeler tools" );
47QString QgsCalculateExpressionAlgorithm::groupId()
const
49 return QStringLiteral(
"modelertools" );
52QString QgsCalculateExpressionAlgorithm::shortHelpString()
const
54 return QObject::tr(
"This algorithm calculates the result of a QGIS expression and makes it available for use in other parts of the model." );
57QgsCalculateExpressionAlgorithm *QgsCalculateExpressionAlgorithm::createInstance()
const
59 return new QgsCalculateExpressionAlgorithm();
62void QgsCalculateExpressionAlgorithm::initAlgorithm(
const QVariantMap & )
66 std::unique_ptr<QgsProcessingParameterString> inputParameter = std::make_unique<QgsProcessingParameterString>( QStringLiteral(
"INPUT" ), QObject::tr(
"Input" ), QVariant(),
false,
false );
69 inputParameter->setMetadata(
73 addParameter( inputParameter.release() );
80 const QVariant res = parameters.value( QStringLiteral(
"INPUT" ) );
83 outputs.insert( QStringLiteral(
"OUTPUT" ), res );
QFlags< ProcessingAlgorithmFlag > ProcessingAlgorithmFlags
Flags indicating how and when an algorithm operates and should be exposed to users.
@ Expression
Parameter value is taken from an expression, evaluated just before the algorithm runs.
@ HideFromToolbox
Algorithm should be hidden from the toolbox.
@ SkipGenericModelLogging
When running as part of a model, the generic algorithm setup and results logging should be skipped.
Contains information about the context in which a processing algorithm is executed.
Base class for providing feedback from a processing algorithm.
A variant output for processing algorithms, capable of storing any QVariant value.