Class: QgsProcessingParameterMatrix¶
- class qgis.core.QgsProcessingParameterMatrix¶
Bases:
QgsProcessingParameterDefinition
A table (matrix) parameter for processing algorithms.
QgsProcessingParameterMatrix(name: str, description: str = ‘’, numberRows: int = 3, hasFixedNumberRows: bool = False, headers: Iterable[str] = [], defaultValue: Any = None, optional: bool = False) Constructor for QgsProcessingParameterMatrix.
QgsProcessingParameterMatrix(
QgsProcessingParameterMatrix
)Methods
- param outputType:
- param input:
- rtype:
QgsProcessingParameterDefinition
Default gui value for an algorithm parameter from settings
Creates a new parameter using the definition from a script code.
- param map:
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.- rtype:
Dict[str, Any]
- rtype:
str
Returns the type name for the parameter class.
- param value:
- asPythonString(self, outputType: QgsProcessing.PythonOutputType = QgsProcessing.PythonOutputType.PythonQgsProcessingAlgorithmSubclass) str ¶
- Parameters:
outputType (QgsProcessing.PythonOutputType = QgsProcessing.PythonOutputType.PythonQgsProcessingAlgorithmSubclass)
- Return type:
str
- checkValueIsAcceptable(self, input: Any, context: QgsProcessingContext = None) bool ¶
- Parameters:
input (Any)
context (
QgsProcessingContext
= None)
- Return type:
bool
- clone(self) QgsProcessingParameterDefinition ¶
- Return type:
- defaultGuiValueFromSetting(self) Any ¶
Default gui value for an algorithm parameter from settings
- Returns:
default value from settings or invalid QVariant if there is no default value defined in the settings
Added in version 3.34.
- fromScriptCode(name: str, description: str, isOptional: bool, definition: str) QgsProcessingParameterMatrix ¶
Creates a new parameter using the definition from a script code.
- Parameters:
name (str)
description (str)
isOptional (bool)
definition (str)
- Return type:
- fromVariantMap(self, map: Dict[str, Any]) bool ¶
- Parameters:
map (Dict[str)
- Return type:
bool
- hasFixedNumberRows(self) bool ¶
Returns whether the table has a fixed number of rows.
See also
See also
- Return type:
bool
- headers(self) List[str] ¶
Returns a list of column headers (if set).
See also
- Return type:
List[str]
- numberRows(self) int ¶
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)¶
Sets whether the table has a fixed number of rows.
See also
See also
- Parameters:
hasFixedNumberRows (bool)
- setHeaders(self, headers: Iterable[str])¶
Sets the list of column
headers
.See also
- Parameters:
headers (Iterable[str])
- setNumberRows(self, rows: int)¶
Sets the fixed number of
rows
in the table. This parameter only has an effect ifhasFixedNumberRows()
isTrue
.See also
See also
- Parameters:
rows (int)
- toVariantMap(self) Dict[str, Any] ¶
- Return type:
Dict[str, Any]
- type(self) str ¶
- Return type:
str
- typeName() str ¶
Returns the type name for the parameter class.
- Return type:
str
- valueAsPythonString(self, value: Any, context: QgsProcessingContext) str ¶
- Parameters:
value (Any)
context (QgsProcessingContext)
- Return type:
str