QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
18 #ifndef QGSPROCESSINGPROVIDER_H
19 #define QGSPROCESSINGPROVIDER_H
21 #include "qgis_core.h"
46 FlagDeemphasiseSearchResults = 1 << 1,
48 Q_DECLARE_FLAGS( Flags, Flag )
66 virtual QIcon icon()
const;
72 virtual QString svgIconPath()
const;
79 virtual Flags flags()
const;
88 virtual QString
id()
const = 0;
96 virtual QString helpId()
const;
104 virtual QString
name()
const = 0;
116 virtual QString longName()
const;
126 virtual QString versionInfo()
const;
156 virtual QStringList supportedOutputRasterLayerExtensions()
const;
165 virtual QStringList supportedOutputVectorLayerExtensions()
const;
180 virtual QStringList supportedOutputTableExtensions()
const;
205 virtual QString defaultVectorFileExtension(
bool hasGeometry =
true )
const;
218 virtual QString defaultRasterFileExtension()
const;
233 virtual bool supportsNonFileBasedOutput()
const;
244 virtual bool load() { refreshAlgorithms();
return true; }
255 void refreshAlgorithms();
261 QList< const QgsProcessingAlgorithm * > algorithms()
const;
294 QMap< QString, const QgsProcessingAlgorithm * > mAlgorithms;
303 #endif // QGSPROCESSINGPROVIDER_H
virtual bool load()
Loads the provider.
virtual QString id() const =0
Returns the unique provider id, used for identifying the provider.
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
Abstract base class for processing providers.
QgsProcessingProvider & operator=(const QgsProcessingProvider &other)=delete
Providers cannot be copied.
QgsProcessingProvider(const QgsProcessingProvider &other)=delete
Providers cannot be copied.
Base class for all parameter definitions which represent file or layer destinations,...
virtual QString name() const =0
Returns the provider name, which is used to describe the provider within the GUI.
virtual void unload()
Unloads the provider.
Contains information about the context in which a processing algorithm is executed.
virtual bool canBeActivated() const
Returns true if the provider can be activated, or false if it cannot be activated (e....
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsField::ConfigurationFlags) CORE_EXPORT QDataStream &operator<<(QDataStream &out
Writes the field to stream out. QGIS version compatibility is not guaranteed.
virtual QString warningMessage() const
Returns an optional warning message to show users when running algorithms from this provider.
virtual void loadAlgorithms()=0
Loads all algorithms belonging to this provider.
Flag
Flags indicating how and when an provider operates and should be exposed to users.
Abstract base class for processing algorithms.
virtual bool isActive() const
Returns true if the provider is active and able to run algorithms.
void algorithmsLoaded()
Emitted when the provider has loaded (or refreshed) its list of available algorithms.