Class: QgsProcessingParameterBand¶
A raster band parameter for Processing algorithms.
Class Hierarchy¶
Base classes¶
Base class for the definition of processing parameters. |
Methods
Returns whether multiple band selections are permitted. |
|
Returns the name of the parent layer parameter, or an empty string if this is not set. |
|
Sets whether multiple band selections are permitted. |
|
Sets the name of the parent layer parameter. |
Static Methods
Creates a new parameter using the definition from a script code. |
|
Returns the type name for the parameter class. |
- 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:
- allowMultiple(self) bool [source]¶
Returns whether multiple band selections are permitted.
See also
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.
See also
- Return type:
str
- setAllowMultiple(self, allowMultiple: bool)[source]¶
Sets whether multiple band selections are permitted.
See also
Added in version 3.4.
- Parameters:
allowMultiple (bool)