22 QgsVectorTileRootItem::QgsVectorTileRootItem(
QgsDataItem *parent, QString name, QString path )
25 mCapabilities |= Fast;
26 mIconName = QStringLiteral(
"mIconVectorTileLayer.svg" );
30 QVector<QgsDataItem *> QgsVectorTileRootItem::createChildren()
32 QVector<QgsDataItem *> connections;
33 const auto connectionList = QgsVectorTileProviderConnection::connectionList();
34 for (
const QString &connName : connectionList )
36 QString uri = QgsVectorTileProviderConnection::encodedLayerUri( QgsVectorTileProviderConnection::connection( connName ) );
37 QgsDataItem *conn =
new QgsVectorTileLayerItem(
this, connName, mPath +
'/' + connName, uri );
38 connections.append( conn );
47 QgsVectorTileLayerItem::QgsVectorTileLayerItem(
QgsDataItem *parent, QString name, QString path,
const QString &encodedUri )
50 setState( Populated );
51 mIconName = QStringLiteral(
"mIconVectorTileLayer.svg" );
57 QString QgsVectorTileDataItemProvider::name()
59 return QStringLiteral(
"Vector Tiles" );
62 QString QgsVectorTileDataItemProvider::dataProviderKey()
const
64 return QStringLiteral(
"vectortile" );
67 int QgsVectorTileDataItemProvider::capabilities()
const
75 return new QgsVectorTileRootItem( parentItem, QStringLiteral(
"Vector Tiles" ), QStringLiteral(
"vectortile:" ) );