Skip to content

Class ProcessingAlgorithmParametersModel

ClassList > ProcessingAlgorithmParametersModel

A sort/filter proxy model for providers and algorithms available within QField which automatically sorts the toolbox in a logical fashion and supports filtering the results.

  • #include <processingalgorithmparametersmodel.h>

Inherits the following classes: QSortFilterProxyModel

Public Types

Type Name
enum Filter
Available filter flags for filtering the model.

Public Properties

Type Name
property QString algorithmDisplayName
property QString algorithmId
property QString algorithmShortHelp
property ProcessingAlgorithmParametersModel::Filters filters
property bool hasAdvancedParameters
property bool hasParameters
property QgsVectorLayer * inPlaceLayer
property bool isValid
property QVariantMap parameters

Public Signals

Type Name
signal void algorithmIdChanged (const QString & id)
signal void filtersChanged
signal void inPlaceLayerChanged
signal void parametersChanged

Public Functions

Type Name
ProcessingAlgorithmParametersModel (QObject * parent=nullptr)
QString algorithmDisplayName () const
QString algorithmId () const
QString algorithmShortHelp () const
bool filterAcceptsRow (int sourceRow, const QModelIndex & sourceParent) override const
ProcessingAlgorithmParametersModel::Filters filters () const
bool hasAdvancedParameters () const
bool hasParameters () const
QgsVectorLayer * inPlaceLayer () const
bool isValid () const
QVariantMap parameters ()
void setAlgorithmId (const QString & id)
void setFilters (ProcessingAlgorithmParametersModel::Filters filters)
void setInPlaceLayer (QgsVectorLayer * layer)
void setParameters (const QVariantMap & parameters)

Public Types Documentation

enum Filter

Available filter flags for filtering the model.

enum ProcessingAlgorithmParametersModel::Filter {
    GeneralParameterFilter = 1 << 1,
    AdvancedParameterFilter = 1 << 2
};

Public Properties Documentation

property algorithmDisplayName [1/2]

QString ProcessingAlgorithmParametersModel::algorithmDisplayName;

property algorithmId [1/2]

QString ProcessingAlgorithmParametersModel::algorithmId;

property algorithmShortHelp [1/2]

QString ProcessingAlgorithmParametersModel::algorithmShortHelp;

property filters [1/2]

ProcessingAlgorithmParametersModel::Filters ProcessingAlgorithmParametersModel::filters;

property hasAdvancedParameters [1/2]

bool ProcessingAlgorithmParametersModel::hasAdvancedParameters;

property hasParameters [1/2]

bool ProcessingAlgorithmParametersModel::hasParameters;

property inPlaceLayer [1/2]

QgsVectorLayer * ProcessingAlgorithmParametersModel::inPlaceLayer;

property isValid [1/2]

bool ProcessingAlgorithmParametersModel::isValid;

property parameters [1/2]

QVariantMap ProcessingAlgorithmParametersModel::parameters;

Public Signals Documentation

signal algorithmIdChanged

void ProcessingAlgorithmParametersModel::algorithmIdChanged;

Emitted when the algorithm ID has changed.


signal filtersChanged

void ProcessingAlgorithmParametersModel::filtersChanged;

Emitted when the active filters have changed.


signal inPlaceLayerChanged

void ProcessingAlgorithmParametersModel::inPlaceLayerChanged;

Emitted when the in place vector layer has changed


signal parametersChanged

void ProcessingAlgorithmParametersModel::parametersChanged;

Emitted when the parameters have changed.


Public Functions Documentation

function ProcessingAlgorithmParametersModel

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

function algorithmDisplayName [2/2]

QString ProcessingAlgorithmParametersModel::algorithmDisplayName () const

Returns the display name of the algorithm.


function algorithmId [2/2]

QString ProcessingAlgorithmParametersModel::algorithmId () const

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


function algorithmShortHelp [2/2]

QString ProcessingAlgorithmParametersModel::algorithmShortHelp () const

Returns a short description of the algorithm.


function filterAcceptsRow

bool ProcessingAlgorithmParametersModel::filterAcceptsRow (
    int sourceRow,
    const QModelIndex & sourceParent
) override const

function filters [2/2]

inline ProcessingAlgorithmParametersModel::Filters ProcessingAlgorithmParametersModel::filters () const

Returns any filters that affect how toolbox content is filtered.

See also: setFilters()


function hasAdvancedParameters [2/2]

bool ProcessingAlgorithmParametersModel::hasAdvancedParameters () const

Returns whether the current model has advanced parameters.


function hasParameters [2/2]

bool ProcessingAlgorithmParametersModel::hasParameters () const

Returns whether the current model has parameters.


function inPlaceLayer [2/2]

QgsVectorLayer * ProcessingAlgorithmParametersModel::inPlaceLayer () const

Returns the vector layer for in-place algorithms for parameters to take details from.


function isValid [2/2]

bool ProcessingAlgorithmParametersModel::isValid () const

Returns whether the current model refers to a valid algorithm.


function parameters [2/2]

QVariantMap ProcessingAlgorithmParametersModel::parameters () 

Returns a variant map of parameter names and values.


function setAlgorithmId

void ProcessingAlgorithmParametersModel::setAlgorithmId (
    const QString & id
) 

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


function setFilters

void ProcessingAlgorithmParametersModel::setFilters (
    ProcessingAlgorithmParametersModel::Filters filters
) 

Set filters that affect how toolbox content is filtered.

See also: filters()


function setInPlaceLayer

void ProcessingAlgorithmParametersModel::setInPlaceLayer (
    QgsVectorLayer * layer
) 

Sets the vector layer for in-place algorithm filter for parameters to take details from.


function setParameters

void ProcessingAlgorithmParametersModel::setParameters (
    const QVariantMap & parameters
) 

Sets the values of the parameters model from variant map of parameter names and values.



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