QGIS API Documentation 4.1.0-Master (3fcefe620d1)
Loading...
Searching...
No Matches
QgsMapLayerDependency Class Reference

Models dependencies with or between map layers. More...

#include <qgsmaplayerdependency.h>

Public Types

enum  Origin { FromProvider = 0 , FromUser = 1 }
 Origin of the dependency. More...
enum  Type { PresenceDependency = 1 , DataDependency = 2 }
 Type of dependency. More...

Public Member Functions

 QgsMapLayerDependency (const QString &layerId, Type type=DataDependency, Origin origin=FromUser)
 Standard constructor.
QString layerId () const
 Returns the ID of the layer this dependency depends on.
bool operator== (const QgsMapLayerDependency &other) const
Origin origin () const
 Returns the dependency origin.
Type type () const
 Returns the dependency type.

Detailed Description

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

Definition at line 37 of file qgsmaplayerdependency.h.

Member Enumeration Documentation

◆ Origin

Origin of the dependency.

Enumerator
FromProvider 

Dependency given by the provider, the user cannot change it.

FromUser 

Dependency given by the user.

Definition at line 48 of file qgsmaplayerdependency.h.

◆ Type

Type of dependency.

Enumerator
PresenceDependency 

The layer must be already present (in the registry) for this dependency to be resolved.

DataDependency 

The layer may be invalidated by data changes on another layer.

Definition at line 41 of file qgsmaplayerdependency.h.

Constructor & Destructor Documentation

◆ QgsMapLayerDependency()

QgsMapLayerDependency::QgsMapLayerDependency ( const QString & layerId,
Type type = DataDependency,
Origin origin = FromUser )
inline

Standard constructor.

Definition at line 55 of file qgsmaplayerdependency.h.

Member Function Documentation

◆ layerId()

QString QgsMapLayerDependency::layerId ( ) const
inline

Returns the ID of the layer this dependency depends on.

Definition at line 68 of file qgsmaplayerdependency.h.

◆ operator==()

bool QgsMapLayerDependency::operator== ( const QgsMapLayerDependency & other) const
inline

Definition at line 72 of file qgsmaplayerdependency.h.

◆ origin()

Origin QgsMapLayerDependency::origin ( ) const
inline

Returns the dependency origin.

Definition at line 65 of file qgsmaplayerdependency.h.

◆ type()

Type QgsMapLayerDependency::type ( ) const
inline

Returns the dependency type.

Definition at line 62 of file qgsmaplayerdependency.h.


The documentation for this class was generated from the following file: