Class ProcessingAlgorithm
ClassList > ProcessingAlgorithm
A processing algorithm item capable of runnning a given algorithm.
#include <processingalgorithm.h>
Inherits the following classes: QObject
Public Properties
| Type | Name |
|---|---|
| property QString | displayName |
| property QString | id |
| property QList< QgsFeature > | inPlaceFeatures |
| property QgsVectorLayer * | inPlaceLayer |
| property bool | isValid |
| property QVariantMap | parameters |
| property bool | preview |
| property QList< QgsGeometry > | previewGeometries |
| property QString | shortHelp |
Public Signals
| Type | Name |
|---|---|
| signal void | idChanged (const QString & id) |
| signal void | inPlaceFeaturesChanged |
| signal void | inPlaceLayerChanged |
| signal void | parametersChanged |
| signal void | previewChanged |
| signal void | previewGeometriesChanged |
Public Functions
| Type | Name |
|---|---|
| ProcessingAlgorithm (QObject * parent=nullptr) |
|
| QString | displayName () const |
| QString | id () const |
| QList< QgsFeature > | inPlaceFeatures () const |
| QgsVectorLayer * | inPlaceLayer () const |
| bool | isValid () const |
| QVariantMap | parameters () const |
| bool | preview () const |
| QList< QgsGeometry > | previewGeometries () const |
| Q_INVOKABLE bool | run (bool previewMode=false) |
| void | setId (const QString & id) |
| void | setInPlaceFeatures (const QList< QgsFeature > & features) |
| void | setInPlaceLayer (QgsVectorLayer * layer) |
| void | setParameters (const QVariantMap & parameters) |
| void | setPreview (bool preview) |
| QString | shortHelp () const |
Public Properties Documentation
property displayName [1/2]
QString ProcessingAlgorithm::displayName;
property id [1/2]
QString ProcessingAlgorithm::id;
property inPlaceFeatures [1/2]
QList<QgsFeature> ProcessingAlgorithm::inPlaceFeatures;
property inPlaceLayer [1/2]
QgsVectorLayer * ProcessingAlgorithm::inPlaceLayer;
property isValid [1/2]
bool ProcessingAlgorithm::isValid;
property parameters [1/2]
QVariantMap ProcessingAlgorithm::parameters;
property preview [1/2]
bool ProcessingAlgorithm::preview;
property previewGeometries [1/2]
QList<QgsGeometry> ProcessingAlgorithm::previewGeometries;
property shortHelp [1/2]
QString ProcessingAlgorithm::shortHelp;
Public Signals Documentation
signal idChanged
void ProcessingAlgorithm::idChanged;
Emitted when the algorithm ID has changed
signal inPlaceFeaturesChanged
void ProcessingAlgorithm::inPlaceFeaturesChanged;
Emitted when the in place feature IDs list has changed
signal inPlaceLayerChanged
void ProcessingAlgorithm::inPlaceLayerChanged;
Emitted when the in place vector layer has changed
signal parametersChanged
void ProcessingAlgorithm::parametersChanged;
Emitted when the parameter model has changed
signal previewChanged
void ProcessingAlgorithm::previewChanged;
Emitted when the preview setting has changed
signal previewGeometriesChanged
void ProcessingAlgorithm::previewGeometriesChanged;
Emitted when the list of preview geometries has changed
Public Functions Documentation
function ProcessingAlgorithm
explicit ProcessingAlgorithm::ProcessingAlgorithm (
QObject * parent=nullptr
)
function displayName [2/2]
QString ProcessingAlgorithm::displayName () const
Returns the display name of the algorithm.
function id [2/2]
inline QString ProcessingAlgorithm::id () const
Returns the current algorithm ID from which parameters are taken from.
function inPlaceFeatures [2/2]
inline QList< QgsFeature > ProcessingAlgorithm::inPlaceFeatures () const
Returns the vector layer for in-place algorithm filter.
function inPlaceLayer [2/2]
inline QgsVectorLayer * ProcessingAlgorithm::inPlaceLayer () const
Returns the vector layer for in-place algorithm filter.
function isValid [2/2]
inline bool ProcessingAlgorithm::isValid () const
Returns whether the current model refers to a valid algorithm.
function parameters [2/2]
inline QVariantMap ProcessingAlgorithm::parameters () const
Returns the algorithm parameters as a map of parameter names as keys and values.
function preview [2/2]
inline bool ProcessingAlgorithm::preview () const
Returns whether the algorithm will provide preview outputs such as modified geometries. from provided parameters.
function previewGeometries [2/2]
inline QList< QgsGeometry > ProcessingAlgorithm::previewGeometries () const
Returns a list of geometries previewing the algorithm result using current parameters.
function run
Q_INVOKABLE bool ProcessingAlgorithm::run (
bool previewMode=false
)
Executes the algorithm.
function setId
void ProcessingAlgorithm::setId (
const QString & id
)
Sets the current algorithm ID from which parameters are taken from.
function setInPlaceFeatures
void ProcessingAlgorithm::setInPlaceFeatures (
const QList< QgsFeature > & features
)
Sets the vector layer for in-place algorithm filter.
function setInPlaceLayer
void ProcessingAlgorithm::setInPlaceLayer (
QgsVectorLayer * layer
)
Sets the vector layer for in-place algorithm filter.
function setParameters
void ProcessingAlgorithm::setParameters (
const QVariantMap & parameters
)
Sets the algorithm parameters using a map with parameter names as keys and values.
function setPreview
void ProcessingAlgorithm::setPreview (
bool preview
)
Sets whether the algorithm will provide preview outputs such as modified geometries. from provided parameters.
function shortHelp [2/2]
QString ProcessingAlgorithm::shortHelp () const
Returns a short description of the algorithm.
The documentation for this class was generated from the following file src/core/processing/processingalgorithm.h