Skip to content

Class QfProcessingAlgorithmParametersModelBase

ClassList > QfProcessingAlgorithmParametersModelBase

A model for configuring processing algorithm parameters.

  • #include <qfprocessingalgorithmparametersmodel.h>

Inherits the following classes: QAbstractListModel

Public Types

Type Name
enum Role
Roles of the model.

Public Signals

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

Public Functions

Type Name
QfProcessingAlgorithmParametersModelBase (QObject * parent=nullptr)
QString algorithmDisplayName () const
QString algorithmId () const
QString algorithmShortHelp () const
QVariant data (const QModelIndex & index, int role) override const
bool hasAdvancedParameters () const
bool hasParameters () const
QgsVectorLayer * inPlaceLayer () const
bool isValid () const
QVariantMap parameters ()
QHash< int, QByteArray > roleNames () override const
int rowCount (const QModelIndex & parent) override const
void setAlgorithmId (const QString & id)
bool setData (const QModelIndex & index, const QVariant & value, int role=Qt::EditRole) override
void setInPlaceLayer (QgsVectorLayer * layer)
void setParameters (const QVariantMap & parameters)

Public Types Documentation

enum Role

Roles of the model.

enum QfProcessingAlgorithmParametersModelBase::Role {
    ParameterTypeRole = Qt::UserRole,
    ParameterDescriptionRole,
    ParameterFlagsRole,
    ParameterDefaultValueRole,
    ParameterValueRole,
    ParameterConfigurationRole
};


Public Signals Documentation

signal algorithmIdChanged

void QfProcessingAlgorithmParametersModelBase::algorithmIdChanged;

Emitted when the algorithm ID has changed.


signal inPlaceLayerChanged

void QfProcessingAlgorithmParametersModelBase::inPlaceLayerChanged;

Emitted when the in place vector layer has changed


signal parametersChanged

void QfProcessingAlgorithmParametersModelBase::parametersChanged;

Emitted when the parameters have changed.


Public Functions Documentation

function QfProcessingAlgorithmParametersModelBase

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

function algorithmDisplayName

QString QfProcessingAlgorithmParametersModelBase::algorithmDisplayName () const

Returns the display name of the algorithm.


function algorithmId

inline QString QfProcessingAlgorithmParametersModelBase::algorithmId () const

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


function algorithmShortHelp

QString QfProcessingAlgorithmParametersModelBase::algorithmShortHelp () const

Returns a short description of the algorithm.


function data

QVariant QfProcessingAlgorithmParametersModelBase::data (
    const QModelIndex & index,
    int role
) override const

function hasAdvancedParameters

inline bool QfProcessingAlgorithmParametersModelBase::hasAdvancedParameters () const

Returns whether the current model has advanced parameters.


function hasParameters

inline bool QfProcessingAlgorithmParametersModelBase::hasParameters () const

Returns whether the current model has parameters.


function inPlaceLayer

inline QgsVectorLayer * QfProcessingAlgorithmParametersModelBase::inPlaceLayer () const

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


function isValid

inline bool QfProcessingAlgorithmParametersModelBase::isValid () const

Returns whether the current model refers to a valid algorithm.


function parameters

QVariantMap QfProcessingAlgorithmParametersModelBase::parameters () 

Returns a variant map of parameter names and values.


function roleNames

QHash< int, QByteArray > QfProcessingAlgorithmParametersModelBase::roleNames () override const

function rowCount

int QfProcessingAlgorithmParametersModelBase::rowCount (
    const QModelIndex & parent
) override const

function setAlgorithmId

void QfProcessingAlgorithmParametersModelBase::setAlgorithmId (
    const QString & id
) 

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


function setData

bool QfProcessingAlgorithmParametersModelBase::setData (
    const QModelIndex & index,
    const QVariant & value,
    int role=Qt::EditRole
) override

function setInPlaceLayer

void QfProcessingAlgorithmParametersModelBase::setInPlaceLayer (
    QgsVectorLayer * layer
) 

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


function setParameters

void QfProcessingAlgorithmParametersModelBase::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