Class: QgsProcessingParameterVectorLayer

A vector layer (with or without geometry) parameter for processing algorithms.

Consider using the more versatile QgsProcessingParameterFeatureSource wherever possible.

Class Hierarchy

Inheritance diagram of qgis.core.QgsProcessingParameterVectorLayer

Base classes

QgsProcessingParameterDefinition

Base class for the definition of processing parameters.

QgsProcessingParameterLimitedDataTypes

Can be inherited by parameters which require limits to their acceptable data types.

QgsFileFilterGenerator

Abstract interface for classes which generate a file filter string.

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

Bases: QgsProcessingParameterDefinition, QgsProcessingParameterLimitedDataTypes, QgsFileFilterGenerator

__init__(name: str | None, description: str | None = '', types: Iterable[int] = [], defaultValue: Any = None, optional: bool = False)

Constructor for QgsProcessingParameterVectorLayer.

Parameters:
  • name (Optional[str])

  • description (Optional[str] = '')

  • types (Iterable[int] = [])

  • defaultValue (Any = None)

  • optional (bool = False)

__init__(a0: QgsProcessingParameterVectorLayer)
Parameters:

a0 (QgsProcessingParameterVectorLayer)

static fromScriptCode(name: str | None, description: str | None, isOptional: bool, definition: str | None) QgsProcessingParameterVectorLayer | 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[QgsProcessingParameterVectorLayer]

static typeName() str[source]

Returns the type name for the parameter class.

Return type:

str