QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
qgstiledsceneconnection.h
Go to the documentation of this file.
1/***************************************************************************
2 qgstiledsceneconnection.h
3 ---------------------
4 begin : 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
16#ifndef QGSTILEDSCENECONNECTION_H
17#define QGSTILEDSCENECONNECTION_H
18
19#include "qgis_core.h"
20#include "qgssettingstree.h"
21#include "qgssettingstreenode.h"
22
23#define SIP_NO_FILE
24
25#include <QStringList>
26
28#include "qgshttpheaders.h"
29
33
43{
44
45 public:
46
47#ifndef SIP_RUN
48
51
52 static const QgsSettingsEntryString *settingsProvider;
53 static const QgsSettingsEntryString *settingsUrl;
54 static const QgsSettingsEntryString *settingsAuthcfg;
55 static const QgsSettingsEntryString *settingsUsername;
56 static const QgsSettingsEntryString *settingsPassword;
57 static const QgsSettingsEntryVariantMap *settingsHeaders;
58
60#endif
61
65 QgsTiledSceneProviderConnection( const QString &name );
66
70 QgsTiledSceneProviderConnection( const QString &uri, const QString &provider, const QVariantMap &configuration );
71
72 virtual void store( const QString &name ) const override;
73 virtual void remove( const QString &name ) const override;
74
78 QString providerKey() const { return mProvider; }
79
88 struct Data
89 {
91 QString provider;
92
94 QString url;
95
97 QString authCfg;
98
100 QString username;
101
103 QString password;
104
107
108 };
109
116 static QString encodedUri( const Data &data );
117
124 static Data decodedUri( const QString &uri );
125
132 static QString encodedLayerUri( const Data &data );
133
137 static QStringList connectionList();
138
142 static Data connection( const QString &name );
143
147 static void addConnection( const QString &name, const Data &connection );
148
154 static QString selectedConnection();
155
161 static void setSelectedConnection( const QString &name );
162
163 private:
164
165 QString mProvider;
166};
167
168#endif // QGSTILEDSCENECONNECTION_H
@ NamedListSelectedItemSetting
Creates a setting to store which is the current item.
The QgsAbstractProviderConnection provides an interface for data provider connections.
virtual void remove(const QString &name) const =0
Deletes the connection from the settings.
virtual void store(const QString &name) const =0
Stores the connection in the settings.
This class implements simple http header management.
An integer settings entry.
A string settings entry.
A string list settings entry.
QgsSettingsTreeNamedListNode is a named list tree node for the settings tree to help organizing and i...
QgsSettingsTreeNamedListNode * createNamedListNode(const QString &key, const Qgis::SettingsTreeNodeOptions &options=Qgis::SettingsTreeNodeOptions())
Creates a named list tree node.
static QgsSettingsTreeNode * sTreeConnections
Represents connections to tiled scene data sources.
QString providerKey() const
Returns the data provider associated with the connection.
Represents decoded data of a tiled scene connection.
QString authCfg
Authentication configuration ID.