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

Added in version 3.8.

Class Hierarchy

Inheritance diagram of qgis.core.QgsProcessingParameterLayout

Base classes

QgsProcessingParameterDefinition

Base class for the definition of processing parameters.

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.QgsProcessingParameterLayout[source]

Bases: QgsProcessingParameterDefinition

__init__(name: str | None, description: str | None = '', defaultValue: Any = None, optional: bool = False)

Constructor for QgsProcessingParameterLayout.

Parameters:
  • name (Optional[str])

  • description (Optional[str] = '')

  • defaultValue (Any = None)

  • optional (bool = False)

__init__(a0: QgsProcessingParameterLayout)
Parameters:

a0 (QgsProcessingParameterLayout)

static fromScriptCode(name: str | None, description: str | None, isOptional: bool, definition: str | None) QgsProcessingParameterLayout | None[source]

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]

static typeName() str[source]

Returns the type name for the parameter class.

Return type:

str