18 #ifndef QGSPROCESSINGPROVIDER_H 19 #define QGSPROCESSINGPROVIDER_H 21 #include "qgis_core.h" 56 virtual QIcon icon()
const;
62 virtual QString svgIconPath()
const;
71 virtual QString id()
const = 0;
79 virtual QString helpId()
const;
87 virtual QString name()
const = 0;
99 virtual QString longName()
const;
109 virtual QString versionInfo()
const;
139 virtual QStringList supportedOutputRasterLayerExtensions()
const;
148 virtual QStringList supportedOutputVectorLayerExtensions()
const;
163 virtual QStringList supportedOutputTableExtensions()
const;
188 virtual QString defaultVectorFileExtension(
bool hasGeometry =
true )
const;
201 virtual QString defaultRasterFileExtension()
const;
216 virtual bool supportsNonFileBasedOutput()
const;
227 virtual bool load() { refreshAlgorithms();
return true; }
238 void refreshAlgorithms();
244 QList< const QgsProcessingAlgorithm * > algorithms()
const;
260 void algorithmsLoaded();
268 virtual void loadAlgorithms() = 0;
277 QMap< QString, const QgsProcessingAlgorithm * > mAlgorithms;
284 #endif // QGSPROCESSINGPROVIDER_H
Abstract base class for processing providers.
Base class for all parameter definitions which represent file or layer destinations, e.g.
Abstract base class for processing algorithms.
virtual QString warningMessage() const
Returns an optional warning message to show users when running algorithms from this provider...
virtual bool isActive() const
Returns true if the provider is active and able to run algorithms.
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into allowing algorithms to be written in pure substantial changes are required in order to port existing x Processing algorithms for QGIS x The most significant changes are outlined not GeoAlgorithm For algorithms which operate on features one by consider subclassing the QgsProcessingFeatureBasedAlgorithm class This class allows much of the boilerplate code for looping over features from a vector layer to be bypassed and instead requires implementation of a processFeature method Ensure that your algorithm(or algorithm 's parent class) implements the new pure virtual createInstance(self) call
virtual bool load()
Loads the provider.
virtual bool canBeActivated() const
Returns true if the provider can be activated, or false if it cannot be activated (e...
virtual void unload()
Unloads the provider.
Contains information about the context in which a processing algorithm is executed.