QGIS API Documentation 3.39.0-Master (73c886ac97c)
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
18#include "qgsapplication.h"
20
21#include <QIcon>
22
24
25#define PROVIDER_KEY QStringLiteral( "tiledscene" )
26#define PROVIDER_DESCRIPTION QStringLiteral( "Tiled scene provider" )
27
28QgsTiledSceneProviderMetadata::QgsTiledSceneProviderMetadata()
29 : QgsProviderMetadata( PROVIDER_KEY, PROVIDER_DESCRIPTION )
30{
31}
32
33QIcon QgsTiledSceneProviderMetadata::icon() const
34{
35 return QgsApplication::getThemeIcon( QStringLiteral( "mIconTiledSceneLayer.svg" ) );
36}
37
38QList<QgsDataItemProvider *> QgsTiledSceneProviderMetadata::dataItemProviders() const
39{
40 return
41 {
42 new QgsTiledSceneDataItemProvider()
43 };
44}
45
46QMap<QString, QgsAbstractProviderConnection *> QgsTiledSceneProviderMetadata::connections( bool cached )
47{
48 return connectionsProtected<QgsTiledSceneProviderConnection, QgsTiledSceneProviderConnection>( cached );
49}
50
51QgsAbstractProviderConnection *QgsTiledSceneProviderMetadata::createConnection( const QString &name )
52{
53 return new QgsTiledSceneProviderConnection( name );
54}
55
56void QgsTiledSceneProviderMetadata::deleteConnection( const QString &name )
57{
58 deleteConnectionProtected<QgsTiledSceneProviderConnection>( name );
59}
60
61void QgsTiledSceneProviderMetadata::saveConnection( const QgsAbstractProviderConnection *connection, const QString &name )
62{
63 saveConnectionProtected( connection, name );
64}
65
66QgsProviderMetadata::ProviderCapabilities QgsTiledSceneProviderMetadata::providerCapabilities() const
67{
69}
70
71
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.