Class: QgsMapLayerDependency

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

Bases: sip.wrapper

Standard constructor

QgsMapLayerDependency(QgsMapLayerDependency)

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: Enums

Methods

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

Signals

Attributes

DataDependency
FromProvider
FromUser
PresenceDependency
DataDependency = 2
FromProvider = 0
FromUser = 1
class Origin

Bases: int

PresenceDependency = 1
class Type

Bases: int

layerId(self) → str

Returns the ID of the layer this dependency depends on

origin(self) → QgsMapLayerDependency.Origin

Returns the dependency origin

type(self) → QgsMapLayerDependency.Type

Returns the dependency type