Class: QgsOWSSourceSelect¶
- class qgis.gui.QgsOWSSourceSelect¶
Bases:
QgsAbstractDataSourceWidget
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.
QgsOWSSourceSelect(service: str, parent: QWidget = None, fl: Union[Qt.WindowFlags, Qt.WindowType] = QgsGuiUtils.ModalDialogFlags, widgetMode: QgsProviderRegistry.WidgetMode = QgsProviderRegistry.WidgetMode.None) Constructor
Methods
Returns the add Button
Add a few example servers to the list.
Returns the associated browser model (may be
None
).Clear CRSs
Clear previously set formats
Clear times
Connection name
Connection info (uri)
Returns a textual description for the authority id
layer name derived from latest layer selection (updated as long it's not edited manually)
Populate the connection list combo box
Sets supported CRSs
Populate supported formats
Populate the layer list.
Populate times
Prepares the spatial extent box with the general settings including original crs, destination crs and the map canvas if it is available.
List of image formats (encodings) supported by provider
Triggered when the provider's connections need to be refreshed
Returns currently selected cache load control
Returns currently selected Crs
Returns currently selected format
Server CRS supported for currently selected layer item(s)
List of formats supported for currently selected layer item(s)
List of times (temporalDomain timePosition/timePeriod for currently selected layer item(s)
Returns currently selected time
Sets the server connection combo box to that stored in the config file.
- param mapCanvas:
Connect the ok and apply/add buttons to the slots
show whatever error is exposed.
Sets status message to theMessage
Returns the widget mode
- class SupportedFormat¶
- class SupportedFormat(QgsOWSSourceSelect.SupportedFormat)
Bases:
sip.wrapper
- 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: PyQt5.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)¶
- 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], PyQt5.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.
- populateTimes(self)¶
Populate times
- prepareExtent(self)¶
Prepares the spatial extent box with the general settings including original crs, destination crs and the map canvas if it is available.
New in version 3.26.
- providerFormats(self) List[QgsOWSSourceSelect.SupportedFormat] ¶
List of image formats (encodings) supported by provider
- Return type:
- 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.
- setMapCanvas(self, mapCanvas: QgsMapCanvas)¶
- Parameters:
mapCanvas (QgsMapCanvas) –
- setupButtons(self, buttonBox: QDialogButtonBox)¶
Connect the ok and apply/add buttons to the slots
- 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