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 class for Data Source widgets to create connections and add layers.

QDialog

QWidget

QObject

QPaintDevice

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

virtual 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

virtual 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.

virtual providerFormats(self) List[QgsOWSSourceSelect.SupportedFormat]

List of image formats (encodings) supported by provider

Return type:

List[QgsOWSSourceSelect.SupportedFormat]

Returns:

list of format/label pairs

virtual 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

virtual selectedLayersCrses(self) List[str][source]

Server CRS supported for currently selected layer item(s)

Return type:

List[str]

virtual selectedLayersFormats(self) List[str][source]

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

Return type:

List[str]

virtual 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])