Class: QgsProcessingParameterBand

A raster band parameter for Processing algorithms.

Class Hierarchy

Inheritance diagram of qgis.core.QgsProcessingParameterBand

Base classes

QgsProcessingParameterDefinition

Base class for the definition of processing parameters.

class qgis.core.QgsProcessingParameterBand[source]

Bases: QgsProcessingParameterDefinition

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

Constructor for QgsProcessingParameterBand.

Parameters:
  • name (Optional[str])

  • description (Optional[str] = '')

  • defaultValue (Any = None)

  • parentLayerParameterName (Optional[str] = '')

  • optional (bool = False)

  • allowMultiple (bool = False)

__init__(a0: QgsProcessingParameterBand)
Parameters:

a0 (QgsProcessingParameterBand)

allowMultiple(self) bool[source]

Returns whether multiple band selections are permitted.

Added in version 3.4.

Return type:

bool

static fromScriptCode(name: str | None, description: str | None, isOptional: bool, definition: str | None) QgsProcessingParameterBand | 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[QgsProcessingParameterBand]

parentLayerParameterName(self) str[source]

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

Return type:

str

setAllowMultiple(self, allowMultiple: bool)[source]

Sets whether multiple band selections are permitted.

See also

allowMultiple()

Added in version 3.4.

Parameters:

allowMultiple (bool)

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

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

Parameters:

parentLayerParameterName (Optional[str])

static typeName() str[source]

Returns the type name for the parameter class.

Return type:

str