Class: QgsProcessingParameterMatrix¶
- class qgis.core.QgsProcessingParameterMatrix¶
Bases:
QgsProcessingParameterDefinition
A table (matrix) parameter for processing algorithms.
Added in version 3.0.
QgsProcessingParameterMatrix(name: Optional[str], description: Optional[str] = ‘’, numberRows: int = 3, hasFixedNumberRows: bool = False, headers: Iterable[Optional[str]] = [], defaultValue: Any = None, optional: bool = False) Constructor for QgsProcessingParameterMatrix.
QgsProcessingParameterMatrix(a0:
QgsProcessingParameterMatrix
)Methods
- param outputType:
- param input:
- rtype:
Optional[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.PythonQgsProcessingAlgorithmSubclass) str ¶
- Parameters:
outputType (QgsProcessing.PythonOutputType = QgsProcessing.PythonQgsProcessingAlgorithmSubclass)
- Return type:
str
- checkValueIsAcceptable(self, input: Any, context: QgsProcessingContext | None = None) bool ¶
- Parameters:
input (Any)
context (Optional[QgsProcessingContext] = None)
- Return type:
bool
- clone(self) QgsProcessingParameterDefinition | None ¶
- Return type:
Optional[QgsProcessingParameterDefinition]
- 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 | None, description: str | None, isOptional: bool, definition: str | None) QgsProcessingParameterMatrix | None ¶
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]
- 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 | None])¶
Sets the list of column
headers
.See also
- Parameters:
headers (Iterable[Optional[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