23QgsTiledSceneRootItem::QgsTiledSceneRootItem(
QgsDataItem *parent, QString name, QString path )
27 mIconName = QStringLiteral(
"mIconTiledScene.svg" );
31QVector<QgsDataItem *> QgsTiledSceneRootItem::createChildren()
33 QVector<QgsDataItem *> connections;
35 for (
const QString &connName : connectionList )
39 QgsDataItem *conn =
new QgsTiledSceneLayerItem(
this, connName, mPath +
'/' + connName, uri, connectionData.
provider );
40 connections.append( conn );
49QgsTiledSceneLayerItem::QgsTiledSceneLayerItem(
QgsDataItem *parent, QString name, QString path,
const QString &encodedUri,
const QString &provider )
50 :
QgsLayerItem( parent, name, path, encodedUri,
Qgis::BrowserLayerType::TiledScene, provider )
56 mIcon = metadata->icon();
60 mIconName = QStringLiteral(
"mIconTiledSceneLayer.svg" );
67QString QgsTiledSceneDataItemProvider::name()
69 return QStringLiteral(
"Scenes" );
72QString QgsTiledSceneDataItemProvider::dataProviderKey()
const
74 return QStringLiteral(
"tiled-scene" );
85 return new QgsTiledSceneRootItem( parentItem, QObject::tr(
"Scenes" ), QStringLiteral(
"tiled-scene:" ) );
The Qgis class provides global constants for use throughout the application.
@ NetworkSources
Network/internet source.
@ Populated
Children created.
@ Fast
CreateChildren() is fast enough to be run in main thread when refreshing items, most root items (wms,...
QFlags< DataItemProviderCapability > DataItemProviderCapabilities
Capabilities for data item providers.
A Collection that represents a root group of connections from a single data provider.
Base class for all items in the model.
Item that represents a layer that can be opened with one of the providers.
static QgsProviderRegistry * instance(const QString &pluginPath=QString())
Means of accessing canonical single instance.
static Data connection(const QString &name)
Returns connection details for the stored connection with the specified name.
static QStringList connectionList()
Returns a list of the stored connection names.
static QString encodedLayerUri(const Data &data)
Returns connection data encoded as a string containing a URI for a QgsTiledSceneLayer.
Represents decoded data of a tiled scene connection.
QString provider
Provider key.