17 #ifndef QGSLAYERITEM_H
18 #define QGSLAYERITEM_H
21 #include "qgis_core.h"
41 SIP_PYOBJECT __repr__();
43 QString
str = QStringLiteral(
"<QgsLayerItem: \"%1\" %2>" ).arg( sipCpp->name(), sipCpp->path() );
44 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
68 QString
uri()
const {
return mUri; }
89 virtual QString
comments()
const {
return QString(); }
115 Qgis::BrowserLayerType mLayerType;
117 QStringList mSupportedCRS;
119 QStringList mSupportFormats;
127 static QIcon iconForWkbType(
QgsWkbTypes::Type type );
129 static QIcon iconPoint();
130 static QIcon iconLine();
131 static QIcon iconPolygon();
132 static QIcon iconTable();
133 static QIcon iconRaster();
134 static QIcon iconDefault();
136 static QIcon iconMesh();
138 static QIcon iconVectorTile();
140 static QIcon iconPointCloud();
142 virtual QString layerName()
const {
return name(); }
The Qgis class provides global constants for use throughout the application.
BrowserLayerType
Browser item layer types.
Base class for all items in the model.
QString name() const
Returns the name of the item (the displayed text for the item).
virtual bool equal(const QgsDataItem *other)
Returns true if this item is equal to another item (by testing item type and path).
virtual QgsMimeDataUtils::UriList mimeUris() const
Returns mime URIs for the data item, most data providers will only return a single URI but some data ...
Item that represents a layer that can be opened with one of the providers.
QStringList supportedFormats() const
Returns the supported formats.
QString uri() const
Returns layer uri or empty string if layer cannot be created.
QStringList supportedCrs() const
Returns the supported CRS.
virtual QString comments() const
Returns comments of the layer.
QString providerKey() const
Returns provider key.
bool hasDragEnabled() const override
Returns true if the item may be dragged.
Base class for all map layer types.
QList< QgsMimeDataUtils::Uri > UriList
Handles storage of information regarding WKB types and their properties.
QgsMapLayerType
Types of layers that can be added to a map.