QGIS API Documentation 4.1.0-Master (d6fb7a379fb)
Loading...
Searching...
No Matches
QgsProcessingModelFeedback Class Reference

A Processing feedback class with extra signals and properties specific to feedback from Processing model execution. More...

#include <qgsprocessingmodelfeedback.h>

Inheritance diagram for QgsProcessingModelFeedback:

Signals

void childAlgorithmsBroken (const QSet< QString > &childIds)
 Emitted when a set of child algorithms was reported as broken (e.g.
void childExecutionFailed (const QString &childId, const QString &error)
 Emitted when an error occurred while executing a child algorithm.
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.
void childProgressChanged (const QString &childId, double progress)
 Emitted when a child algorithm changes progress.
void childPruned (const QString &childId)
 Emitted when a child algorithm was pruned from the pending children (i.e.
void childResultReported (const QString &childId, const QgsProcessingModelChildAlgorithmResult &result)
 Emitted when the result of a child algorithm has been reported.
void childStarted (const QString &childId, const QVariantMap &childParameters)
 Emitted when a child algorithm has started executing.
void preparingChild (const QString &childId)
 Emitted when a child algorithm starts preparation.
Signals inherited from QgsProcessingFeedback
void commandInfoPushed (const QString &text)
 Emitted when command information text is pushed.
void consoleInfoPushed (const QString &text)
 Emitted when console information text is pushed.
void debugInfoPushed (const QString &text)
 Emitted when debug information text is pushed.
void errorReported (const QString &text, bool fatalError)
 Emitted when an error is reported.
void formattedMessagePushed (const QString &html)
 Emitted when a formatted html message is pushed.
void infoPushed (const QString &text)
 Emitted when information text is pushed.
void progressTextChanged (const QString &text)
 Emitted when the progress text is changed.
void warningPushed (const QString &text)
 Emitted when an warning is pushed.
Signals inherited from QgsFeedback
void canceled ()
 Internal routines can connect to this signal if they use event loop.
void processedCountChanged (unsigned long long processedCount)
 Emitted when the feedback object reports a change in the number of processed objects.
void progressChanged (double progress)
 Emitted when the feedback object reports a progress change.

Public Member Functions

 QgsProcessingModelFeedback (bool logFeedback=true)
 Constructor for QgsProcessingModelFeedback.
QSet< QString > failedChildren () const
 Returns the IDs of children which were failed execution.
QSet< QString > preparedChildren () const
 Returns the IDs of children which have been prepared.
QSet< QString > prunedChildren () const
 Returns the IDs of children which were pruned.
void reportBrokenChildAlgorithms (const QSet< QString > &childIds)
 Report a set of child algorithms as broken (e.g.
void reportChildExecutionFailure (const QString &childId, const QString &error)
 Report an error which occurred while executing a child algorithm.
void reportChildExecutionSuccess (const QString &childId, const QVariantMap &childResults)
 Report that a child algorithm successfully executed.
void reportChildPreparationFailure (const QString &childId, const QString &error)
 Report an error which occurred while preparing a child algorithm.
void reportChildProgress (const QString &childId, double progress)
 Reports the progress of a running child algorithm.
void reportChildPruned (const QString &childId)
 Report that a child algorithm was pruned from the pending children (i.e.
void reportChildResult (const QString &childId, const QgsProcessingModelChildAlgorithmResult &result)
 Reports the result of the execution of a child algorithm.
void reportChildStarted (const QString &childId, const QVariantMap &childParameters)
 Report a child algorithm as started execution.
void reportPreparingChild (const QString &childId)
 Report a child algorithm as undergoing the preparation step.
QSet< QString > startedChildren () const
 Returns the IDs of children which were started.
QSet< QString > successfulChildren () const
 Returns the IDs of children which were successfully executed.
Public Member Functions inherited from QgsProcessingFeedback
 QgsProcessingFeedback (bool logFeedback=true)
 Constructor for QgsProcessingFeedback.
virtual QString htmlLog () const
 Returns the HTML formatted contents of the log, which contains all messages pushed to the feedback object.
virtual void pushCommandInfo (const QString &info)
 Pushes an informational message containing a command from the algorithm.
virtual void pushConsoleInfo (const QString &info)
 Pushes a console feedback message from the algorithm.
virtual void pushDebugInfo (const QString &info)
 Pushes an informational message containing debugging helpers from the algorithm.
virtual void pushFormattedMessage (const QString &html, const QString &text)
 Pushes a pre-formatted message from the algorithm.
void pushFormattedResults (const QgsProcessingAlgorithm *algorithm, QgsProcessingContext &context, const QVariantMap &results)
 Pushes a summary of the execution results to the log.
virtual void pushInfo (const QString &info)
 Pushes a general informational message from the algorithm.
void pushVersionInfo (const QgsProcessingProvider *provider=nullptr)
 Pushes a summary of the QGIS (and underlying library) version information to the log.
virtual void pushWarning (const QString &warning)
 Pushes a warning informational message from the algorithm.
virtual void reportError (const QString &error, bool fatalError=false)
 Reports that the algorithm encountered an error while executing.
virtual void setProgressText (const QString &text)
 Sets a progress report text string.
virtual QString textLog () const
 Returns the plain text contents of the log, which contains all messages pushed to the feedback object.
Public Member Functions inherited from QgsFeedback
 QgsFeedback (QObject *parent=nullptr)
 Construct a feedback object.
 ~QgsFeedback () override
bool isCanceled () const
 Tells whether the operation has been canceled already.
unsigned long long processedCount () const
 Returns the current processed objects count reported by the feedback object.
double progress () const
 Returns the current progress reported by the feedback object.
void setProcessedCount (unsigned long long processedCount)
 Sets the current processed objects count for the feedback object.
void setProgress (double progress)
 Sets the current progress for the feedback object.

Additional Inherited Members

Public Slots inherited from QgsFeedback
void cancel ()
 Tells the internal routines that the current operation should be canceled. This should be run by the main thread.
Static Public Member Functions inherited from QgsFeedback
static std::unique_ptr< QgsFeedbackcreateScaledFeedback (QgsFeedback *parentFeedback, double startPercentage, double endPercentage)
 Returns a feedback object whose [0, 100] progression range will be mapped to parentFeedback [startPercentage, endPercentage].

Detailed Description

A Processing feedback class with extra signals and properties specific to feedback from Processing model execution.

Note
Not available in Python bindings.
Since
QGIS 4.2

Definition at line 37 of file qgsprocessingmodelfeedback.h.

Constructor & Destructor Documentation

◆ QgsProcessingModelFeedback()

QgsProcessingModelFeedback::QgsProcessingModelFeedback ( bool logFeedback = true)

Constructor for QgsProcessingModelFeedback.

If logFeedback is true, then all feedback received will be directed to QgsMessageLog.

Definition at line 22 of file qgsprocessingmodelfeedback.cpp.

Member Function Documentation

◆ childAlgorithmsBroken

void QgsProcessingModelFeedback::childAlgorithmsBroken ( const QSet< QString > & childIds)
signal

Emitted when a set of child algorithms was reported as broken (e.g.

depending on algorithms which are not available).

See also
reportBrokenChildAlgorithms()

◆ childExecutionFailed

void QgsProcessingModelFeedback::childExecutionFailed ( const QString & childId,
const QString & error )
signal

Emitted when an error occurred while executing a child algorithm.

See also
reportChildExecutionFailure()

◆ childExecutionSucceeded

void QgsProcessingModelFeedback::childExecutionSucceeded ( const QString & childId,
const QVariantMap & childResults )
signal

Emitted when a child algorithm successfully executed.

See also
reportChildExecutionSuccess()

◆ childPreparationFailed

void QgsProcessingModelFeedback::childPreparationFailed ( const QString & childId,
const QString & error )
signal

Emitted when an error occurred while preparing a child algorithm.

See also
reportChildPreparationFailure()

◆ childProgressChanged

void QgsProcessingModelFeedback::childProgressChanged ( const QString & childId,
double progress )
signal

Emitted when a child algorithm changes progress.

See also
reportChildProgress()

◆ childPruned

void QgsProcessingModelFeedback::childPruned ( const QString & childId)
signal

Emitted when a child algorithm was pruned from the pending children (i.e.

it does not need to execute).

See also
reportChildPruned()

◆ childResultReported

void QgsProcessingModelFeedback::childResultReported ( const QString & childId,
const QgsProcessingModelChildAlgorithmResult & result )
signal

Emitted when the result of a child algorithm has been reported.

◆ childStarted

void QgsProcessingModelFeedback::childStarted ( const QString & childId,
const QVariantMap & childParameters )
signal

Emitted when a child algorithm has started executing.

See also
reportChildStarted()

◆ failedChildren()

QSet< QString > QgsProcessingModelFeedback::failedChildren ( ) const
inline

Returns the IDs of children which were failed execution.

Definition at line 105 of file qgsprocessingmodelfeedback.h.

◆ preparedChildren()

QSet< QString > QgsProcessingModelFeedback::preparedChildren ( ) const
inline

Returns the IDs of children which have been prepared.

Definition at line 67 of file qgsprocessingmodelfeedback.h.

◆ preparingChild

void QgsProcessingModelFeedback::preparingChild ( const QString & childId)
signal

Emitted when a child algorithm starts preparation.

See also
reportPreparingChild()

◆ prunedChildren()

QSet< QString > QgsProcessingModelFeedback::prunedChildren ( ) const
inline

Returns the IDs of children which were pruned.

Definition at line 134 of file qgsprocessingmodelfeedback.h.

◆ reportBrokenChildAlgorithms()

void QgsProcessingModelFeedback::reportBrokenChildAlgorithms ( const QSet< QString > & childIds)

Report a set of child algorithms as broken (e.g.

depending on algorithms which are not available).

See also
childAlgorithmsBroken()

Definition at line 26 of file qgsprocessingmodelfeedback.cpp.

◆ reportChildExecutionFailure()

void QgsProcessingModelFeedback::reportChildExecutionFailure ( const QString & childId,
const QString & error )

Report an error which occurred while executing a child algorithm.

See also
childExecutionFailed()

Definition at line 53 of file qgsprocessingmodelfeedback.cpp.

◆ reportChildExecutionSuccess()

void QgsProcessingModelFeedback::reportChildExecutionSuccess ( const QString & childId,
const QVariantMap & childResults )

Report that a child algorithm successfully executed.

See also
childExecutionSucceeded()

Definition at line 59 of file qgsprocessingmodelfeedback.cpp.

◆ reportChildPreparationFailure()

void QgsProcessingModelFeedback::reportChildPreparationFailure ( const QString & childId,
const QString & error )

Report an error which occurred while preparing a child algorithm.

See also
childPreparationFailed()

Definition at line 37 of file qgsprocessingmodelfeedback.cpp.

◆ reportChildProgress()

void QgsProcessingModelFeedback::reportChildProgress ( const QString & childId,
double progress )

Reports the progress of a running child algorithm.

See also
childProgressChanged()

Definition at line 48 of file qgsprocessingmodelfeedback.cpp.

◆ reportChildPruned()

void QgsProcessingModelFeedback::reportChildPruned ( const QString & childId)

Report that a child algorithm was pruned from the pending children (i.e.

it does not need to execute).

See also
childPruned()

Definition at line 70 of file qgsprocessingmodelfeedback.cpp.

◆ reportChildResult()

void QgsProcessingModelFeedback::reportChildResult ( const QString & childId,
const QgsProcessingModelChildAlgorithmResult & result )

Reports the result of the execution of a child algorithm.

Definition at line 65 of file qgsprocessingmodelfeedback.cpp.

◆ reportChildStarted()

void QgsProcessingModelFeedback::reportChildStarted ( const QString & childId,
const QVariantMap & childParameters )

Report a child algorithm as started execution.

See also
childStarted()

Definition at line 42 of file qgsprocessingmodelfeedback.cpp.

◆ reportPreparingChild()

void QgsProcessingModelFeedback::reportPreparingChild ( const QString & childId)

Report a child algorithm as undergoing the preparation step.

See also
preparingChild()

Definition at line 31 of file qgsprocessingmodelfeedback.cpp.

◆ startedChildren()

QSet< QString > QgsProcessingModelFeedback::startedChildren ( ) const
inline

Returns the IDs of children which were started.

Definition at line 86 of file qgsprocessingmodelfeedback.h.

◆ successfulChildren()

QSet< QString > QgsProcessingModelFeedback::successfulChildren ( ) const
inline

Returns the IDs of children which were successfully executed.

Definition at line 117 of file qgsprocessingmodelfeedback.h.


The documentation for this class was generated from the following files: