18#ifndef QGSPROCESSINGMODELCHILDPARAMETERSOURCE_H
19#define QGSPROCESSINGMODELCHILDPARAMETERSOURCE_H
25class QgsProcessingModelAlgorithm;
34class CORE_EXPORT QgsProcessingModelChildParameterSource
42 QgsProcessingModelChildParameterSource() =
default;
44 bool operator==(
const QgsProcessingModelChildParameterSource &other )
const;
45 bool operator!=(
const QgsProcessingModelChildParameterSource &other )
const
57 static QgsProcessingModelChildParameterSource fromStaticValue(
const QVariant &value );
66 static QgsProcessingModelChildParameterSource fromModelParameter(
const QString ¶meterName );
75 static QgsProcessingModelChildParameterSource fromChildOutput(
const QString &childId,
const QString &outputName );
88 static QgsProcessingModelChildParameterSource fromExpression(
const QString &expression );
102 static QgsProcessingModelChildParameterSource fromExpressionText(
const QString &text );
120 QVariant staticValue()
const {
return mStaticValue; }
132 QString parameterName()
const {
return mParameterName; }
145 QString outputChildId()
const {
return mChildId; }
159 QString outputName()
const {
return mOutputName; }
172 QString expression()
const {
return mExpression; }
189 QString expressionText()
const {
return mExpressionText; }
206 QVariant toVariant()
const;
212 bool loadVariant(
const QVariantMap &map );
232 QString friendlyIdentifier( QgsProcessingModelAlgorithm *model )
const;
237 QVariant mStaticValue;
238 QString mParameterName;
242 QString mExpressionText;
247CORE_EXPORT QDataStream &
operator<<( QDataStream &out,
const QgsProcessingModelChildParameterSource &source );
248CORE_EXPORT QDataStream &
operator>>( QDataStream &in, QgsProcessingModelChildParameterSource &source );
252typedef QList< QgsProcessingModelChildParameterSource > QgsProcessingModelChildParameterSources;
ProcessingModelChildParameterSource
Processing model child parameter sources.
@ ExpressionText
Parameter value is taken from a text with expressions, evaluated just before the algorithm runs.
@ ChildOutput
Parameter value is taken from an output generated by a child algorithm.
@ ModelParameter
Parameter value is taken from a parent model parameter.
@ StaticValue
Parameter value is a static value.
@ Expression
Parameter value is taken from an expression, evaluated just before the algorithm runs.
Base class for the definition of processing parameters.
PythonOutputType
Available Python output types.
Q_DECLARE_METATYPE(QgsDatabaseQueryLogEntry)
QDataStream & operator<<(QDataStream &out, const QgsFeature &feature)
Writes the feature to stream out. QGIS version compatibility is not guaranteed.
QDataStream & operator>>(QDataStream &in, QgsFeature &feature)
Reads a feature from stream in into feature. QGIS version compatibility is not guaranteed.
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)