QGIS API Documentation 4.1.0-Master (d6fb7a379fb)
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 reportChildExecutionFailure( const QString &childId, const QString &error );
101
105 QSet< QString > failedChildren() const { return mFailedChildren; }
106
112 void reportChildExecutionSuccess( const QString &childId, const QVariantMap &childResults );
113
117 QSet< QString > successfulChildren() const { return mSuccessfullyExecutedChildren; }
118
122 void reportChildResult( const QString &childId, const QgsProcessingModelChildAlgorithmResult &result );
123
129 void reportChildPruned( const QString &childId );
130
134 QSet< QString > prunedChildren() const { return mPrunedChildren; }
135
136 signals:
137
143 void childAlgorithmsBroken( const QSet< QString > &childIds );
144
150 void preparingChild( const QString &childId );
151
157 void childPreparationFailed( const QString &childId, const QString &error );
158
164 void childStarted( const QString &childId, const QVariantMap &childParameters );
165
171 void childProgressChanged( const QString &childId, double progress );
172
178 void childExecutionFailed( const QString &childId, const QString &error );
179
185 void childExecutionSucceeded( const QString &childId, const QVariantMap &childResults );
186
190 void childResultReported( const QString &childId, const QgsProcessingModelChildAlgorithmResult &result );
191
197 void childPruned( const QString &childId );
198
199 private:
200 QSet< QString > mPreparedChildren;
201 QSet< QString > mStartedChildren;
202 QSet< QString > mSuccessfullyExecutedChildren;
203 QSet< QString > mFailedChildren;
204 QSet< QString > mPrunedChildren;
205};
206
207#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 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.