QGIS API Documentation 4.1.0-Master (fd797d02722)
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"
25
26#define SIP_NO_FILE
27
37{
38 Q_OBJECT
39
40 public:
47 QgsProcessingModelFeedback( bool logFeedback = true );
48
54 void reportBrokenChildAlgorithms( const QSet< QString > &childIds );
55
61 void reportPreparingChild( const QString &childId );
62
66 QSet< QString > preparedChildren() const { return mPreparedChildren; }
67
73 void reportChildPreparationFailure( const QString &childId, const QString &error );
74
80 void reportChildStarted( const QString &childId, const QVariantMap &childParameters );
81
85 QSet< QString > startedChildren() const { return mStartedChildren; }
86
92 void reportChildProgress( const QString &childId, double progress );
93
99 void reportChildSourceLoaded( const QString &childId, const QString &parameterName, long long featureCount );
100
108 void reportChildSinkFeatureCountChanged( const QString &childId, const QString &childOutput, long long featureCount );
109
115 void reportChildExecutionFailure( const QString &childId, const QString &error );
116
120 QSet< QString > failedChildren() const { return mFailedChildren; }
121
127 void reportChildExecutionSuccess( const QString &childId, const QVariantMap &childResults );
128
132 QSet< QString > successfulChildren() const { return mSuccessfullyExecutedChildren; }
133
137 void reportChildResult( const QString &childId, const QgsProcessingModelChildAlgorithmResult &result );
138
144 void reportChildPruned( const QString &childId );
145
149 QSet< QString > prunedChildren() const { return mPrunedChildren; }
150
151 signals:
152
158 void childAlgorithmsBroken( const QSet< QString > &childIds );
159
165 void preparingChild( const QString &childId );
166
172 void childPreparationFailed( const QString &childId, const QString &error );
173
179 void childStarted( const QString &childId, const QVariantMap &childParameters );
180
186 void childProgressChanged( const QString &childId, double progress );
187
193 void childSourceLoaded( const QString &childId, const QString &parameterName, long long featureCount );
194
205 void childSinkFeatureCountChanged( const QString &childId, const QString &childOutput, long long featureCount );
206
212 void childExecutionFailed( const QString &childId, const QString &error );
213
219 void childExecutionSucceeded( const QString &childId, const QVariantMap &childResults );
220
224 void childResultReported( const QString &childId, const QgsProcessingModelChildAlgorithmResult &result );
225
231 void childPruned( const QString &childId );
232
233 private:
234 QSet< QString > mPreparedChildren;
235 QSet< QString > mStartedChildren;
236 QSet< QString > mSuccessfullyExecutedChildren;
237 QSet< QString > mFailedChildren;
238 QSet< QString > mPrunedChildren;
239};
240
241#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.