Class: QgsOWSSourceSelect

Dialog to create connections and add layers WCS etc.

This dialog allows the user to define and save connection information for WMS servers, etc.

The user can then connect and add layers from the WCS server to the map canvas.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsOWSSourceSelect

Base classes

QgsAbstractDataSourceWidget

Abstract base Data Source Widget to create connections and add layers This class provides common functionality and the interface for all source select dialogs used by data providers to configure data sources and add layers.

QDialog

QWidget

QObject

QPaintDevice

Methods

addDefaultServers

Add a few example servers to the list.

clearCrs

Clear CRSs

clearFormats

Clear previously set formats

clearTimes

Clear times

connName

Connection name

connectionInfo

Connection info (uri)

descriptionForAuthId

Returns a textual description for the authority id

enableLayersForCrs

layer name derived from latest layer selection (updated as long it's not edited manually)

populateConnectionList

Populate the connection list combo box

populateCrs

Sets supported CRSs

populateFormats

Populate supported formats

populateLayerList

Populate the layer list.

populateTimes

Populate times

prepareExtent

Prepares the spatial extent box with the general settings including original crs, destination crs and the map canvas if it is available.

providerFormats

List of image formats (encodings) supported by provider

refresh

Triggered when the provider's connections need to be refreshed

selectedCacheLoadControl

Returns currently selected cache load control

selectedCrs

Returns currently selected Crs

selectedFormat

Returns currently selected format

selectedLayersCrses

Server CRS supported for currently selected layer item(s)

selectedLayersFormats

List of formats supported for currently selected layer item(s)

selectedLayersTimes

List of times (temporalDomain timePosition/timePeriod for currently selected layer item(s)

selectedTime

Returns currently selected time

setConnectionListPosition

Sets the server connection combo box to that stored in the config file.

showError

show whatever error is exposed.

showStatusMessage

Sets status message to theMessage

class qgis.gui.QgsOWSSourceSelect[source]

Bases: QgsAbstractDataSourceWidget

__init__(service: str | None, parent: QWidget | None = None, fl: Qt.WindowFlags | Qt.WindowType = QgsGuiUtils.ModalDialogFlags, widgetMode: QgsProviderRegistry.WidgetMode = QgsProviderRegistry.WidgetMode.Standalone)

Constructor

Parameters:
  • service (Optional[str])

  • parent (Optional[QWidget] = None)

  • fl (Union[Qt.WindowFlags, Qt.WindowType] = QgsGuiUtils.ModalDialogFlags)

  • widgetMode (QgsProviderRegistry.WidgetMode = QgsProviderRegistry.WidgetMode.Standalone)

class SupportedFormat

Bases: object

Formats supported by provider

format
label
addDefaultServers(self)[source]

Add a few example servers to the list.

clearCrs(self)[source]

Clear CRSs

clearFormats(self)[source]

Clear previously set formats

clearTimes(self)[source]

Clear times

connName(self) str[source]

Connection name

Return type:

str

connectionInfo(self) str[source]

Connection info (uri)

Return type:

str

descriptionForAuthId(self, authId: str | None) str[source]

Returns a textual description for the authority id

Parameters:

authId (Optional[str])

Return type:

str

enableLayersForCrs(self, item: QTreeWidgetItem | None)[source]

layer name derived from latest layer selection (updated as long it’s not edited manually)

Parameters:

item (Optional[QTreeWidgetItem])

populateConnectionList(self)[source]

Populate the connection list combo box

populateCrs(self)[source]

Sets supported CRSs

populateFormats(self)[source]

Populate supported formats

populateLayerList(self)[source]

Populate the layer list.

populateTimes(self)[source]

Populate times

prepareExtent(self)[source]

Prepares the spatial extent box with the general settings including original crs, destination crs and the map canvas if it is available.

Added in version 3.26.

providerFormats(self) List[QgsOWSSourceSelect.SupportedFormat]

List of image formats (encodings) supported by provider

Return type:

List[QgsOWSSourceSelect.SupportedFormat]

Returns:

list of format/label pairs

refresh(self)[source]

Triggered when the provider’s connections need to be refreshed

selectedCacheLoadControl(self) QNetworkRequest.CacheLoadControl[source]

Returns currently selected cache load control

Return type:

QNetworkRequest.CacheLoadControl

selectedCrs(self) str[source]

Returns currently selected Crs

Return type:

str

selectedFormat(self) str[source]

Returns currently selected format

Return type:

str

selectedLayersCrses(self) List[str][source]

Server CRS supported for currently selected layer item(s)

Return type:

List[str]

selectedLayersFormats(self) List[str][source]

List of formats supported for currently selected layer item(s)

Return type:

List[str]

selectedLayersTimes(self) List[str][source]

List of times (temporalDomain timePosition/timePeriod for currently selected layer item(s)

Return type:

List[str]

selectedTime(self) str[source]

Returns currently selected time

Return type:

str

setConnectionListPosition(self)[source]

Sets the server connection combo box to that stored in the config file.

showError(self, title: str | None, format: str | None, error: str | None)[source]

show whatever error is exposed.

Parameters:
  • title (Optional[str])

  • format (Optional[str])

  • error (Optional[str])

showStatusMessage(self, message: str | None)[source]

Sets status message to theMessage

Parameters:

message (Optional[str])