Class: QgsProcessingParameterMatrix¶
A table (matrix) parameter for processing algorithms.
Class Hierarchy¶
Base classes¶
Base class for the definition of processing parameters. |
Methods
Returns whether the table has a fixed number of rows. |
|
Returns a list of column headers (if set). |
|
Returns the fixed number of rows in the table. |
|
Sets whether the table has a fixed number of rows. |
|
Sets the list of column headers. |
|
Sets the fixed number of rows in the table. |
Static Methods
Creates a new parameter using the definition from a script code. |
|
Returns the type name for the parameter class. |
- class qgis.core.QgsProcessingParameterMatrix[source]¶
Bases:
QgsProcessingParameterDefinition
- __init__(name: str | None, description: str | None = '', numberRows: int = 3, hasFixedNumberRows: bool = False, headers: Iterable[str | None] = [], defaultValue: Any = None, optional: bool = False)
Constructor for QgsProcessingParameterMatrix.
- Parameters:
name (Optional[str])
description (Optional[str] = '')
numberRows (int = 3)
hasFixedNumberRows (bool = False)
headers (Iterable[Optional[str]] = [])
defaultValue (Any = None)
optional (bool = False)
- __init__(a0: QgsProcessingParameterMatrix)
- Parameters:
- static fromScriptCode(name: str | None, description: str | None, isOptional: bool, definition: str | None) QgsProcessingParameterMatrix | 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[QgsProcessingParameterMatrix]
- hasFixedNumberRows(self) bool [source]¶
Returns whether the table has a fixed number of rows.
See also
See also
- Return type:
bool
- headers(self) List[str] [source]¶
Returns a list of column headers (if set).
See also
- Return type:
List[str]
- numberRows(self) int [source]¶
Returns the fixed number of rows in the table. This parameter only has an effect if
hasFixedNumberRows()
isTrue
.See also
See also
- Return type:
int
- setHasFixedNumberRows(self, hasFixedNumberRows: bool)[source]¶
Sets whether the table has a fixed number of rows.
See also
See also
- Parameters:
hasFixedNumberRows (bool)
- setHeaders(self, headers: Iterable[str | None])[source]¶
Sets the list of column
headers
.See also
- Parameters:
headers (Iterable[Optional[str]])
- setNumberRows(self, rows: int)[source]¶
Sets the fixed number of
rows
in the table. This parameter only has an effect ifhasFixedNumberRows()
isTrue
.See also
See also
- Parameters:
rows (int)