41 if ( !data.
url.isEmpty() )
52 return uri.encodedUri();
61 conn.
url = dsUri.
param( QStringLiteral(
"url" ) );
84 return uri.encodedUri();
89 return QgsTiledSceneProviderConnection::sTreeConnectionTiledScene->items();
94 if ( !settingsUrl->exists( name ) )
98 conn.
provider = settingsProvider->value( name );
99 conn.
url = settingsUrl->value( name );
100 conn.
authCfg = settingsAuthcfg->value( name );
101 conn.
username = settingsUsername->value( name );
102 conn.
password = settingsPassword->value( name );
104 if ( settingsHeaders->exists( name ) )
112 settingsProvider->setValue( conn.
provider, name );
113 settingsUrl->setValue( conn.
url, name );
114 settingsAuthcfg->setValue( conn.
authCfg, name );
115 settingsUsername->setValue( conn.
username, name );
116 settingsPassword->setValue( conn.
password, name );
122 return sTreeConnectionTiledScene->selectedItem();
127 sTreeConnectionTiledScene->setSelectedItem( name );
134 mProvider = connectionData.
provider;
140 , mProvider( provider )
147 connectionData.
provider = mProvider;
153 sTreeConnectionTiledScene->deleteItem( name );
The QgsAbstractProviderConnection provides an interface for data provider connections.
void setUri(const QString &uri)
Sets the connection data source URI to uri.
QString uri() const
Returns the connection data source URI string representation.
Class for storing the component parts of a RDBMS data source URI (e.g.
void setEncodedUri(const QByteArray &uri)
Sets the complete encoded uri.
QgsHttpHeaders httpHeaders() const
Returns http headers.
QString param(const QString &key) const
Returns a generic parameter value corresponding to the specified key.
QString username() const
Returns the username stored in the URI.
void setParam(const QString &key, const QString &value)
Sets a generic parameter value on the URI.
QString password() const
Returns the password stored in the URI.
QString authConfigId() const
Returns any associated authentication configuration ID stored in the URI.
A string list settings entry.
virtual void remove(const QString &name) const override
Deletes the connection from the settings.
static QString selectedConnection()
Returns the name of the last used connection.
static Data decodedUri(const QString &uri)
Returns a connection uri decoded to a data structure.
virtual void store(const QString &name) const override
Stores the connection in the settings.
static Data connection(const QString &name)
Returns connection details for the stored connection with the specified name.
PRIVATE QgsTiledSceneProviderConnection(const QString &name)
Constructor for QgsTiledSceneProviderConnection, using the stored settings with the specified connect...
static void addConnection(const QString &name, const Data &connection)
Stores a new connection, under the specified connection name.
static void setSelectedConnection(const QString &name)
Stores the name of the last used connection.
static QStringList connectionList()
Returns a list of the stored connection names.
static QString encodedUri(const Data &data)
Returns connection data encoded as a string.
static QString encodedLayerUri(const Data &data)
Returns connection data encoded as a string containing a URI for a QgsTiledSceneLayer.
Represents decoded data of a tiled scene connection.
QString authCfg
Authentication configuration ID.
QString password
HTTP Basic password.
QString provider
Provider key.
QString username
HTTP Basic username.
QgsHttpHeaders httpHeaders
HTTP headers.