QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
qgstiledsceneprovidermetadata.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgstiledsceneprovidermetadata.cpp
3 --------------------------------------
4 Date : June 2023
5 Copyright : (C) 2023 by Nyall Dawson
6 Email : nyall dot dawson at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
17#include "moc_qgstiledsceneprovidermetadata.cpp"
19#include "qgsapplication.h"
21
22#include <QIcon>
23
25
26#define PROVIDER_KEY QStringLiteral( "tiledscene" )
27#define PROVIDER_DESCRIPTION QStringLiteral( "Tiled scene provider" )
28
29QgsTiledSceneProviderMetadata::QgsTiledSceneProviderMetadata()
30 : QgsProviderMetadata( PROVIDER_KEY, PROVIDER_DESCRIPTION )
31{
32}
33
34QIcon QgsTiledSceneProviderMetadata::icon() const
35{
36 return QgsApplication::getThemeIcon( QStringLiteral( "mIconTiledSceneLayer.svg" ) );
37}
38
39QList<QgsDataItemProvider *> QgsTiledSceneProviderMetadata::dataItemProviders() const
40{
41 return
42 {
43 new QgsTiledSceneDataItemProvider()
44 };
45}
46
47QMap<QString, QgsAbstractProviderConnection *> QgsTiledSceneProviderMetadata::connections( bool cached )
48{
49 return connectionsProtected<QgsTiledSceneProviderConnection, QgsTiledSceneProviderConnection>( cached );
50}
51
52QgsAbstractProviderConnection *QgsTiledSceneProviderMetadata::createConnection( const QString &name )
53{
54 return new QgsTiledSceneProviderConnection( name );
55}
56
57void QgsTiledSceneProviderMetadata::deleteConnection( const QString &name )
58{
59 deleteConnectionProtected<QgsTiledSceneProviderConnection>( name );
60}
61
62void QgsTiledSceneProviderMetadata::saveConnection( const QgsAbstractProviderConnection *connection, const QString &name )
63{
64 saveConnectionProtected( connection, name );
65}
66
67QgsProviderMetadata::ProviderCapabilities QgsTiledSceneProviderMetadata::providerCapabilities() const
68{
70}
71
72
The QgsAbstractProviderConnection provides an interface for data provider connections.
static QIcon getThemeIcon(const QString &name, const QColor &fillColor=QColor(), const QColor &strokeColor=QColor())
Helper to get a theme icon.
Holds data provider key, description, and associated shared library file or function pointer informat...
QFlags< ProviderCapability > ProviderCapabilities
Represents connections to tiled scene data sources.