16#include "moc_qgstiledscenedataitems.cpp"
24QgsTiledSceneRootItem::QgsTiledSceneRootItem(
QgsDataItem *parent, QString name, QString path )
28 mIconName = QStringLiteral(
"mIconTiledScene.svg" );
32QVector<QgsDataItem *> QgsTiledSceneRootItem::createChildren()
34 QVector<QgsDataItem *> connections;
36 for (
const QString &connName : connectionList )
40 QgsDataItem *conn =
new QgsTiledSceneLayerItem(
this, connName, mPath +
'/' + connName, uri, connectionData.
provider );
41 connections.append( conn );
50QgsTiledSceneLayerItem::QgsTiledSceneLayerItem(
QgsDataItem *parent, QString name, QString path,
const QString &encodedUri,
const QString &provider )
51 :
QgsLayerItem( parent, name, path, encodedUri,
Qgis::BrowserLayerType::TiledScene, provider )
57 mIcon = metadata->icon();
61 mIconName = QStringLiteral(
"mIconTiledSceneLayer.svg" );
68QString QgsTiledSceneDataItemProvider::name()
70 return QStringLiteral(
"Scenes" );
73QString QgsTiledSceneDataItemProvider::dataProviderKey()
const
75 return QStringLiteral(
"tiled-scene" );
86 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.