QGIS API Documentation  3.6.0-Noosa (5873452)
Public Member Functions | List of all members
QgsProcessingFeedback Class Reference

Base class for providing feedback from a processing algorithm. More...

#include <qgsprocessingfeedback.h>

Inheritance diagram for QgsProcessingFeedback:
Inheritance graph
[legend]

Public Member Functions

virtual void pushCommandInfo (const QString &info)
 Pushes an informational message containing a command from the algorithm. More...
 
virtual void pushConsoleInfo (const QString &info)
 Pushes a console feedback message from the algorithm. More...
 
virtual void pushDebugInfo (const QString &info)
 Pushes an informational message containing debugging helpers from the algorithm. More...
 
virtual void pushInfo (const QString &info)
 Pushes a general informational message from the algorithm. More...
 
virtual void reportError (const QString &error, bool fatalError=false)
 Reports that the algorithm encountered an error while executing. More...
 
virtual void setProgressText (const QString &text)
 Sets a progress report text string. More...
 
- Public Member Functions inherited from QgsFeedback
 QgsFeedback (QObject *parent=nullptr)
 Construct a feedback object. More...
 
bool isCanceled () const
 Tells whether the operation has been canceled already. More...
 
double progress () const
 Returns the current progress reported by the feedback object. More...
 
void setProgress (double progress)
 Sets the current progress for the feedback object. More...
 

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. More...
 
- Signals inherited from QgsFeedback
void canceled ()
 Internal routines can connect to this signal if they use event loop. More...
 
void progressChanged (double progress)
 Emitted when the feedback object reports a progress change. More...
 

Detailed Description

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.

Since
QGIS 3.0

Definition at line 35 of file qgsprocessingfeedback.h.

Member Function Documentation

◆ pushCommandInfo()

virtual void QgsProcessingFeedback::pushCommandInfo ( const QString &  info)
inlinevirtual

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
pushInfo()
pushDebugInfo()
pushConsoleInfo()

Reimplemented in QgsProcessingMultiStepFeedback.

Definition at line 74 of file qgsprocessingfeedback.h.

◆ pushConsoleInfo()

virtual void QgsProcessingFeedback::pushConsoleInfo ( const QString &  info)
inlinevirtual

Pushes a console feedback message from the algorithm.

This is used to report the output from executing an external command or subprocess.

See also
pushInfo()
pushDebugInfo()
pushCommandInfo()

Reimplemented in QgsProcessingMultiStepFeedback.

Definition at line 92 of file qgsprocessingfeedback.h.

◆ pushDebugInfo()

virtual void QgsProcessingFeedback::pushDebugInfo ( const QString &  info)
inlinevirtual

Pushes an informational message containing debugging helpers from the algorithm.

See also
pushInfo()
pushCommandInfo()
pushConsoleInfo()

Reimplemented in QgsProcessingMultiStepFeedback.

Definition at line 83 of file qgsprocessingfeedback.h.

◆ pushInfo()

virtual void QgsProcessingFeedback::pushInfo ( const QString &  info)
inlinevirtual

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
pushCommandInfo()
pushDebugInfo()
pushConsoleInfo()

Reimplemented in QgsProcessingMultiStepFeedback.

Definition at line 64 of file qgsprocessingfeedback.h.

◆ reportError()

virtual void QgsProcessingFeedback::reportError ( const QString &  error,
bool  fatalError = false 
)
inlinevirtual

Reports that the algorithm encountered an error while executing.

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

Reimplemented in QgsProcessingMultiStepFeedback.

Definition at line 54 of file qgsprocessingfeedback.h.

◆ setProgressText()

virtual void QgsProcessingFeedback::setProgressText ( const QString &  text)
inlinevirtual

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()

Reimplemented in QgsProcessingMultiStepFeedback.

Definition at line 47 of file qgsprocessingfeedback.h.


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