Subgroup: Map

Class: QgsMapLayerDependency

class qgis.core.QgsMapLayerDependency(layerId: str, type: QgsMapLayerDependency.Type = QgsMapLayerDependency.DataDependency, origin: QgsMapLayerDependency.Origin = QgsMapLayerDependency.FromUser)

Bases: sip.wrapper

Standard constructor


This class models dependencies with or between map layers. A dependency is defined by a layer ID, a type and an origin. The two combinations of type/origin that are currently supported are: - PresenceDependency && FromProvider: virtual layers for instance which may depend on other layers already loaded to work - DataDependency && FromUser: dependencies given by the user, mainly to represent database triggers

New in version 3.0: Methods

layerId Return the ID of the layer this dependency depends on
origin Return the dependency origin
type Return the dependency type



DataDependency = 2
FromProvider = 0
FromUser = 1
class Origin

Bases: int

PresenceDependency = 1
class Type

Bases: int

layerId(self) → str

Return the ID of the layer this dependency depends on

origin(self) → QgsMapLayerDependency.Origin

Return the dependency origin

type(self) → QgsMapLayerDependency.Type

Return the dependency type