17#ifndef QGSPROJECTUTILS_H
18#define QGSPROJECTUTILS_H
ProjectTrustStatus
Project trust status.
SourceHierarchyLevel
Defines the structural levels within a data source hierarchy.
@ Object
Represents a specific data entity, e.g. a table, view, or layer.
Base class for all map layer types.
Contains utility functions for working with QGIS projects.
static bool updateLayerPath(QgsProject *project, const QString &oldPath, const QString &newPath)
Updates a project, replacing the data source for all layers which match the given oldPath with source...
static QList< QgsMapLayer * > layersMatchingUri(const QgsProject *project, const QString &provider, const QString &uri, Qgis::SourceHierarchyLevel level=Qgis::SourceHierarchyLevel::Object)
Returns a list of all layers in the specified project point to the same uri resource at the specified...
static Qgis::ProjectTrustStatus checkUserTrust(QgsProject *project)
Returns the current trust status of the specified project.
static bool layerIsContainedInGroupLayer(QgsProject *project, QgsMapLayer *layer)
Returns true if the specified layer is a child layer from any QgsGroupLayer in the given project.
static QList< QgsMapLayer * > layersMatchingPath(const QgsProject *project, const QString &path)
Returns a list of all layers in the specified project which match the given path.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...