Class: QgsProcessingParameterFieldMapping

A parameter for “field mapping” configurations, which consist of a definition of desired output fields, types, and expressions used to populate them.

Designed for use with the “Refactor fields” algorithm.

Added in version 3.14.

Class Hierarchy

Inheritance diagram of qgis.core.QgsProcessingParameterFieldMapping

Base classes

QgsProcessingParameterDefinition

Base class for the definition of processing parameters.

Methods

parentLayerParameterName

Returns the name of the parent layer parameter, or an empty string if this is not set.

setParentLayerParameterName

Sets the name of the parent layer parameter.

Static Methods

typeName

Returns the type name for the parameter class.

class qgis.core.QgsProcessingParameterFieldMapping[source]

Bases: QgsProcessingParameterDefinition

__init__(name: str | None, description: str | None = '', parentLayerParameterName: str | None = '', optional: bool = False)

Constructor for QgsProcessingParameterFieldMapping.

Parameters:
  • name (Optional[str])

  • description (Optional[str] = '')

  • parentLayerParameterName (Optional[str] = '')

  • optional (bool = False)

__init__(a0: QgsProcessingParameterFieldMapping)
Parameters:

a0 (QgsProcessingParameterFieldMapping)

parentLayerParameterName(self) str[source]

Returns the name of the parent layer parameter, or an empty string if this is not set.

Return type:

str

setParentLayerParameterName(self, name: str | None)[source]

Sets the name of the parent layer parameter. Use an empty string if this is not required.

Parameters:

name (Optional[str])

static typeName() str[source]

Returns the type name for the parameter class.

Return type:

str