|
QGIS API Documentation 3.36.0-Maidenhead (09951dc0acf)
|
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. | |
| 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 |
| Registry cannot be copied. | |
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.