Class: QgsProcessingFeedback

class qgis.core.QgsProcessingFeedback

Bases: QgsFeedback

Base class for providing feedback from a processing algorithm.

This base class implementation silently ignores all feedback reported by algorithms. Subclasses of QgsProcessingFeedback can be used to log this feedback or report it to users via the GUI.

New in version 3.0.

QgsProcessingFeedback(logFeedback: bool = True) Constructor for QgsProcessingFeedback.

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

Methods

childEvent

connectNotify

customEvent

disconnectNotify

htmlLog

Returns the HTML formatted contents of the log, which contains all messages pushed to the feedback object.

isSignalConnected

pushCommandInfo

Pushes an informational message containing a command from the algorithm.

pushConsoleInfo

Pushes a console feedback message from the algorithm.

pushDebugInfo

Pushes an informational message containing debugging helpers from the algorithm.

pushInfo

Pushes a general informational message from the algorithm.

pushVersionInfo

Pushes a summary of the QGIS (and underlying library) version information to the log.

pushWarning

Pushes a warning informational message from the algorithm.

receivers

reportError

Reports that the algorithm encountered an error while executing.

sender

senderSignalIndex

setProgressText

Sets a progress report text string.

textLog

Returns the plain text contents of the log, which contains all messages pushed to the feedback object.

timerEvent

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
htmlLog(self) str

Returns the HTML formatted contents of the log, which contains all messages pushed to the feedback object.

See also

textLog()

New in version 3.14.

Return type

str

isSignalConnected(self, QMetaMethod) bool
pushCommandInfo(self, info: str)

Pushes an informational message containing a command from the algorithm. This is usually used to report commands which are executed in an external application or as subprocesses.

See also

pushWarning()

See also

pushInfo()

See also

pushDebugInfo()

Parameters

info (str) –

pushConsoleInfo(self, info: str)

Pushes a console feedback message from the algorithm. This is used to report the output from executing an external command or subprocess.

See also

pushWarning()

See also

pushInfo()

See also

pushDebugInfo()

Parameters

info (str) –

pushDebugInfo(self, info: str)

Pushes an informational message containing debugging helpers from the algorithm.

See also

pushWarning()

See also

pushInfo()

Parameters

info (str) –

pushInfo(self, info: str)

Pushes a general informational message from the algorithm. This can be used to report feedback which is neither a status report or an error, such as “Found 47 matching features”.

See also

pushWarning()

See also

pushDebugInfo()

Parameters

info (str) –

pushVersionInfo(self, provider: QgsProcessingProvider = None)

Pushes a summary of the QGIS (and underlying library) version information to the log.

New in version 3.4.7.

Parameters

provider (QgsProcessingProvider = None) –

pushWarning(self, warning: str)

Pushes a warning informational message from the algorithm. This should only be used sparsely as to maintain the importance of visual queues associated to this type of message.

See also

pushInfo()

See also

pushDebugInfo()

New in version 3.16.2.

Parameters

warning (str) –

receivers(self, PYQT_SIGNAL) int
reportError(self, error: str, fatalError: bool = False)

Reports that the algorithm encountered an error while executing.

If fatalError is True then the error prevented the algorithm from executing.

Parameters
  • error (str) –

  • fatalError (bool = False) –

sender(self) QObject
senderSignalIndex(self) int
setProgressText(self, text: str)

Sets a progress report text string. This can be used in conjunction with setProgress() to provide detailed progress reports, such as “Transformed 4 of 5 layers”.

See also

setProgress()

Parameters

text (str) –

textLog(self) str

Returns the plain text contents of the log, which contains all messages pushed to the feedback object.

See also

htmlLog()

New in version 3.14.

Return type

str

timerEvent(self, QTimerEvent)