QGIS/python/core/auto_generated/project/qgsprojectutils.sip.in
2024-08-13 20:28:55 +10:00

60 lines
2.1 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/project/qgsprojectutils.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsProjectUtils
{
%Docstring(signature="appended")
Contains utility functions for working with QGIS projects.
.. versionadded:: 3.22
%End
%TypeHeaderCode
#include "qgsprojectutils.h"
%End
public:
static QList< QgsMapLayer * > layersMatchingPath( const QgsProject *project, const QString &path );
%Docstring
Returns a list of all layers in the specified ``project`` which match the given ``path``.
This method can be used to retrieve a list of layers in a project associated with a file path.
%End
static bool updateLayerPath( QgsProject *project, const QString &oldPath, const QString &newPath );
%Docstring
Updates a ``project``, replacing the data source for all layers which match the given ``oldPath``
with sources which point to ``newPath``.
Returns ``True`` if any layers were updated as a result.
%End
static bool layerIsContainedInGroupLayer( QgsProject *project, QgsMapLayer *layer );
%Docstring
Returns ``True`` if the specified ``layer`` is a child layer from any :py:class:`QgsGroupLayer` in the given ``project``.
.. versionadded:: 3.24
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/project/qgsprojectutils.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/