Skip to content

Class QfProcessingAlgorithmsModel

ClassList > QfProcessingAlgorithmsModel

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 <qfprocessingalgorithmsmodel.h>

Inherits the following classes: QSortFilterProxyModel

Public Types

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

Public Properties

Type Name
property QfProcessingAlgorithmsModel::Filters filters
property QgsVectorLayer * inPlaceLayer

Public Signals

Type Name
signal void filtersChanged
signal void inPlaceLayerChanged

Public Functions

Type Name
QfProcessingAlgorithmsModel (QObject * parent=nullptr)
bool filterAcceptsRow (int sourceRow, const QModelIndex & sourceParent) override const
QfProcessingAlgorithmsModel::Filters filters () const
QgsVectorLayer * inPlaceLayer () const
bool lessThan (const QModelIndex & sourceLeft, const QModelIndex & sourceRight) override const
Q_INVOKABLE void rebuild ()
Rebuilds the algorithms model.
void setFilters (QfProcessingAlgorithmsModel::Filters filters)
void setInPlaceLayer (QgsVectorLayer * layer)

Public Types Documentation

enum Filter

Available filter flags for filtering the model.

enum QfProcessingAlgorithmsModel::Filter {
    InPlaceFilter = 1 << 1,
    FavoriteFilter = 1 << 2
};


Public Properties Documentation

property filters [1/2]

QfProcessingAlgorithmsModel::Filters QfProcessingAlgorithmsModel::filters;

property inPlaceLayer [1/2]

QgsVectorLayer * QfProcessingAlgorithmsModel::inPlaceLayer;

Public Signals Documentation

signal filtersChanged

void QfProcessingAlgorithmsModel::filtersChanged;

Emitted when the active filters have changed


signal inPlaceLayerChanged

void QfProcessingAlgorithmsModel::inPlaceLayerChanged;

Emitted when the in place vector layer has changed


Public Functions Documentation

function QfProcessingAlgorithmsModel

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

function filterAcceptsRow

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

function filters [2/2]

inline QfProcessingAlgorithmsModel::Filters QfProcessingAlgorithmsModel::filters () const

Returns any filters that affect how toolbox content is filtered.

See also: setFilters()


function inPlaceLayer [2/2]

inline QgsVectorLayer * QfProcessingAlgorithmsModel::inPlaceLayer () const

Returns the vector layer for in-place algorithm filter


function lessThan

bool QfProcessingAlgorithmsModel::lessThan (
    const QModelIndex & sourceLeft,
    const QModelIndex & sourceRight
) override const

function rebuild

Rebuilds the algorithms model.

Q_INVOKABLE void QfProcessingAlgorithmsModel::rebuild () 


function setFilters

void QfProcessingAlgorithmsModel::setFilters (
    QfProcessingAlgorithmsModel::Filters filters
) 

Set filters that affect how toolbox content is filtered.

See also: filters()


function setInPlaceLayer

void QfProcessingAlgorithmsModel::setInPlaceLayer (
    QgsVectorLayer * layer
) 

Sets the vector layer for in-place algorithm filter



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