QGIS API Documentation 3.41.0-Master (cea29feecf2)
|
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 | |
QgsConnectionRegistry (QObject *parent=nullptr) | |
Constructor for QgsConnectionRegistry. | |
QgsAbstractProviderConnection * | createConnection (const QString &name) |
Creates a new connection by loading the connection with the given id from the settings. | |
QgsConnectionRegistry & | operator= (const QgsConnectionRegistry &other)=delete |
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 24 of file qgsconnectionregistry.cpp.
|
delete |
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 29 of file qgsconnectionregistry.cpp.
|
delete |