QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
25 QList<QgsMapLayer *> layersList;
29 const QMap<QString, QgsMapLayer *> mapLayers( project->
mapLayers() );
46 const QMap<QString, QgsMapLayer *> mapLayers( project->
mapLayers() );
62 if ( groupLayer->childLayers().contains( layer ) )
QVector< T > layers() const
Returns a list of registered map layers with a specified layer type.
static bool layerIsContainedInGroupLayer(QgsProject *project, QgsMapLayer *layer)
Returns true if the specified layer is a child layer from any QgsGroupLayer in the given project.
QMap< QString, QgsMapLayer * > mapLayers(const bool validOnly=false) const
Returns a map of all registered layers by layer ID.
A map layer which consists of a set of child layers, where all component layers are rendered as a sin...
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...
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
static bool layerSourceMatchesPath(const QgsMapLayer *layer, const QString &path)
Returns true if the source of the specified layer matches the given path.
Base class for all map layer types. This is the base class for all map layer types (vector,...
static bool updateLayerSourcePath(QgsMapLayer *layer, const QString &newPath)
Updates a layer's data source, replacing its data source with a path referring to newPath.
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.