Skip to content

Class QfProcessingAlgorithmParametersModel

ClassList > QfProcessingAlgorithmParametersModel

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 <qfprocessingalgorithmparametersmodel.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 QfProcessingAlgorithmParametersModel::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
QfProcessingAlgorithmParametersModel (QObject * parent=nullptr)
QString algorithmDisplayName () const
QString algorithmId () const
QString algorithmShortHelp () const
bool filterAcceptsRow (int sourceRow, const QModelIndex & sourceParent) override const
QfProcessingAlgorithmParametersModel::Filters filters () const
bool hasAdvancedParameters () const
bool hasParameters () const
QgsVectorLayer * inPlaceLayer () const
bool isValid () const
QVariantMap parameters ()
void setAlgorithmId (const QString & id)
void setFilters (QfProcessingAlgorithmParametersModel::Filters filters)
void setInPlaceLayer (QgsVectorLayer * layer)
void setParameters (const QVariantMap & parameters)

Public Types Documentation

enum Filter

Available filter flags for filtering the model.

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


Public Properties Documentation

property algorithmDisplayName [1/2]

QString QfProcessingAlgorithmParametersModel::algorithmDisplayName;

property algorithmId [1/2]

QString QfProcessingAlgorithmParametersModel::algorithmId;

property algorithmShortHelp [1/2]

QString QfProcessingAlgorithmParametersModel::algorithmShortHelp;

property filters [1/2]

QfProcessingAlgorithmParametersModel::Filters QfProcessingAlgorithmParametersModel::filters;

property hasAdvancedParameters [1/2]

bool QfProcessingAlgorithmParametersModel::hasAdvancedParameters;

property hasParameters [1/2]

bool QfProcessingAlgorithmParametersModel::hasParameters;

property inPlaceLayer [1/2]

QgsVectorLayer * QfProcessingAlgorithmParametersModel::inPlaceLayer;

property isValid [1/2]

bool QfProcessingAlgorithmParametersModel::isValid;

property parameters [1/2]

QVariantMap QfProcessingAlgorithmParametersModel::parameters;

Public Signals Documentation

signal algorithmIdChanged

void QfProcessingAlgorithmParametersModel::algorithmIdChanged;

Emitted when the algorithm ID has changed.


signal filtersChanged

void QfProcessingAlgorithmParametersModel::filtersChanged;

Emitted when the active filters have changed.


signal inPlaceLayerChanged

void QfProcessingAlgorithmParametersModel::inPlaceLayerChanged;

Emitted when the in place vector layer has changed


signal parametersChanged

void QfProcessingAlgorithmParametersModel::parametersChanged;

Emitted when the parameters have changed.


Public Functions Documentation

function QfProcessingAlgorithmParametersModel

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

function algorithmDisplayName [2/2]

QString QfProcessingAlgorithmParametersModel::algorithmDisplayName () const

Returns the display name of the algorithm.


function algorithmId [2/2]

QString QfProcessingAlgorithmParametersModel::algorithmId () const

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


function algorithmShortHelp [2/2]

QString QfProcessingAlgorithmParametersModel::algorithmShortHelp () const

Returns a short description of the algorithm.


function filterAcceptsRow

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

function filters [2/2]

inline QfProcessingAlgorithmParametersModel::Filters QfProcessingAlgorithmParametersModel::filters () const

Returns any filters that affect how toolbox content is filtered.

See also: setFilters()


function hasAdvancedParameters [2/2]

bool QfProcessingAlgorithmParametersModel::hasAdvancedParameters () const

Returns whether the current model has advanced parameters.


function hasParameters [2/2]

bool QfProcessingAlgorithmParametersModel::hasParameters () const

Returns whether the current model has parameters.


function inPlaceLayer [2/2]

QgsVectorLayer * QfProcessingAlgorithmParametersModel::inPlaceLayer () const

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


function isValid [2/2]

bool QfProcessingAlgorithmParametersModel::isValid () const

Returns whether the current model refers to a valid algorithm.


function parameters [2/2]

QVariantMap QfProcessingAlgorithmParametersModel::parameters () 

Returns a variant map of parameter names and values.


function setAlgorithmId

void QfProcessingAlgorithmParametersModel::setAlgorithmId (
    const QString & id
) 

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


function setFilters

void QfProcessingAlgorithmParametersModel::setFilters (
    QfProcessingAlgorithmParametersModel::Filters filters
) 

Set filters that affect how toolbox content is filtered.

See also: filters()


function setInPlaceLayer

void QfProcessingAlgorithmParametersModel::setInPlaceLayer (
    QgsVectorLayer * layer
) 

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


function setParameters

void QfProcessingAlgorithmParametersModel::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/qfprocessingalgorithmparametersmodel.h