Class: QgsOwsConnection¶
Connections management for OWS connections.
Class Hierarchy¶
Base classes¶
Methods
Returns connection info string. |
|
Returns the connection name. |
|
Returns a string representing the service type, e.g. "WMS". |
|
Returns the connection uri. |
Static Methods
Adds uri parameters relating to the settings for a WFS connection to a |
|
Adds uri parameters relating to the settings for a WMS or WCS connection to a |
|
Returns the list of connections for the specified service |
|
Deletes the connection for the specified service with the specified name |
|
Retrieves the selected connection for the specified service |
|
Marks the specified connection for the specified service as selected |
- class qgis.core.QgsOwsConnection[source]¶
Bases:
QObject
- __init__(service: str | None, connName: str | None)
Constructor
- Parameters:
service (Optional[str]) – service name: WMS,WFS,WCS
connName (Optional[str]) – connection name
- static addWfsConnectionSettings(uri: QgsDataSourceUri, settingsKey: str | None) QgsDataSourceUri ¶
Adds uri parameters relating to the settings for a WFS connection to a
QgsDataSourceUri
uri
. Connection settings are taken from the specified QSettingssettingsKey
.Deprecated since version 3.26: Use addWfsConnectionSettings with service and connection name parameters.
- Parameters:
uri (
QgsDataSourceUri
)settingsKey (Optional[str])
- Return type:
- static addWfsConnectionSettings(uri: QgsDataSourceUri, service: str | None, connName: str | None) QgsDataSourceUri
Adds uri parameters relating to the settings for a WFS connection to a
QgsDataSourceUri
uri
. Connection settings are taken from the specifiedservcie
andconnName
Added in version 3.26.
- Parameters:
uri (
QgsDataSourceUri
)service (Optional[str])
connName (Optional[str])
- Return type:
- static addWmsWcsConnectionSettings(uri: QgsDataSourceUri, settingsKey: str | None) QgsDataSourceUri ¶
Adds uri parameters relating to the settings for a WMS or WCS connection to a
QgsDataSourceUri
uri
. Connection settings are taken from the specified QSettingssettingsKey
.Deprecated since version 3.26: Use addWmsWcsConnectionSettings with service and connection name parameters.
- Parameters:
uri (
QgsDataSourceUri
)settingsKey (Optional[str])
- Return type:
- static addWmsWcsConnectionSettings(uri: QgsDataSourceUri, service: str | None, connName: str | None) QgsDataSourceUri
Adds uri parameters relating to the settings for a WMS or WCS connection to a
QgsDataSourceUri
uri
. Connection settings are taken from the specifiedservcie
andconnName
Added in version 3.26.
- Parameters:
uri (
QgsDataSourceUri
)service (Optional[str])
connName (Optional[str])
- Return type:
- static connectionList(service: str | None) List[str] [source]¶
Returns the list of connections for the specified service
- Parameters:
service (Optional[str])
- Return type:
List[str]
- static deleteConnection(service: str | None, name: str | None)[source]¶
Deletes the connection for the specified service with the specified name
- Parameters:
service (Optional[str])
name (Optional[str])
- static selectedConnection(service: str | None) str [source]¶
Retrieves the selected connection for the specified service
- Parameters:
service (Optional[str])
- Return type:
str
- service(self) str [source]¶
Returns a string representing the service type, e.g. “WMS”.
- Return type:
str
- static setSelectedConnection(service: str | None, name: str | None)[source]¶
Marks the specified connection for the specified service as selected
- Parameters:
service (Optional[str])
name (Optional[str])
- uri(self) QgsDataSourceUri [source]¶
Returns the connection uri.
- Return type: