|
QGIS API Documentation 4.3.0-Master (90cb4ecf9ef)
|
A Processing provider based on models embedded in a QGIS project. More...
#include <qgsprocessingprojectmodelprovider.h>

Public Slots | |
| void | readProject (const QDomDocument &document) |
| Reads project model definitions from a project DOM document document. | |
| void | writeProject (QDomDocument &document) |
| Writes project model definitions into a project DOM document document. | |
Public Member Functions | |
| QgsProcessingProjectModelProvider (QgsProject *project, QObject *parent=nullptr) | |
| Constructor for QgsProcessingProjectModelProvider, storing models in the specified project. | |
| void | addModel (const QgsProcessingModelAlgorithm &model) |
| Adds a model to the provider. | |
| void | clear () |
| Clears all models from the provider. | |
| QIcon | icon () const override |
| Returns an icon for the provider. | |
| QString | id () const override |
| Returns the unique provider id, used for identifying the provider. | |
| bool | load () override |
| Loads the provider. | |
| QString | longName () const override |
| Returns the longer version of the provider name, which can include extra details such as version numbers. | |
| QString | name () const override |
| Returns the provider name, which is used to describe the provider within the GUI. | |
| void | removeModel (const QgsProcessingModelAlgorithm *model) |
| Removes a model from the provider. | |
| bool | supportsNonFileBasedOutput () const override |
Returns true if the provider supports non-file based outputs (such as memory layers or direct database outputs). | |
| QString | svgIconPath () const override |
| Returns a path to an SVG version of the provider's icon. | |
| Public Member Functions inherited from QgsProcessingProvider | |
| QgsProcessingProvider (const QgsProcessingProvider &other)=delete | |
| QgsProcessingProvider (QObject *parent=nullptr) | |
| Constructor for QgsProcessingProvider. | |
| ~QgsProcessingProvider () override | |
| const QgsProcessingAlgorithm * | algorithm (const QString &name) const |
Returns the matching algorithm by name, or nullptr if no matching algorithm is contained by this provider. | |
| QList< const QgsProcessingAlgorithm * > | algorithms () const |
| Returns a list of algorithms supplied by this provider. | |
| virtual bool | canBeActivated () const |
Returns true if the provider can be activated, or false if it cannot be activated (e.g. | |
| virtual QString | defaultPointCloudFileExtension () const |
| Returns the default file extension to use for point cloud outputs created by the provider. | |
| QString | defaultRasterFileExtension () const |
| Returns the default file extension to use for raster outputs created by the provider. | |
| virtual QString | defaultRasterFileFormat () const |
| Returns the default file format to use for raster outputs created by the provider. | |
| virtual QString | defaultVectorFileExtension (bool hasGeometry=true) const |
| Returns the default file extension to use for vector outputs created by the provider. | |
| virtual QString | defaultVectorTileFileExtension () const |
| Returns the default file extension to use for vector tile outputs created by the provider. | |
| virtual Qgis::ProcessingProviderFlags | flags () const |
| Returns the flags indicating how and when the provider operates and should be exposed to users. | |
| virtual QString | helpId () const |
| Returns the provider help id string, used for creating QgsHelp urls for algorithms belong to this provider. | |
| virtual bool | isActive () const |
Returns true if the provider is active and able to run algorithms. | |
| 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. | |
| QgsProcessingProvider & | operator= (const QgsProcessingProvider &other)=delete |
| void | refreshAlgorithms () |
| Refreshes the algorithms available from the provider, causing it to re-populate with all associated algorithms. | |
| virtual QStringList | supportedOutputPointCloudLayerExtensions () const |
| Returns a list of the point cloud format file extensions supported by this provider. | |
| QStringList | supportedOutputRasterLayerExtensions () const |
| Returns a list of the raster format file extensions supported by this provider. | |
| virtual QList< QPair< QString, QString > > | supportedOutputRasterLayerFormatAndExtensions () const |
| Returns a list of (format, file extension) supported by this provider. | |
| virtual QStringList | supportedOutputTableExtensions () const |
| Returns a list of the table (geometry-less vector layers) file extensions supported by this provider. | |
| virtual QStringList | supportedOutputVectorLayerExtensions () const |
| Returns a list of the vector format file extensions supported by this provider. | |
| virtual QStringList | supportedOutputVectorTileLayerExtensions () const |
| Returns a list of the vector tile format file extensions supported by this provider. | |
| virtual void | unload () |
| Unloads the provider. | |
| virtual QString | versionInfo () const |
| Returns a version information string for the provider, or an empty string if this is not applicable (e.g. | |
| virtual QString | warningMessage () const |
| Returns an optional warning message to show users when running algorithms from this provider. | |
Protected Member Functions | |
| void | loadAlgorithms () override |
| Loads all algorithms belonging to this provider. | |
| Protected Member Functions inherited from QgsProcessingProvider | |
| bool | addAlgorithm (QgsProcessingAlgorithm *algorithm) |
| Adds an algorithm to the provider. | |
Additional Inherited Members | |
| Signals inherited from QgsProcessingProvider | |
| void | algorithmsLoaded () |
| Emitted when the provider has loaded (or refreshed) its list of available algorithms. | |
| Static Public Member Functions inherited from QgsProcessingProvider | |
| static QList< QPair< QString, QString > > | supportedOutputRasterLayerFormatAndExtensionsDefault () |
| Returns a list of (format, file extension) supported by GDAL. | |
A Processing provider based on models embedded in a QGIS project.
Definition at line 34 of file qgsprocessingprojectmodelprovider.h.
| QgsProcessingProjectModelProvider::QgsProcessingProjectModelProvider | ( | QgsProject * | project, |
| QObject * | parent = nullptr ) |
Constructor for QgsProcessingProjectModelProvider, storing models in the specified project.
Definition at line 34 of file qgsprocessingprojectmodelprovider.cpp.
| void QgsProcessingProjectModelProvider::addModel | ( | const QgsProcessingModelAlgorithm & | model | ) |
Adds a model to the provider.
Definition at line 93 of file qgsprocessingprojectmodelprovider.cpp.
| void QgsProcessingProjectModelProvider::clear | ( | ) |
Clears all models from the provider.
Definition at line 87 of file qgsprocessingprojectmodelprovider.cpp.
|
overridevirtual |
Returns an icon for the provider.
Reimplemented from QgsProcessingProvider.
Definition at line 65 of file qgsprocessingprojectmodelprovider.cpp.
|
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.
Implements QgsProcessingProvider.
Definition at line 60 of file qgsprocessingprojectmodelprovider.cpp.
|
overridevirtual |
Loads the provider.
This will be called when the plugin is being loaded, and any general setup actions should occur in an overridden version of this method. Subclasses should not individually load any algorithms in their load() implementations, as that must occur within the loadAlgorithms() method. Instead, subclasses should call refreshAlgorithms() from any overloaded load() method to trigger an initial load of the provider's algorithms.
true if provider could be successfully loaded Reimplemented from QgsProcessingProvider.
Definition at line 80 of file qgsprocessingprojectmodelprovider.cpp.
|
overrideprotectedvirtual |
Loads all algorithms belonging to this provider.
Subclasses should implement this, calling addAlgorithm() to register all their associated algorithms.
Implements QgsProcessingProvider.
Definition at line 159 of file qgsprocessingprojectmodelprovider.cpp.
|
overridevirtual |
Returns the longer version of the provider name, which can include extra details such as version numbers.
E.g. "Lastools LIDAR tools (version 2.2.1)". This string should be localised.
The default implementation returns the same string as name().
Reimplemented from QgsProcessingProvider.
Definition at line 55 of file qgsprocessingprojectmodelprovider.cpp.
|
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.
Implements QgsProcessingProvider.
Definition at line 50 of file qgsprocessingprojectmodelprovider.cpp.
|
slot |
Reads project model definitions from a project DOM document document.
Definition at line 112 of file qgsprocessingprojectmodelprovider.cpp.
| void QgsProcessingProjectModelProvider::removeModel | ( | const QgsProcessingModelAlgorithm * | model | ) |
Removes a model from the provider.
Definition at line 100 of file qgsprocessingprojectmodelprovider.cpp.
|
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.
Reimplemented from QgsProcessingProvider.
Definition at line 75 of file qgsprocessingprojectmodelprovider.cpp.
|
overridevirtual |
Returns a path to an SVG version of the provider's icon.
Reimplemented from QgsProcessingProvider.
Definition at line 70 of file qgsprocessingprojectmodelprovider.cpp.
|
slot |
Writes project model definitions into a project DOM document document.
Definition at line 135 of file qgsprocessingprojectmodelprovider.cpp.