2017-04-02 17:04:47 +10:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/processing/qgsprocessingregistry.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-03 08:41:43 -05:00
|
|
|
|
2017-01-09 09:59:35 +10:00
|
|
|
class QgsProcessingRegistry : QObject
|
|
|
|
{
|
2017-04-02 17:04:47 +10:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Registry for various processing components, including providers, algorithms
|
|
|
|
and various parameters and outputs.
|
|
|
|
|
|
|
|
QgsProcessingRegistry is not usually directly created, but rather accessed through
|
2017-12-19 11:43:52 -04:00
|
|
|
:py:func:`QgsApplication.processingRegistry()`
|
2017-04-02 17:04:47 +10:00
|
|
|
|
2017-04-02 20:52:50 +10:00
|
|
|
.. versionadded:: 3.0
|
2017-04-02 17:04:47 +10:00
|
|
|
%End
|
|
|
|
|
2017-01-09 09:59:35 +10:00
|
|
|
%TypeHeaderCode
|
2017-04-02 17:04:47 +10:00
|
|
|
#include "qgsprocessingregistry.h"
|
2017-01-09 09:59:35 +10:00
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
2017-04-02 17:04:47 +10:00
|
|
|
QgsProcessingRegistry( QObject *parent /TransferThis/ = 0 );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Constructor for QgsProcessingRegistry.
|
2017-04-02 17:04:47 +10:00
|
|
|
%End
|
2017-01-09 09:59:35 +10:00
|
|
|
|
|
|
|
~QgsProcessingRegistry();
|
|
|
|
|
2017-04-26 11:31:56 +02:00
|
|
|
|
2017-04-02 17:04:47 +10:00
|
|
|
QList<QgsProcessingProvider *> providers() const;
|
|
|
|
%Docstring
|
2018-05-26 18:44:30 +10:00
|
|
|
Gets list of available providers.
|
2017-04-02 17:04:47 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
bool addProvider( QgsProcessingProvider *provider /Transfer/ );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Add a processing provider to the registry. Ownership of the provider is transferred to the registry,
|
|
|
|
and the provider's parent will be set to the registry.
|
2019-02-26 19:54:09 +10:00
|
|
|
Returns ``False`` if the provider could not be added (eg if a provider with a duplicate ID already exists
|
2017-12-15 10:36:55 -04:00
|
|
|
in the registry).
|
2017-12-19 11:43:52 -04:00
|
|
|
Adding a provider to the registry automatically triggers the providers :py:func:`QgsProcessingProvider.load()`
|
2017-12-15 10:36:55 -04:00
|
|
|
method to populate the provider with algorithms.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`removeProvider`
|
2017-04-02 17:04:47 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
bool removeProvider( QgsProcessingProvider *provider );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Removes a provider implementation from the registry (the provider object is deleted).
|
2019-02-26 19:54:09 +10:00
|
|
|
Returns ``False`` if the provider could not be removed (eg provider does not exist in the registry).
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`addProvider`
|
2017-04-02 17:04:47 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
bool removeProvider( const QString &providerId );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Removes a provider implementation from the registry (the provider object is deleted).
|
2019-02-26 19:54:09 +10:00
|
|
|
Returns ``False`` if the provider could not be removed (eg provider does not exist in the registry).
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`addProvider`
|
2017-04-02 17:04:47 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QgsProcessingProvider *providerById( const QString &id );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns a matching provider by provider ID.
|
2017-04-02 17:04:47 +10:00
|
|
|
%End
|
2017-01-09 09:59:35 +10:00
|
|
|
|
2017-04-07 13:25:07 +10:00
|
|
|
QList< const QgsProcessingAlgorithm *> algorithms() const;
|
2017-04-04 11:04:36 +10:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns a list of all available algorithms from registered providers.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`algorithmById`
|
2017-04-04 11:04:36 +10:00
|
|
|
%End
|
|
|
|
|
2017-04-07 13:25:07 +10:00
|
|
|
const QgsProcessingAlgorithm *algorithmById( const QString &id ) const;
|
2017-04-04 11:04:36 +10:00
|
|
|
%Docstring
|
2019-02-26 21:19:42 +10:00
|
|
|
Finds an algorithm by its ID. If no matching algorithm is found, ``None``
|
2017-12-15 10:36:55 -04:00
|
|
|
is returned.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`algorithms`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`createAlgorithmById`
|
2017-07-09 17:14:45 +10:00
|
|
|
%End
|
|
|
|
|
2017-07-26 06:59:55 +10:00
|
|
|
|
|
|
|
QgsProcessingAlgorithm *createAlgorithmById( const QString &id, const QVariantMap &configuration = QVariantMap() ) const /TransferBack/;
|
2017-07-09 17:14:45 +10:00
|
|
|
%Docstring
|
2019-02-26 21:19:42 +10:00
|
|
|
Creates a new instance of an algorithm by its ID. If no matching algorithm is found, ``None``
|
2017-12-15 10:36:55 -04:00
|
|
|
is returned. Callers take responsibility for deleting the returned object.
|
2017-07-10 17:02:23 +10:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
The ``configuration`` argument allows passing of a map of configuration settings
|
|
|
|
to the algorithm, allowing it to dynamically adjust its initialized parameters
|
|
|
|
and outputs according to this configuration. This is generally used only for
|
|
|
|
algorithms in a model, allowing them to adjust their behavior at run time
|
|
|
|
according to some user configuration.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`algorithms`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`algorithmById`
|
2017-04-04 11:04:36 +10:00
|
|
|
%End
|
|
|
|
|
2018-03-05 23:36:38 -05:00
|
|
|
bool addParameterType( QgsProcessingParameterType *type /Transfer/ );
|
2018-03-03 08:41:43 -05:00
|
|
|
%Docstring
|
|
|
|
Register a new parameter type for processing.
|
2018-03-05 22:26:36 -05:00
|
|
|
Ownership is transferred to the registry.
|
|
|
|
Will emit parameterTypeAdded.
|
2018-03-03 08:41:43 -05:00
|
|
|
|
|
|
|
.. seealso:: :py:func:`removeParameterType`
|
|
|
|
|
|
|
|
.. versionadded:: 3.2
|
|
|
|
%End
|
|
|
|
|
|
|
|
void removeParameterType( QgsProcessingParameterType *type );
|
|
|
|
%Docstring
|
|
|
|
Unregister a custom parameter type from processing.
|
2018-03-05 22:26:36 -05:00
|
|
|
The type will be deleted.
|
|
|
|
Will emit parameterTypeRemoved.
|
2018-03-03 08:41:43 -05:00
|
|
|
|
|
|
|
.. seealso:: :py:func:`addParameterType`
|
|
|
|
|
|
|
|
.. versionadded:: 3.2
|
|
|
|
%End
|
|
|
|
|
|
|
|
QgsProcessingParameterType *parameterType( const QString &id ) const;
|
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Returns the parameter type registered for ``id``.
|
2018-03-03 08:41:43 -05:00
|
|
|
|
|
|
|
.. versionadded:: 3.2
|
|
|
|
%End
|
|
|
|
|
|
|
|
QList<QgsProcessingParameterType *> parameterTypes() const;
|
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Returns a list with all known parameter types.
|
2018-03-03 08:41:43 -05:00
|
|
|
|
|
|
|
.. versionadded:: 3.2
|
|
|
|
%End
|
|
|
|
|
2017-01-09 09:59:35 +10:00
|
|
|
signals:
|
|
|
|
|
2017-04-02 17:04:47 +10:00
|
|
|
void providerAdded( const QString &id );
|
|
|
|
%Docstring
|
|
|
|
Emitted when a provider has been added to the registry.
|
|
|
|
%End
|
2017-01-09 09:59:35 +10:00
|
|
|
|
2017-04-02 17:04:47 +10:00
|
|
|
void providerRemoved( const QString &id );
|
|
|
|
%Docstring
|
|
|
|
Emitted when a provider is removed from the registry
|
2018-03-03 08:41:43 -05:00
|
|
|
%End
|
|
|
|
|
|
|
|
void parameterTypeAdded( QgsProcessingParameterType *type );
|
|
|
|
%Docstring
|
|
|
|
Emitted when a new parameter type has been added to the registry.
|
|
|
|
|
|
|
|
.. versionadded:: 3.2
|
|
|
|
%End
|
|
|
|
|
|
|
|
void parameterTypeRemoved( QgsProcessingParameterType *type );
|
|
|
|
%Docstring
|
|
|
|
Emitted when a parameter type has been removed from the
|
|
|
|
registry and is about to be deleted.
|
|
|
|
|
|
|
|
.. versionadded:: 3.2
|
2017-04-02 17:04:47 +10:00
|
|
|
%End
|
2017-01-09 09:59:35 +10:00
|
|
|
|
|
|
|
private:
|
2017-04-02 17:04:47 +10:00
|
|
|
QgsProcessingRegistry( const QgsProcessingRegistry &other );
|
2017-01-09 09:59:35 +10:00
|
|
|
};
|
2017-04-02 17:04:47 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/processing/qgsprocessingregistry.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|