QGIS API Documentation 4.1.0-Master (31622b25bb0)
Loading...
Searching...
No Matches
qgsprocessingmodelfeedback.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsprocessingmodelfeedback.h
3 ----------------------
4 begin : May 2026
5 copyright : (C) 2026 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSPROCESSINGMODELFEEDBACK_H
19#define QGSPROCESSINGMODELFEEDBACK_H
20
21#include "qgis.h"
22#include "qgis_core.h"
24
25#define SIP_NO_FILE
26
28
38{
39 Q_OBJECT
40
41 public:
48 QgsProcessingModelFeedback( bool logFeedback = true );
49
55 void reportBrokenChildAlgorithms( const QSet< QString > &childIds );
56
62 void reportPreparingChild( const QString &childId );
63
67 QSet< QString > preparedChildren() const { return mPreparedChildren; }
68
74 void reportChildPreparationFailure( const QString &childId, const QString &error );
75
81 void reportChildStarted( const QString &childId, const QVariantMap &childParameters );
82
86 QSet< QString > startedChildren() const { return mStartedChildren; }
87
93 void reportChildProgress( const QString &childId, double progress );
94
100 void reportChildSourceLoaded( const QString &childId, const QString &parameterName, long long featureCount );
101
109 void reportChildSinkFeatureCountChanged( const QString &childId, const QString &childOutput, long long featureCount );
110
116 void reportChildExecutionFailure( const QString &childId, const QString &error );
117
121 QSet< QString > failedChildren() const { return mFailedChildren; }
122
128 void reportChildExecutionSuccess( const QString &childId, const QVariantMap &childResults );
129
133 QSet< QString > successfulChildren() const { return mSuccessfullyExecutedChildren; }
134
138 void reportChildResult( const QString &childId, const QgsProcessingModelChildAlgorithmResult &result );
139
145 void reportChildPruned( const QString &childId );
146
150 QSet< QString > prunedChildren() const { return mPrunedChildren; }
151
152 signals:
153
159 void childAlgorithmsBroken( const QSet< QString > &childIds );
160
166 void preparingChild( const QString &childId );
167
173 void childPreparationFailed( const QString &childId, const QString &error );
174
180 void childStarted( const QString &childId, const QVariantMap &childParameters );
181
187 void childProgressChanged( const QString &childId, double progress );
188
194 void childSourceLoaded( const QString &childId, const QString &parameterName, long long featureCount );
195
206 void childSinkFeatureCountChanged( const QString &childId, const QString &childOutput, long long featureCount );
207
213 void childExecutionFailed( const QString &childId, const QString &error );
214
220 void childExecutionSucceeded( const QString &childId, const QVariantMap &childResults );
221
225 void childResultReported( const QString &childId, const QgsProcessingModelChildAlgorithmResult &result );
226
232 void childPruned( const QString &childId );
233
234 private:
235 QSet< QString > mPreparedChildren;
236 QSet< QString > mStartedChildren;
237 QSet< QString > mSuccessfullyExecutedChildren;
238 QSet< QString > mFailedChildren;
239 QSet< QString > mPrunedChildren;
240};
241
242#endif // QGSPROCESSINGMODELFEEDBACK_H
double progress() const
Returns the current progress reported by the feedback object.
Definition qgsfeedback.h:81
QgsProcessingFeedback(bool logFeedback=true)
Constructor for QgsProcessingFeedback.
Encapsulates the results of running a child algorithm within a model.
QgsProcessingModelFeedback(bool logFeedback=true)
Constructor for QgsProcessingModelFeedback.
QSet< QString > preparedChildren() const
Returns the IDs of children which have been prepared.
QSet< QString > successfulChildren() const
Returns the IDs of children which were successfully executed.
void childExecutionSucceeded(const QString &childId, const QVariantMap &childResults)
Emitted when a child algorithm successfully executed.
void childPreparationFailed(const QString &childId, const QString &error)
Emitted when an error occurred while preparing a child algorithm.
QSet< QString > startedChildren() const
Returns the IDs of children which were started.
void childExecutionFailed(const QString &childId, const QString &error)
Emitted when an error occurred while executing a child algorithm.
void childStarted(const QString &childId, const QVariantMap &childParameters)
Emitted when a child algorithm has started executing.
void childResultReported(const QString &childId, const QgsProcessingModelChildAlgorithmResult &result)
Emitted when the result of a child algorithm has been reported.
void reportBrokenChildAlgorithms(const QSet< QString > &childIds)
Report a set of child algorithms as broken (e.g.
void preparingChild(const QString &childId)
Emitted when a child algorithm starts preparation.
void childAlgorithmsBroken(const QSet< QString > &childIds)
Emitted when a set of child algorithms was reported as broken (e.g.
void reportPreparingChild(const QString &childId)
Report a child algorithm as undergoing the preparation step.
QSet< QString > failedChildren() const
Returns the IDs of children which were failed execution.
void childPruned(const QString &childId)
Emitted when a child algorithm was pruned from the pending children (i.e.
void childSourceLoaded(const QString &childId, const QString &parameterName, long long featureCount)
Emitted when a feature source was retrieved for the specified child algorithm input parameter.
void childProgressChanged(const QString &childId, double progress)
Emitted when a child algorithm changes progress.
QSet< QString > prunedChildren() const
Returns the IDs of children which were pruned.
void childSinkFeatureCountChanged(const QString &childId, const QString &childOutput, long long featureCount)
Emitted when the count of features pushed to a child's sink has changed.