Class: QgsProcessingParameterMatrix

A table (matrix) parameter for processing algorithms.

List of all members, including inherited members

Class Hierarchy

Inheritance diagram of qgis.core.QgsProcessingParameterMatrix

Base classes

QgsProcessingParameterDefinition

Base class for the definition of processing parameters.

Methods

hasFixedNumberRows

Returns whether the table has a fixed number of rows.

headers

Returns a list of column headers (if set).

numberRows

Returns the fixed number of rows in the table.

setHasFixedNumberRows

Sets whether the table has a fixed number of rows.

setHeaders

Sets the list of column headers.

setNumberRows

Sets the fixed number of rows in the table.

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.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:

a0 (QgsProcessingParameterMatrix)

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:
Return type:

Optional[QgsProcessingParameterMatrix]

hasFixedNumberRows(self) bool[source]

Returns whether the table has a fixed number of rows.

See also

numberRows()

Return type:

bool

headers(self) list[str][source]

Returns a list of column headers (if set).

See also

setHeaders()

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() is True.

See also

setNumberRows()

Return type:

int

setHasFixedNumberRows(self, hasFixedNumberRows: bool)[source]

Sets whether the table has a fixed number of rows.

See also

setNumberRows()

Parameters:

hasFixedNumberRows (bool)

setHeaders(self, headers: Iterable[str | None])[source]

Sets the list of column headers.

See also

headers()

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 if hasFixedNumberRows() is True.

See also

numberRows()

Parameters:

rows (int)

static typeName() str[source]

Returns the type name for the parameter class.

Return type:

str