53 sTreeSensorThingsConnections->deleteItem( name );
58 return sTreeSensorThingsConnections->selectedItem();
63 sTreeSensorThingsConnections->setSelectedItem( name );
68 settingsUrl->setValue( conn.
url, name );
69 settingsAuthcfg->setValue( conn.
authCfg, name );
70 settingsUsername->setValue( conn.
username, name );
71 settingsPassword->setValue( conn.
password, name );
77 if ( !settingsUrl->exists( name ) )
81 conn.
url = settingsUrl->value( name );
82 conn.
authCfg = settingsAuthcfg->value( name );
83 conn.
username = settingsUsername->value( name );
84 conn.
password = settingsPassword->value( name );
86 if ( settingsHeaders->exists( name ) )
94 return QgsSensorThingsProviderConnection::sTreeSensorThingsConnections->items();
100 if ( !data.
url.isEmpty() )
110 return uri.encodedUri();
119 conn.
url = dsUri.
param( QStringLiteral(
"url" ) );
142 return uri.uri(
false );
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.
static QString selectedConnection()
Returns the name of the last used connection.
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 SensorThings vector data provider.
void remove(const QString &name) const final
Deletes the connection from the settings.
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 Data connection(const QString &name)
Returns connection details for the stored connection with the specified name.
PRIVATE QgsSensorThingsProviderConnection(const QString &name)
Constructor for QgsSensorThingsProviderConnection, using the stored settings with the specified conne...
static Data decodedUri(const QString &uri)
Returns a connection uri decoded to a data structure.
void store(const QString &name) const final
Stores the connection in the settings.
static void addConnection(const QString &name, const Data &connection)
Stores a new connection, under the specified connection name.
A string list settings entry.
Represents decoded data of a SensorThings connection.
QString password
HTTP Basic password.
QString username
HTTP Basic username.
QgsHttpHeaders httpHeaders
HTTP headers.
QString authCfg
Authentication configuration id.