QGIS API Documentation  3.14.0-Pi (9f7028fd23)
qgsvectortileconnection.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsvectortileconnection.h
3  ---------------------
4  begin : 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 
16 #ifndef QGSVECTORTILECONNECTION_H
17 #define QGSVECTORTILECONNECTION_H
18 
19 #include "qgis_core.h"
20 
22 #define SIP_NO_FILE
23 
24 #include <QStringList>
25 
27 
28 class CORE_EXPORT QgsVectorTileProviderConnection : public QgsAbstractProviderConnection
29 {
30 
31  public:
32  QgsVectorTileProviderConnection( const QString &name );
33  QgsVectorTileProviderConnection( const QString &uri, const QVariantMap &configuration );
34 
35  virtual void store( const QString &name ) const override;
36  virtual void remove( const QString &name ) const override;
37 
39  struct Data
40  {
41  QString url;
42  int zMin = -1;
43  int zMax = -1;
44  };
45 
47  static QString encodedUri( const Data &conn );
49  static Data decodedUri( const QString &uri );
50 
52  static QString encodedLayerUri( const Data &conn );
53 
55  static QStringList connectionList();
57  static Data connection( const QString &name );
59  static void deleteConnection( const QString &name );
61  static void addConnection( const QString &name, Data conn );
63  static QString selectedConnection();
65  static void setSelectedConnection( const QString &connName );
66 };
67 
69 
70 #endif // QGSVECTORTILECONNECTION_H
QgsAbstractProviderConnection::remove
virtual void remove(const QString &name) const =0
Deletes the connection from the settings.
QgsAbstractProviderConnection
The QgsAbstractProviderConnection provides an interface for data provider connections.
Definition: qgsabstractproviderconnection.h:44
QgsAbstractProviderConnection::store
virtual void store(const QString &name) const =0
Stores the connection in the settings.
qgsabstractproviderconnection.h