18#ifndef QGSPROCESSINGMODELCHILDPARAMETERSOURCE_H
19#define QGSPROCESSINGMODELCHILDPARAMETERSOURCE_H
25class QgsProcessingModelAlgorithm;
34class CORE_EXPORT QgsProcessingModelChildParameterSource
53 QgsProcessingModelChildParameterSource() =
default;
55 bool operator==(
const QgsProcessingModelChildParameterSource &other )
const;
56 bool operator!=(
const QgsProcessingModelChildParameterSource &other )
const
68 static QgsProcessingModelChildParameterSource fromStaticValue(
const QVariant &value );
77 static QgsProcessingModelChildParameterSource fromModelParameter(
const QString ¶meterName );
86 static QgsProcessingModelChildParameterSource fromChildOutput(
const QString &childId,
const QString &outputName );
99 static QgsProcessingModelChildParameterSource fromExpression(
const QString &expression );
113 static QgsProcessingModelChildParameterSource fromExpressionText(
const QString &text );
118 Source source()
const;
125 void setSource( Source source );
131 QVariant staticValue()
const {
return mStaticValue; }
137 void setStaticValue(
const QVariant &value ) { mStaticValue = value; mSource = StaticValue; }
143 QString parameterName()
const {
return mParameterName; }
149 void setParameterName(
const QString &name ) { mParameterName = name; mSource = ModelParameter; }
156 QString outputChildId()
const {
return mChildId; }
163 void setOutputChildId(
const QString &
id ) { mChildId = id; mSource = ChildOutput; }
170 QString outputName()
const {
return mOutputName; }
177 void setOutputName(
const QString &name ) { mOutputName = name; mSource = ChildOutput; }
183 QString expression()
const {
return mExpression; }
192 void setExpression(
const QString &expression ) { mExpression = expression; mSource = Expression; }
200 QString expressionText()
const {
return mExpressionText; }
211 void setExpressionText(
const QString &text ) { mExpressionText = text; mSource = ExpressionText; }
217 QVariant toVariant()
const;
223 bool loadVariant(
const QVariantMap &map );
243 QString friendlyIdentifier( QgsProcessingModelAlgorithm *model )
const;
247 Source mSource = StaticValue;
248 QVariant mStaticValue;
249 QString mParameterName;
253 QString mExpressionText;
258CORE_EXPORT QDataStream &
operator<<( QDataStream &out,
const QgsProcessingModelChildParameterSource &source );
259CORE_EXPORT QDataStream &
operator>>( QDataStream &in, QgsProcessingModelChildParameterSource &source );
263typedef QList< QgsProcessingModelChildParameterSource > QgsProcessingModelChildParameterSources;
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)