QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | List of all members
QgsSensorThingsProviderConnection Class Reference

Represents connections to SensorThings data sources. More...

#include <qgssensorthingsconnection.h>

Inheritance diagram for QgsSensorThingsProviderConnection:
Inheritance graph
[legend]

Classes

struct  Data
 Represents decoded data of a SensorThings connection. More...
 

Public Member Functions

PRIVATE QgsSensorThingsProviderConnection (const QString &name)
 Constructor for QgsSensorThingsProviderConnection, using the stored settings with the specified connection name.
 
 QgsSensorThingsProviderConnection (const QString &uri, const QVariantMap &configuration)
 Constructor for QgsSensorThingsProviderConnection, using the a specific connection uri and configuration.
 
void remove (const QString &name) const final
 Deletes the connection from the settings.
 
void store (const QString &name) const final
 Stores the connection in the settings.
 
- Public Member Functions inherited from QgsAbstractProviderConnection
 QgsAbstractProviderConnection (const QString &name)
 Creates a new connection with name by reading its configuration from the settings.
 
 QgsAbstractProviderConnection (const QString &uri, const QVariantMap &configuration)
 Creates a new connection from the given uri and configuration.
 
virtual ~QgsAbstractProviderConnection ()=default
 
QVariantMap configuration () const
 Returns the connection configuration parameters.
 
virtual QIcon icon () const
 Returns an icon representing the connection.
 
void setConfiguration (const QVariantMap &configuration)
 Sets the connection configuration.
 
void setUri (const QString &uri)
 Sets the connection data source URI to uri.
 
QString uri () const
 Returns the connection data source URI string representation.
 

Static Public Member Functions

static void addConnection (const QString &name, const Data &connection)
 Stores a new connection, under the specified connection name.
 
static Data connection (const QString &name)
 Returns connection details for the stored connection with the specified name.
 
static QStringList connectionList ()
 Returns a list of the stored connection names.
 
static Data decodedUri (const QString &uri)
 Returns a connection uri decoded to a data structure.
 
static QString encodedLayerUri (const Data &data)
 Returns connection data encoded as a string containing a URI for a SensorThings vector data provider.
 
static QString encodedUri (const Data &data)
 Returns connection data encoded as a string.
 
static QString selectedConnection ()
 Returns the name of the last used connection.
 
static void setSelectedConnection (const QString &name)
 Stores the name of the last used connection.
 

Detailed Description

Represents connections to SensorThings data sources.

Note
Not available in Python bindings.
Since
QGIS 3.36

Definition at line 43 of file qgssensorthingsconnection.h.

Constructor & Destructor Documentation

◆ QgsSensorThingsProviderConnection() [1/2]

QgsSensorThingsProviderConnection::QgsSensorThingsProviderConnection ( const QString &  name)

Constructor for QgsSensorThingsProviderConnection, using the stored settings with the specified connection name.

Definition at line 33 of file qgssensorthingsconnection.cpp.

◆ QgsSensorThingsProviderConnection() [2/2]

QgsSensorThingsProviderConnection::QgsSensorThingsProviderConnection ( const QString &  uri,
const QVariantMap &  configuration 
)

Constructor for QgsSensorThingsProviderConnection, using the a specific connection uri and configuration.

Definition at line 40 of file qgssensorthingsconnection.cpp.

Member Function Documentation

◆ addConnection()

void QgsSensorThingsProviderConnection::addConnection ( const QString &  name,
const Data connection 
)
static

Stores a new connection, under the specified connection name.

Definition at line 66 of file qgssensorthingsconnection.cpp.

◆ connection()

QgsSensorThingsProviderConnection::Data QgsSensorThingsProviderConnection::connection ( const QString &  name)
static

Returns connection details for the stored connection with the specified name.

Definition at line 75 of file qgssensorthingsconnection.cpp.

◆ connectionList()

QStringList QgsSensorThingsProviderConnection::connectionList ( )
static

Returns a list of the stored connection names.

Definition at line 92 of file qgssensorthingsconnection.cpp.

◆ decodedUri()

QgsSensorThingsProviderConnection::Data QgsSensorThingsProviderConnection::decodedUri ( const QString &  uri)
static

Returns a connection uri decoded to a data structure.

See also
encodedUri()
encodedLayerUri()

Definition at line 113 of file qgssensorthingsconnection.cpp.

◆ encodedLayerUri()

QString QgsSensorThingsProviderConnection::encodedLayerUri ( const Data data)
static

Returns connection data encoded as a string containing a URI for a SensorThings vector data provider.

See also
encodedUri()
decodedUri()

Definition at line 128 of file qgssensorthingsconnection.cpp.

◆ encodedUri()

QString QgsSensorThingsProviderConnection::encodedUri ( const Data data)
static

Returns connection data encoded as a string.

See also
encodedLayerUri()
decodedUri()

Definition at line 97 of file qgssensorthingsconnection.cpp.

◆ remove()

void QgsSensorThingsProviderConnection::remove ( const QString &  name) const
finalvirtual

Deletes the connection from the settings.

Implements QgsAbstractProviderConnection.

Definition at line 51 of file qgssensorthingsconnection.cpp.

◆ selectedConnection()

QString QgsSensorThingsProviderConnection::selectedConnection ( )
static

Returns the name of the last used connection.

See also
setSelectedConnection()

Definition at line 56 of file qgssensorthingsconnection.cpp.

◆ setSelectedConnection()

void QgsSensorThingsProviderConnection::setSelectedConnection ( const QString &  name)
static

Stores the name of the last used connection.

See also
selectedConnection()

Definition at line 61 of file qgssensorthingsconnection.cpp.

◆ store()

void QgsSensorThingsProviderConnection::store ( const QString &  name) const
finalvirtual

Stores the connection in the settings.

Parameters
namethe name under which the connection will be stored

Implements QgsAbstractProviderConnection.

Definition at line 45 of file qgssensorthingsconnection.cpp.


The documentation for this class was generated from the following files: