Class: QgsProcessingModelParameter

class qgis.core.QgsProcessingModelParameter

Bases: QgsProcessingModelComponent

Represents an input parameter used by the model.

New in version 3.0.

QgsProcessingModelParameter(parameterName: str = ‘’) Constructor for QgsProcessingModelParameter. The parameter name should match one of the parameters from the parent model.

QgsProcessingModelParameter(QgsProcessingModelParameter)

Methods

clone

rtype

QgsProcessingModelParameter

comment

rtype

QgsProcessingModelComment

loadVariant

Loads this parameter from a QVariantMap.

parameterName

Returns the associated parameter name.

setComment

param comment

setParameterName

Sets the associated parameter name.

toVariant

Saves this parameter to a QVariant.

clone(self) QgsProcessingModelParameter
Return type

QgsProcessingModelParameter

comment(self) QgsProcessingModelComment
Return type

QgsProcessingModelComment

loadVariant(self, map: Dict[str, Any]) bool

Loads this parameter from a QVariantMap.

See also

toVariant()

Parameters

map (Dict[str) –

Return type

bool

parameterName(self) str

Returns the associated parameter name. The parameter name should match one of the parameters from the parent model.

See also

parameterName()

Return type

str

setComment(self, comment: QgsProcessingModelComment)
Parameters

comment (QgsProcessingModelComment) –

setParameterName(self, name: str)

Sets the associated parameter name. The parameter name should match one of the parameters from the parent model.

See also

parameterName()

Parameters

name (str) –

toVariant(self) Any

Saves this parameter to a QVariant.

See also

loadVariant()

Return type

Any