QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsLayerDefinition::DependencySorter Class Reference

Class used to work with layer dependencies stored in a XML project or layer definition file. More...

#include <qgslayerdefinition.h>

Public Member Functions

 DependencySorter (const QDomDocument &doc)
 Constructor.
 
 DependencySorter (const QString &fileName)
 Constructor.
 
bool hasCycle () const
 Whether some cyclic dependency has been detected.
 
bool hasMissingDependency () const
 Whether some dependency is missing.
 
bool isLayerDependent (const QString &layerId) const
 Returns whether the layer associated with thelayerId is dependent from another layer.
 
QStringList sortedLayerIds () const
 Gets the layer IDs in an order where they can be loaded incrementally without dependency break.
 
QVector< QDomNode > sortedLayerNodes () const
 Gets the layer nodes in an order where they can be loaded incrementally without dependency break.
 

Detailed Description

Class used to work with layer dependencies stored in a XML project or layer definition file.

Definition at line 137 of file qgslayerdefinition.h.

Constructor & Destructor Documentation

◆ DependencySorter() [1/2]

QgsLayerDefinition::DependencySorter::DependencySorter ( const QDomDocument &  doc)
explicit

Constructor.

Parameters
docThe XML document containing maplayer elements

Definition at line 529 of file qgslayerdefinition.cpp.

◆ DependencySorter() [2/2]

QgsLayerDefinition::DependencySorter::DependencySorter ( const QString &  fileName)
explicit

Constructor.

Parameters
fileNameThe filename where the XML document is stored

Definition at line 536 of file qgslayerdefinition.cpp.

Member Function Documentation

◆ hasCycle()

bool QgsLayerDefinition::DependencySorter::hasCycle ( ) const
inline

Whether some cyclic dependency has been detected.

Definition at line 160 of file qgslayerdefinition.h.

◆ hasMissingDependency()

bool QgsLayerDefinition::DependencySorter::hasMissingDependency ( ) const
inline

Whether some dependency is missing.

Definition at line 163 of file qgslayerdefinition.h.

◆ isLayerDependent()

bool QgsLayerDefinition::DependencySorter::isLayerDependent ( const QString &  layerId) const

Returns whether the layer associated with thelayerId is dependent from another layer.

Since
QGIS 3.32

Definition at line 555 of file qgslayerdefinition.cpp.

◆ sortedLayerIds()

QStringList QgsLayerDefinition::DependencySorter::sortedLayerIds ( ) const
inline

Gets the layer IDs in an order where they can be loaded incrementally without dependency break.

Definition at line 157 of file qgslayerdefinition.h.

◆ sortedLayerNodes()

QVector< QDomNode > QgsLayerDefinition::DependencySorter::sortedLayerNodes ( ) const
inline

Gets the layer nodes in an order where they can be loaded incrementally without dependency break.

Definition at line 154 of file qgslayerdefinition.h.


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