-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[processing] Port feedback object to c++
Algorithms are now passed a QgsProcessingFeedback object instead of the loosely defined progress parameter.
- Loading branch information
1 parent
26a8a54
commit ede452b
Showing
303 changed files
with
1,012 additions
and
835 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/** | ||
* \class QgsProcessingFeedback | ||
* \ingroup core | ||
* 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. | ||
* \note added in QGIS 3.0 | ||
*/ | ||
class QgsProcessingFeedback : public QgsFeedback | ||
{ | ||
%TypeHeaderCode | ||
#include <qgsprocessingfeedback.h> | ||
%End | ||
|
||
public: | ||
|
||
/** | ||
* Sets the algorithm's progress. The progress | ||
* argument is limited to the range 0-100 and reflects the percentage | ||
* progress through the task. | ||
* @see setProgressText() | ||
*/ | ||
virtual void setProgress( double progress ); | ||
|
||
/** | ||
* 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 setProgress() | ||
*/ | ||
virtual void setProgressText( const QString& text ); | ||
|
||
/** | ||
* Reports that the algorithm encountered an error which prevented it | ||
* from successfully executing. | ||
*/ | ||
virtual void reportError( const QString& error ); | ||
|
||
/** | ||
* 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 pushCommandInfo() | ||
* @see pushDebugInfo() | ||
* @see pushConsoleInfo() | ||
*/ | ||
virtual void pushInfo( const QString& info ); | ||
|
||
/** | ||
* 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 pushInfo() | ||
* @see pushDebugInfo() | ||
* @see pushConsoleInfo() | ||
*/ | ||
virtual void pushCommandInfo( const QString& info ); | ||
|
||
/** | ||
* Pushes an informational message containing debugging helpers from | ||
* the algorithm. | ||
* @see pushInfo() | ||
* @see pushCommandInfo() | ||
* @see pushConsoleInfo() | ||
*/ | ||
virtual void pushDebugInfo( const QString& info ); | ||
|
||
|
||
/** | ||
* Pushes a console feedback message from the algorithm. This is used to | ||
* report the output from executing an external command or subprocess. | ||