Skip to content

Class QfProcessingAlgorithm

ClassList > QfProcessingAlgorithm

A processing algorithm item capable of runnning a given algorithm.

  • #include <qfprocessingalgorithm.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
QfProcessingAlgorithm (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 QfProcessingAlgorithm::displayName;

property id [1/2]

QString QfProcessingAlgorithm::id;

property inPlaceFeatures [1/2]

QList<QgsFeature> QfProcessingAlgorithm::inPlaceFeatures;

property inPlaceLayer [1/2]

QgsVectorLayer * QfProcessingAlgorithm::inPlaceLayer;

property isValid [1/2]

bool QfProcessingAlgorithm::isValid;

property parameters [1/2]

QVariantMap QfProcessingAlgorithm::parameters;

property preview [1/2]

bool QfProcessingAlgorithm::preview;

property previewGeometries [1/2]

QList<QgsGeometry> QfProcessingAlgorithm::previewGeometries;

property shortHelp [1/2]

QString QfProcessingAlgorithm::shortHelp;

Public Signals Documentation

signal idChanged

void QfProcessingAlgorithm::idChanged;

Emitted when the algorithm ID has changed


signal inPlaceFeaturesChanged

void QfProcessingAlgorithm::inPlaceFeaturesChanged;

Emitted when the in place feature IDs list has changed


signal inPlaceLayerChanged

void QfProcessingAlgorithm::inPlaceLayerChanged;

Emitted when the in place vector layer has changed


signal parametersChanged

void QfProcessingAlgorithm::parametersChanged;

Emitted when the parameter model has changed


signal previewChanged

void QfProcessingAlgorithm::previewChanged;

Emitted when the preview setting has changed


signal previewGeometriesChanged

void QfProcessingAlgorithm::previewGeometriesChanged;

Emitted when the list of preview geometries has changed


Public Functions Documentation

function QfProcessingAlgorithm

explicit QfProcessingAlgorithm::QfProcessingAlgorithm (
    QObject * parent=nullptr
) 

function displayName [2/2]

QString QfProcessingAlgorithm::displayName () const

Returns the display name of the algorithm.


function id [2/2]

inline QString QfProcessingAlgorithm::id () const

Returns the current algorithm ID from which parameters are taken from.


function inPlaceFeatures [2/2]

inline QList< QgsFeature > QfProcessingAlgorithm::inPlaceFeatures () const

Returns the vector layer for in-place algorithm filter.


function inPlaceLayer [2/2]

inline QgsVectorLayer * QfProcessingAlgorithm::inPlaceLayer () const

Returns the vector layer for in-place algorithm filter.


function isValid [2/2]

inline bool QfProcessingAlgorithm::isValid () const

Returns whether the current model refers to a valid algorithm.


function parameters [2/2]

inline QVariantMap QfProcessingAlgorithm::parameters () const

Returns the algorithm parameters as a map of parameter names as keys and values.


function preview [2/2]

inline bool QfProcessingAlgorithm::preview () const

Returns whether the algorithm will provide preview outputs such as modified geometries. from provided parameters.


function previewGeometries [2/2]

inline QList< QgsGeometry > QfProcessingAlgorithm::previewGeometries () const

Returns a list of geometries previewing the algorithm result using current parameters.


function run

Q_INVOKABLE bool QfProcessingAlgorithm::run (
    bool previewMode=false
) 

Executes the algorithm.


function setId

void QfProcessingAlgorithm::setId (
    const QString & id
) 

Sets the current algorithm ID from which parameters are taken from.


function setInPlaceFeatures

void QfProcessingAlgorithm::setInPlaceFeatures (
    const QList< QgsFeature > & features
) 

Sets the vector layer for in-place algorithm filter.


function setInPlaceLayer

void QfProcessingAlgorithm::setInPlaceLayer (
    QgsVectorLayer * layer
) 

Sets the vector layer for in-place algorithm filter.


function setParameters

void QfProcessingAlgorithm::setParameters (
    const QVariantMap & parameters
) 

Sets the algorithm parameters using a map with parameter names as keys and values.


function setPreview

void QfProcessingAlgorithm::setPreview (
    bool preview
) 

Sets whether the algorithm will provide preview outputs such as modified geometries. from provided parameters.


function shortHelp [2/2]

QString QfProcessingAlgorithm::shortHelp () const

Returns a short description of the algorithm.



The documentation for this class was generated from the following file src/core/processing/qfprocessingalgorithm.h