23 QgsVectorTileRootItem::QgsVectorTileRootItem(
QgsDataItem *parent, QString name, QString path )
27 mIconName = QStringLiteral(
"mIconVectorTileLayer.svg" );
31 QVector<QgsDataItem *> QgsVectorTileRootItem::createChildren()
33 QVector<QgsDataItem *> connections;
34 const auto connectionList = QgsVectorTileProviderConnection::connectionList();
35 for (
const QString &connName : connectionList )
37 const QString uri = QgsVectorTileProviderConnection::encodedLayerUri( QgsVectorTileProviderConnection::connection( connName ) );
38 QgsDataItem *conn =
new QgsVectorTileLayerItem(
this, connName, mPath +
'/' + connName, uri );
39 connections.append( conn );
48 QgsVectorTileLayerItem::QgsVectorTileLayerItem(
QgsDataItem *parent, QString name, QString path,
const QString &encodedUri )
49 :
QgsLayerItem( parent, name, path, encodedUri,
Qgis::BrowserLayerType::VectorTile, QString() )
52 mIconName = QStringLiteral(
"mIconVectorTileLayer.svg" );
58 QString QgsVectorTileDataItemProvider::name()
60 return QStringLiteral(
"Vector Tiles" );
63 QString QgsVectorTileDataItemProvider::dataProviderKey()
const
65 return QStringLiteral(
"vectortile" );
68 int QgsVectorTileDataItemProvider::capabilities()
const
76 return new QgsVectorTileRootItem( parentItem, QStringLiteral(
"Vector Tiles" ), QStringLiteral(
"vectortile:" ) );