QgsNativeAlgorithms class

Native c++ processing algorithm provider.

Base classes

class QgsProcessingProvider
Abstract base class for processing providers.

Constructors, destructors, conversion operators

QgsNativeAlgorithms(QObject* parent = nullptr)
Constructor for QgsNativeAlgorithms.

Public functions

auto helpId() const -> QString override
Returns the provider help id string, used for creating QgsHelp urls for algorithms belong to this provider.
auto icon() const -> QIcon override
Returns an icon for the provider.
auto id() const -> QString override
Returns the unique provider id, used for identifying the provider.
auto name() const -> QString override
Returns the provider name, which is used to describe the provider within the GUI.
auto supportsNonFileBasedOutput() const -> bool override
Returns true if the provider supports non-file based outputs (such as memory layers or direct database outputs).
auto svgIconPath() const -> QString override
Returns a path to an SVG version of the provider's icon.

Protected functions

void loadAlgorithms() override
Loads all algorithms belonging to this provider.

Function documentation

QString QgsNativeAlgorithms::helpId() const override

Returns the provider help id string, used for creating QgsHelp urls for algorithms belong to this provider.

By default, this returns an empty string, meaning that no QgsHelp url should be created for the provider's algorithms.

QIcon QgsNativeAlgorithms::icon() const override

Returns an icon for the provider.

QString QgsNativeAlgorithms::id() const override

Returns the unique provider id, used for identifying the provider.

This string should be a unique, short, character only string, eg "qgis" or "gdal". This string should not be localised.

QString QgsNativeAlgorithms::name() const override

Returns the provider name, which is used to describe the provider within the GUI.

This string should be short (e.g. "Lastools") and localised.

bool QgsNativeAlgorithms::supportsNonFileBasedOutput() const override

Returns true if the provider supports non-file based outputs (such as memory layers or direct database outputs).

If a provider returns false for this method than it indicates that none of the outputs from any of the provider's algorithms have support for non-file based outputs. Returning true indicates that the algorithm's parameters will each individually declare their non-file based support.

The default behavior for providers is to support non-file based outputs, and most providers which rely solely on QGIS API (and which do not depend on third-party scripts or external dependencies) will automatically support this.

QString QgsNativeAlgorithms::svgIconPath() const override

Returns a path to an SVG version of the provider's icon.

void QgsNativeAlgorithms::loadAlgorithms() override protected

Loads all algorithms belonging to this provider.

Subclasses should implement this, calling addAlgorithm() to register all their associated algorithms.