QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
|
A registry for saved data provider connections, allowing retrieval of saved connections by name and provider type. More...
#include <qgsconnectionregistry.h>
Public Member Functions | |
QgsConnectionRegistry (const QgsConnectionRegistry &other)=delete | |
Registry cannot be copied. More... | |
QgsConnectionRegistry (QObject *parent=nullptr) | |
Constructor for QgsConnectionRegistry. More... | |
QgsAbstractProviderConnection * | createConnection (const QString &name) SIP_THROW(QgsProviderConnectionException) |
Creates a new connection by loading the connection with the given id from the settings. More... | |
QgsConnectionRegistry & | operator= (const QgsConnectionRegistry &other)=delete |
Registry cannot be copied. More... | |
A registry for saved data provider connections, allowing retrieval of saved connections by name and provider type.
QgsConnectionRegistry is not usually directly created, but rather accessed through QgsApplication::connectionRegistry().
Definition at line 38 of file qgsconnectionregistry.h.
QgsConnectionRegistry::QgsConnectionRegistry | ( | QObject * | parent = nullptr | ) |
Constructor for QgsConnectionRegistry.
Definition at line 23 of file qgsconnectionregistry.cpp.
|
delete |
Registry cannot be copied.
QgsAbstractProviderConnection * QgsConnectionRegistry::createConnection | ( | const QString & | name | ) |
Creates a new connection by loading the connection with the given id from the settings.
The id string must be of the format "provider://connection_name", e.g. "postgres://my_connection" for the PostgreSQL connection saved as "my_connection".
Ownership is transferred to the caller.
QgsProviderConnectionException |
Definition at line 28 of file qgsconnectionregistry.cpp.
|
delete |
Registry cannot be copied.