Class: QgsProcessingParameterMultipleLayers

A parameter for processing algorithms which accepts multiple map layers.

Class Hierarchy

Inheritance diagram of qgis.core.QgsProcessingParameterMultipleLayers

Base classes

QgsProcessingParameterDefinition

Base class for the definition of processing parameters.

QgsFileFilterGenerator

Abstract interface for classes which generate a file filter string.

Methods

layerType

Returns the layer type for layers acceptable by the parameter.

minimumNumberInputs

Returns the minimum number of layers required for the parameter.

setLayerType

Sets the layer type for layers acceptable by the parameter.

setMinimumNumberInputs

Sets the minimum number of layers required for the parameter.

Static Methods

fromScriptCode

Creates a new parameter using the definition from a script code.

typeName

Returns the type name for the parameter class.

class qgis.core.QgsProcessingParameterMultipleLayers[source]

Bases: QgsProcessingParameterDefinition, QgsFileFilterGenerator

__init__(name: str | None, description: str | None = '', layerType: Qgis.ProcessingSourceType = Qgis.ProcessingSourceType.VectorAnyGeometry, defaultValue: Any = None, optional: bool = False)

Constructor for QgsProcessingParameterMultipleLayers.

Parameters:
  • name (Optional[str])

  • description (Optional[str] = '')

  • layerType (Qgis.ProcessingSourceType = Qgis.ProcessingSourceType.VectorAnyGeometry)

  • defaultValue (Any = None)

  • optional (bool = False)

__init__(a0: QgsProcessingParameterMultipleLayers)
Parameters:

a0 (QgsProcessingParameterMultipleLayers)

static fromScriptCode(name: str | None, description: str | None, isOptional: bool, definition: str | None) QgsProcessingParameterMultipleLayers | None[source]

Creates a new parameter using the definition from a script code.

Parameters:
  • name (Optional[str])

  • description (Optional[str])

  • isOptional (bool)

  • definition (Optional[str])

Return type:

Optional[QgsProcessingParameterMultipleLayers]

layerType(self) Qgis.ProcessingSourceType[source]

Returns the layer type for layers acceptable by the parameter.

See also

setLayerType()

Return type:

Qgis.ProcessingSourceType

minimumNumberInputs(self) int[source]

Returns the minimum number of layers required for the parameter. If the return value is < 1 then the parameter accepts any number of layers.

Return type:

int

setLayerType(self, type: Qgis.ProcessingSourceType)[source]

Sets the layer type for layers acceptable by the parameter.

See also

layerType()

Parameters:

type (Qgis.ProcessingSourceType)

setMinimumNumberInputs(self, minimum: int)[source]

Sets the minimum number of layers required for the parameter. The minimum must be >= 1 if the parameter is not optional.

Parameters:

minimum (int)

static typeName() str[source]

Returns the type name for the parameter class.

Return type:

str