QGIS/python/core/auto_generated/qgsmaplayerutils.sip.in
Nyall Dawson 216925abd1 Add utility function QgsMapLayerUtils::layerSourceMatchesPath
Tests whether a layer has a source which matches a specified
file path
2021-07-28 19:39:12 +10:00

60 lines
2.1 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsmaplayerutils.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsMapLayerUtils
{
%Docstring(signature="appended")
Contains utility functions for working with map layers.
.. versionadded:: 3.20
%End
%TypeHeaderCode
#include "qgsmaplayerutils.h"
%End
public:
static QgsRectangle combinedExtent( const QList<QgsMapLayer *> &layers, const QgsCoordinateReferenceSystem &crs, const QgsCoordinateTransformContext &transformContext );
%Docstring
Returns the combined extent of a list of ``layers``.
The ``crs`` argument specifies the desired coordinate reference system for the combined extent.
%End
static QgsAbstractDatabaseProviderConnection *databaseConnection( const QgsMapLayer *layer ) /Factory/;
%Docstring
Creates and returns the (possibly ``None``) database connection for a ``layer``.
Ownership is transferred to the caller.
.. versionadded:: 3.22
%End
static bool layerSourceMatchesPath( const QgsMapLayer *layer, const QString &path );
%Docstring
Returns ``True`` if the source of the specified ``layer`` matches the given ``path``.
This method can be used to test whether a layer is associated with a file path.
.. versionadded:: 3.22
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsmaplayerutils.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/