Class: QgsProcessingParameterLayout

class qgis.core.QgsProcessingParameterLayout(name: str, description: str = '', defaultValue: Any = None, optional: bool = False)

Bases: qgis._core.QgsProcessingParameterDefinition

Constructor for QgsProcessingParameterLayout.

QgsProcessingParameterLayout(QgsProcessingParameterLayout)

A print layout parameter, allowing users to select a print layout.

QgsProcessingParameterLayout should be evaluated by calling QgsProcessingAlgorithm.parameterAsLayout() This will return the matching layout from the context’s current project. Alternatively, calling QgsProcessingAlgorithm.parameterAsString() will return the name of the target print layout.

New in version 3.8: Enums

Methods

asPythonString

asScriptCode

clone

fromScriptCode

Creates a new parameter using the definition from a script code.

type

typeName

Returns the type name for the parameter class.

valueAsPythonString

Signals

Attributes

asPythonString(self, outputType: QgsProcessing.PythonOutputType = QgsProcessing.PythonQgsProcessingAlgorithmSubclass) → str
asScriptCode(self) → str
clone(self) → QgsProcessingParameterDefinition
fromScriptCode(name: str, description: str, isOptional: bool, definition: str) → QgsProcessingParameterLayout

Creates a new parameter using the definition from a script code.

type(self) → str
typeName() → str

Returns the type name for the parameter class.

valueAsPythonString(self, value: Any, context: QgsProcessingContext) → str