Skip to content

Class ProcessingAlgorithmsModel

ClassList > ProcessingAlgorithmsModel

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

Inherits the following classes: QSortFilterProxyModel

Public Types

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

Public Properties

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

Public Signals

Type Name
signal void filtersChanged
signal void inPlaceLayerChanged

Public Functions

Type Name
ProcessingAlgorithmsModel (QObject * parent=nullptr)
bool filterAcceptsRow (int sourceRow, const QModelIndex & sourceParent) override const
ProcessingAlgorithmsModel::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 (ProcessingAlgorithmsModel::Filters filters)
void setInPlaceLayer (QgsVectorLayer * layer)

Public Types Documentation

enum Filter

Available filter flags for filtering the model.

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

Public Properties Documentation

property filters [1/2]

ProcessingAlgorithmsModel::Filters ProcessingAlgorithmsModel::filters;

property inPlaceLayer [1/2]

QgsVectorLayer * ProcessingAlgorithmsModel::inPlaceLayer;

Public Signals Documentation

signal filtersChanged

void ProcessingAlgorithmsModel::filtersChanged;

Emitted when the active filters have changed


signal inPlaceLayerChanged

void ProcessingAlgorithmsModel::inPlaceLayerChanged;

Emitted when the in place vector layer has changed


Public Functions Documentation

function ProcessingAlgorithmsModel

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

function filterAcceptsRow

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

function filters [2/2]

inline ProcessingAlgorithmsModel::Filters ProcessingAlgorithmsModel::filters () const

Returns any filters that affect how toolbox content is filtered.

See also: setFilters()


function inPlaceLayer [2/2]

inline QgsVectorLayer * ProcessingAlgorithmsModel::inPlaceLayer () const

Returns the vector layer for in-place algorithm filter


function lessThan

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

function rebuild

Rebuilds the algorithms model.

Q_INVOKABLE void ProcessingAlgorithmsModel::rebuild () 

function setFilters

void ProcessingAlgorithmsModel::setFilters (
    ProcessingAlgorithmsModel::Filters filters
) 

Set filters that affect how toolbox content is filtered.

See also: filters()


function setInPlaceLayer

void ProcessingAlgorithmsModel::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/processingalgorithmsmodel.h