22 #include <gdal_version.h> 23 #if PROJ_VERSION_MAJOR > 4 66 pushDebugInfo( tr(
"GDAL version: %1" ).arg( GDALVersionInfo(
"RELEASE_NAME" ) ) );
67 pushDebugInfo( tr(
"GEOS version: %1" ).arg( GEOSversion() ) );
69 #if PROJ_VERSION_MAJOR > 4 70 PJ_INFO info = proj_info();
71 pushDebugInfo( tr(
"PROJ version: %1" ).arg( info.release ) );
75 if ( provider && !provider->
versionInfo().isEmpty() )
83 : mChildSteps( childAlgorithmCount )
84 , mFeedback( feedback )
93 mFeedback->
setProgress( 100.0 * static_cast< double >( mCurrentStep ) / mChildSteps );
126 void QgsProcessingMultiStepFeedback::updateOverallProgress(
double progress )
128 double baseProgress = 100.0 *
static_cast< double >( mCurrentStep ) / mChildSteps;
129 double currentAlgorithmProgress = progress / mChildSteps;
130 mFeedback->
setProgress( baseProgress + currentAlgorithmProgress );
virtual void pushConsoleInfo(const QString &info)
Pushes a console feedback message from the algorithm.
static const QString QGIS_VERSION
Version string.
Base class for providing feedback from a processing algorithm.
static const char * QGIS_DEV_VERSION
The development version.
virtual QString name() const =0
Returns the provider name, which is used to describe the provider within the GUI. ...
void cancel()
Tells the internal routines that the current operation should be canceled. This should be run by the ...
double progress() const
Returns the current progress reported by the feedback object.
void reportError(const QString &error, bool fatalError) override
Reports that the algorithm encountered an error while executing.
void pushConsoleInfo(const QString &info) override
Pushes a console feedback message from the algorithm.
void setProgress(double progress)
Sets the current progress for the feedback object.
virtual void pushCommandInfo(const QString &info)
Pushes an informational message containing a command from the algorithm.
void pushDebugInfo(const QString &info) override
Pushes an informational message containing debugging helpers from the algorithm.
void canceled()
Internal routines can connect to this signal if they use event loop.
void setCurrentStep(int step)
Sets the step which is being executed.
virtual QString versionInfo() const
Returns a version information string for the provider, or an empty string if this is not applicable (...
Abstract base class for processing providers.
void setProgressText(const QString &text) override
Sets a progress report text string.
virtual void setProgressText(const QString &text)
Sets a progress report text string.
void pushCommandInfo(const QString &info) override
Pushes an informational message containing a command from the algorithm.
void progressChanged(double progress)
Emitted when the feedback object reports a progress change.
virtual void pushInfo(const QString &info)
Pushes a general informational message from the algorithm.
static void logMessage(const QString &message, const QString &tag=QString(), Qgis::MessageLevel level=Qgis::Warning, bool notifyUser=true)
Adds a message to the log instance (and creates it if necessary).
QgsProcessingMultiStepFeedback(int steps, QgsProcessingFeedback *feedback)
Constructor for QgsProcessingMultiStepFeedback, for a process with the specified number of steps...
virtual void pushDebugInfo(const QString &info)
Pushes an informational message containing debugging helpers 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 reportError(const QString &error, bool fatalError=false)
Reports that the algorithm encountered an error while executing.
void pushInfo(const QString &info) override
Pushes a general informational message from the algorithm.