Class: QgsProcessingParameterLayout¶
- class qgis.core.QgsProcessingParameterLayout¶
Bases:
QgsProcessingParameterDefinition
A print layout parameter, allowing users to select a print layout.
QgsProcessingParameterLayout
should be evaluated by callingQgsProcessingAlgorithm.parameterAsLayout()
. This will return the matching layout from the context’s current project. Alternatively, callingQgsProcessingAlgorithm.parameterAsString()
will return the name of the target print layout.Added in version 3.8.
QgsProcessingParameterLayout(name: Optional[str], description: Optional[str] = ‘’, defaultValue: Any = None, optional: bool = False) Constructor for QgsProcessingParameterLayout.
QgsProcessingParameterLayout(a0:
QgsProcessingParameterLayout
)Methods
- param outputType:
- rtype:
str
- rtype:
Optional[QgsProcessingParameterDefinition]
Default gui value for an algorithm parameter from settings
Creates a new parameter using the definition from a script code.
- 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
- asScriptCode(self) str ¶
- Return type:
str
- 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) QgsProcessingParameterLayout | 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[QgsProcessingParameterLayout]
- 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