Class: QgsOWSSourceSelect

class qgis.gui.QgsOWSSourceSelect(service: str, parent: QWidget = None, fl: Union[Qt.WindowFlags, Qt.WindowType] = QgsGuiUtils.ModalDialogFlags, widgetMode: QgsProviderRegistry.WidgetMode = QgsProviderRegistry.WidgetMode.None)

Bases: QgsAbstractDataSourceWidget

Constructor

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.

Parameters
  • service (str) –

  • parent (QWidget = None) –

  • fl (Union[Qt.WindowFlags) –

  • widgetMode

class SupportedFormat

Bases: sip.wrapper

QgsOWSSourceSelect.SupportedFormat(QgsOWSSourceSelect.SupportedFormat)

format
label
actionEvent(self, QActionEvent)
addButton(self) → QPushButton

Returns the add Button

addDefaultServers(self)

Add a few example servers to the list.

browserModel(self)QgsBrowserModel

Returns the associated browser model (may be None).

New in version 3.18.

changeEvent(self, QEvent)
childEvent(self, QChildEvent)
clearCrs(self)

Clear CRSs

clearFormats(self)

Clear previously set formats

clearTimes(self)

Clear times

closeEvent(self, QCloseEvent)
connName(self) → str

Connection name

Return type

str

connectNotify(self, QMetaMethod)
connectionInfo(self) → str

Connection info (uri)

Return type

str

contextMenuEvent(self, QContextMenuEvent)
create(self, window: sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
customEvent(self, QEvent)
descriptionForAuthId(self, authId: str) → str

Returns a textual description for the authority id

Parameters

authId (str) –

Return type

str

destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
disconnectNotify(self, QMetaMethod)
dragEnterEvent(self, QDragEnterEvent)
dragLeaveEvent(self, QDragLeaveEvent)
dragMoveEvent(self, QDragMoveEvent)
dropEvent(self, QDropEvent)
enableLayersForCrs(self, item: QTreeWidgetItem)

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

Parameters

item (QTreeWidgetItem) –

enterEvent(self, QEvent)
event(self, QEvent) → bool
eventFilter(self, QObject, QEvent) → bool
focusInEvent(self, QFocusEvent)
focusNextChild(self) → bool
focusNextPrevChild(self, bool) → bool
focusOutEvent(self, QFocusEvent)
focusPreviousChild(self) → bool
hideEvent(self, QHideEvent)
initPainter(self, QPainter)
inputMethodEvent(self, QInputMethodEvent)
isSignalConnected(self, QMetaMethod) → bool
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
leaveEvent(self, QEvent)
mapCanvas(self)QgsMapCanvas

Returns the map canvas (can be None)

metric(self, QPaintDevice.PaintDeviceMetric) → int
mouseDoubleClickEvent(self, QMouseEvent)
mouseMoveEvent(self, QMouseEvent)
mousePressEvent(self, QMouseEvent)
mouseReleaseEvent(self, QMouseEvent)
moveEvent(self, QMoveEvent)
nativeEvent(self, Union[QByteArray, bytes, bytearray], sip.voidptr) → Tuple[bool, int]
paintEvent(self, QPaintEvent)
populateConnectionList(self)

Populate the connection list combo box

populateCrs(self)

Sets supported CRSs

populateFormats(self)

Populate supported formats

populateLayerList(self)

Populate the layer list.

Returns

False if the layers could not be retrieved or parsed

populateTimes(self)

Populate times

providerFormats(self) → List[QgsOWSSourceSelect.SupportedFormat]

List of image formats (encodings) supported by provider

Return type

List[QgsOWSSourceSelect.SupportedFormat]

Returns

list of format/label pairs

receivers(self, PYQT_SIGNAL) → int
refresh(self)

Triggered when the provider’s connections need to be refreshed

reset(self)
resizeEvent(self, QResizeEvent)
selectedCacheLoadControl(self) → QNetworkRequest.CacheLoadControl

Returns currently selected cache load control

Return type

QNetworkRequest.CacheLoadControl

selectedCrs(self) → str

Returns currently selected Crs

Return type

str

selectedFormat(self) → str

Returns currently selected format

Return type

str

selectedLayersCrses(self) → List[str]

Server CRS supported for currently selected layer item(s)

Return type

List[str]

selectedLayersFormats(self) → List[str]

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

Return type

List[str]

selectedLayersTimes(self) → List[str]

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

Return type

List[str]

selectedTime(self) → str

Returns currently selected time

Return type

str

sender(self) → QObject
senderSignalIndex(self) → int
setConnectionListPosition(self)

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

setupButtons(self, buttonBox: QDialogButtonBox)

Connect the ok and apply/add buttons to the slots

sharedPainter(self) → QPainter
showError(self, title: str, format: str, error: str)

show whatever error is exposed.

Parameters
  • title (str) –

  • format (str) –

  • error (str) –

showEvent(self, QShowEvent)
showStatusMessage(self, message: str)

Sets status message to theMessage

Parameters

message (str) –

tabletEvent(self, QTabletEvent)
timerEvent(self, QTimerEvent)
updateMicroFocus(self)
wheelEvent(self, QWheelEvent)
widgetMode(self) → QgsProviderRegistry.WidgetMode

Returns the widget mode