mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-08 00:05:09 -04:00
172 lines
4.1 KiB
Plaintext
172 lines
4.1 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/browser/qgslayeritem.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
class QgsLayerItem : QgsDataItem
|
|
{
|
|
%Docstring(signature="appended")
|
|
Item that represents a layer that can be opened with one of the providers
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgslayeritem.h"
|
|
%End
|
|
public:
|
|
|
|
QgsLayerItem( QgsDataItem *parent, const QString &name, const QString &path, const QString &uri, Qgis::BrowserLayerType layerType, const QString &providerKey );
|
|
%Docstring
|
|
Constructor for QgsLayerItem.
|
|
%End
|
|
|
|
SIP_PYOBJECT __repr__();
|
|
%MethodCode
|
|
QString str = QStringLiteral( "<QgsLayerItem: \"%1\" %2>" ).arg( sipCpp->name(), sipCpp->path() );
|
|
sipRes = PyUnicode_FromString( str.toUtf8().constData() );
|
|
%End
|
|
|
|
|
|
virtual bool equal( const QgsDataItem *other );
|
|
|
|
|
|
virtual bool hasDragEnabled() const;
|
|
|
|
virtual QgsMimeDataUtils::UriList mimeUris() const;
|
|
|
|
|
|
|
|
QgsMapLayerType mapLayerType() const;
|
|
%Docstring
|
|
Returns :py:class:`QgsMapLayerType`
|
|
%End
|
|
|
|
static Qgis::BrowserLayerType typeFromMapLayer( QgsMapLayer *layer );
|
|
%Docstring
|
|
Returns the layer item type corresponding to a :py:class:`QgsMapLayer` ``layer``.
|
|
|
|
.. versionadded:: 3.6
|
|
%End
|
|
|
|
QString uri() const;
|
|
%Docstring
|
|
Returns layer uri or empty string if layer cannot be created
|
|
%End
|
|
|
|
QString providerKey() const;
|
|
%Docstring
|
|
Returns provider key
|
|
%End
|
|
|
|
QStringList supportedCrs() const;
|
|
%Docstring
|
|
Returns the supported CRS
|
|
|
|
.. versionadded:: 2.8
|
|
%End
|
|
|
|
QStringList supportedFormats() const;
|
|
%Docstring
|
|
Returns the supported formats
|
|
|
|
.. versionadded:: 2.8
|
|
%End
|
|
|
|
virtual QString comments() const;
|
|
%Docstring
|
|
Returns comments of the layer
|
|
|
|
.. versionadded:: 2.12
|
|
%End
|
|
|
|
static QString layerTypeAsString( Qgis::BrowserLayerType layerType );
|
|
%Docstring
|
|
Returns the string representation of the given ``layerType``
|
|
|
|
.. versionadded:: 3
|
|
%End
|
|
|
|
static QString iconName( Qgis::BrowserLayerType layerType );
|
|
%Docstring
|
|
Returns the icon name of the given ``layerType``
|
|
|
|
.. versionadded:: 3
|
|
%End
|
|
|
|
virtual bool deleteLayer() /Deprecated/;
|
|
%Docstring
|
|
Delete this layer item
|
|
Use :py:class:`QgsDataItemGuiProvider`.deleteLayer instead
|
|
|
|
.. deprecated::
|
|
QGIS 3.10
|
|
%End
|
|
|
|
protected:
|
|
|
|
public:
|
|
|
|
static QIcon iconForWkbType( QgsWkbTypes::Type type );
|
|
%Docstring
|
|
Returns the icon for a vector layer whose geometry type is provided.
|
|
|
|
.. versionadded:: 3.18
|
|
%End
|
|
|
|
static QIcon iconPoint();
|
|
static QIcon iconLine();
|
|
static QIcon iconPolygon();
|
|
static QIcon iconTable();
|
|
static QIcon iconRaster();
|
|
static QIcon iconDefault();
|
|
static QIcon iconMesh();
|
|
%Docstring
|
|
Returns icon for mesh layer type
|
|
%End
|
|
static QIcon iconVectorTile();
|
|
%Docstring
|
|
Returns icon for vector tile layer
|
|
%End
|
|
static QIcon iconPointCloud();
|
|
%Docstring
|
|
Returns icon for point cloud layer
|
|
%End
|
|
virtual QString layerName() const;
|
|
%Docstring
|
|
|
|
:return: the layer name
|
|
%End
|
|
virtual QgsAbstractDatabaseProviderConnection *databaseConnection() const;
|
|
|
|
|
|
const QgsLayerMetadata &layerMetadata() const;
|
|
%Docstring
|
|
Returns layer's metadata, it may be a default constructed metadata
|
|
if metadata is not explicitly set.
|
|
|
|
.. versionadded:: 3.28
|
|
%End
|
|
|
|
void setLayerMetadata( const QgsLayerMetadata &metadata );
|
|
%Docstring
|
|
Set layer's ``metadata``.
|
|
|
|
.. versionadded:: 3.28
|
|
%End
|
|
|
|
};
|
|
|
|
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/browser/qgslayeritem.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|