QGIS API Documentation  3.20.0-Odense (decaadbb31)
qgsvectortileprovidermetadata.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgsvectortileprovidermetadata.cpp
3  --------------------------------------
4  Date : March 2020
5  Copyright : (C) 2020 by Martin Dobias
6  Email : wonder dot sk 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 
19 #include "qgsvectortiledataitems.h"
20 
22 
23 #define PROVIDER_KEY QStringLiteral( "vectortile" )
24 #define PROVIDER_DESCRIPTION QStringLiteral( "Vector tile provider" )
25 
26 QgsVectorTileProviderMetadata::QgsVectorTileProviderMetadata()
27  : QgsProviderMetadata( PROVIDER_KEY, PROVIDER_DESCRIPTION )
28 {
29 }
30 
31 QList<QgsDataItemProvider *> QgsVectorTileProviderMetadata::dataItemProviders() const
32 {
33  QList< QgsDataItemProvider * > providers;
34  providers << new QgsVectorTileDataItemProvider;
35  return providers;
36 }
37 
38 QMap<QString, QgsAbstractProviderConnection *> QgsVectorTileProviderMetadata::connections( bool cached )
39 {
40  return connectionsProtected<QgsVectorTileProviderConnection, QgsVectorTileProviderConnection>( cached );
41 }
42 
43 QgsAbstractProviderConnection *QgsVectorTileProviderMetadata::createConnection( const QString &name )
44 {
45  return new QgsVectorTileProviderConnection( name );
46 }
47 
48 void QgsVectorTileProviderMetadata::deleteConnection( const QString &name )
49 {
50  deleteConnectionProtected<QgsVectorTileProviderConnection>( name );
51 }
52 
53 void QgsVectorTileProviderMetadata::saveConnection( const QgsAbstractProviderConnection *connection, const QString &name )
54 {
55  saveConnectionProtected( connection, name );
56 }
57 
The QgsAbstractProviderConnection provides an interface for data provider connections.
Holds data provider key, description, and associated shared library file or function pointer informat...