QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
Public Member Functions | Protected Member Functions | List of all members
QgsNativeAlgorithms Class Reference

Native c++ processing algorithm provider. More...

#include <qgsnativealgorithms.h>

Inheritance diagram for QgsNativeAlgorithms:
Inheritance graph
[legend]

Public Member Functions

 QgsNativeAlgorithms (QObject *parent=nullptr)
 Constructor for QgsNativeAlgorithms. More...
 
Qgis::ProcessingProviderFlags flags () const override
 Returns the flags indicating how and when the provider operates and should be exposed to users. More...
 
QString helpId () const override
 Returns the provider help id string, used for creating QgsHelp urls for algorithms belong to this provider. More...
 
QIcon icon () const override
 Returns an icon for the provider. More...
 
QString id () const override
 Returns the unique provider id, used for identifying the provider. More...
 
QString name () const override
 Returns the provider name, which is used to describe the provider within the GUI. More...
 
bool supportsNonFileBasedOutput () const override
 Returns true if the provider supports non-file based outputs (such as memory layers or direct database outputs). More...
 
QString svgIconPath () const override
 Returns a path to an SVG version of the provider's icon. More...
 
- Public Member Functions inherited from QgsProcessingProvider
 QgsProcessingProvider (const QgsProcessingProvider &other)=delete
 Providers cannot be copied. More...
 
 QgsProcessingProvider (QObject *parent=nullptr)
 Constructor for QgsProcessingProvider. More...
 
 ~QgsProcessingProvider () override
 
const QgsProcessingAlgorithmalgorithm (const QString &name) const
 Returns the matching algorithm by name, or nullptr if no matching algorithm is contained by this provider. More...
 
QList< const QgsProcessingAlgorithm * > algorithms () const
 Returns a list of algorithms supplied by this provider. More...
 
virtual bool canBeActivated () const
 Returns true if the provider can be activated, or false if it cannot be activated (e.g. More...
 
virtual QString defaultPointCloudFileExtension () const
 Returns the default file extension to use for point cloud outputs created by the provider. More...
 
virtual QString defaultRasterFileExtension () const
 Returns the default file extension to use for raster outputs created by the provider. More...
 
virtual QString defaultVectorFileExtension (bool hasGeometry=true) const
 Returns the default file extension to use for vector outputs created by the provider. More...
 
virtual QString defaultVectorTileFileExtension () const
 Returns the default file extension to use for vector tile outputs created by the provider. More...
 
virtual Qgis::ProcessingProviderFlags flags () const
 Returns the flags indicating how and when the provider operates and should be exposed to users. More...
 
virtual QString helpId () const
 Returns the provider help id string, used for creating QgsHelp urls for algorithms belong to this provider. More...
 
virtual QIcon icon () const
 Returns an icon for the provider. More...
 
virtual QString id () const =0
 Returns the unique provider id, used for identifying the provider. More...
 
virtual bool isActive () const
 Returns true if the provider is active and able to run algorithms. More...
 
virtual bool isSupportedOutputValue (const QVariant &outputValue, const QgsProcessingDestinationParameter *parameter, QgsProcessingContext &context, QString &error) const
 Returns true if the specified outputValue is of a supported file format for the given destination parameter. More...
 
virtual bool load ()
 Loads the provider. More...
 
virtual QString longName () const
 Returns the longer version of the provider name, which can include extra details such as version numbers. More...
 
virtual QString name () const =0
 Returns the provider name, which is used to describe the provider within the GUI. More...
 
QgsProcessingProvideroperator= (const QgsProcessingProvider &other)=delete
 Providers cannot be copied. More...
 
void refreshAlgorithms ()
 Refreshes the algorithms available from the provider, causing it to re-populate with all associated algorithms. More...
 
virtual QStringList supportedOutputPointCloudLayerExtensions () const
 Returns a list of the point cloud format file extensions supported by this provider. More...
 
virtual QStringList supportedOutputRasterLayerExtensions () const
 Returns a list of the raster format file extensions supported by this provider. More...
 
virtual QStringList supportedOutputTableExtensions () const
 Returns a list of the table (geometry-less vector layers) file extensions supported by this provider. More...
 
virtual QStringList supportedOutputVectorLayerExtensions () const
 Returns a list of the vector format file extensions supported by this provider. More...
 
virtual QStringList supportedOutputVectorTileLayerExtensions () const
 Returns a list of the vector tile format file extensions supported by this provider. More...
 
virtual bool supportsNonFileBasedOutput () const
 Returns true if the provider supports non-file based outputs (such as memory layers or direct database outputs). More...
 
virtual QString svgIconPath () const
 Returns a path to an SVG version of the provider's icon. More...
 
virtual void unload ()
 Unloads the provider. More...
 
virtual QString versionInfo () const
 Returns a version information string for the provider, or an empty string if this is not applicable (e.g. More...
 
virtual QString warningMessage () const
 Returns an optional warning message to show users when running algorithms from this provider. More...
 

Protected Member Functions

void loadAlgorithms () override
 Loads all algorithms belonging to this provider. More...
 
- Protected Member Functions inherited from QgsProcessingProvider
bool addAlgorithm (QgsProcessingAlgorithm *algorithm)
 Adds an algorithm to the provider. More...
 
virtual void loadAlgorithms ()=0
 Loads all algorithms belonging to this provider. More...
 

Additional Inherited Members

- Signals inherited from QgsProcessingProvider
void algorithmsLoaded ()
 Emitted when the provider has loaded (or refreshed) its list of available algorithms. More...
 

Detailed Description

Native c++ processing algorithm provider.

Definition at line 30 of file qgsnativealgorithms.h.

Constructor & Destructor Documentation

◆ QgsNativeAlgorithms()

QgsNativeAlgorithms::QgsNativeAlgorithms ( QObject *  parent = nullptr)

Constructor for QgsNativeAlgorithms.

Member Function Documentation

◆ flags()

Qgis::ProcessingProviderFlags QgsNativeAlgorithms::flags ( ) const
overridevirtual

Returns the flags indicating how and when the provider operates and should be exposed to users.

Default is no flags.

Since
QGIS 3.14

Reimplemented from QgsProcessingProvider.

◆ helpId()

QString QgsNativeAlgorithms::helpId ( ) const
overridevirtual

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.

See also
id()

Reimplemented from QgsProcessingProvider.

◆ icon()

QIcon QgsNativeAlgorithms::icon ( ) const
overridevirtual

Returns an icon for the provider.

See also
svgIconPath()

Reimplemented from QgsProcessingProvider.

◆ id()

QString QgsNativeAlgorithms::id ( ) const
overridevirtual

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.

See also
name()
helpId()

Implements QgsProcessingProvider.

◆ loadAlgorithms()

void QgsNativeAlgorithms::loadAlgorithms ( )
overrideprotectedvirtual

Loads all algorithms belonging to this provider.

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

Implements QgsProcessingProvider.

◆ name()

QString QgsNativeAlgorithms::name ( ) const
overridevirtual

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

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

See also
longName()
id()

Implements QgsProcessingProvider.

◆ supportsNonFileBasedOutput()

bool QgsNativeAlgorithms::supportsNonFileBasedOutput ( ) const
overridevirtual

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.

See also
supportedOutputVectorLayerExtensions()

Reimplemented from QgsProcessingProvider.

◆ svgIconPath()

QString QgsNativeAlgorithms::svgIconPath ( ) const
overridevirtual

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

See also
icon()

Reimplemented from QgsProcessingProvider.


The documentation for this class was generated from the following file: