def populateConnectionList(self): self.cmbConnections.blockSignals(True) self.cmbConnections.clear() keys = QgsOWSConnection.connectionList("SOS") self.cmbConnections.addItems (keys) self.cmbConnections.blockSignals(False) index = self.cmbConnections.findText(QgsOWSConnection.selectedConnection("SOS")) self.cmbConnections.setCurrentIndex(index) self.on_cmbConnections_currentIndexChanged (QgsOWSConnection.selectedConnection("SOS")) QgsDebug ("populateConnectionList: selectedConnection = {}".format(QgsOWSConnection.selectedConnection("SOS")))
def populateConnectionList(self): self.cmbConnections.blockSignals(True) self.cmbConnections.clear() keys = QgsOWSConnection.connectionList("SOS") self.cmbConnections.addItems(keys) self.cmbConnections.blockSignals(False) index = self.cmbConnections.findText( QgsOWSConnection.selectedConnection("SOS")) self.cmbConnections.setCurrentIndex(index) self.on_cmbConnections_currentIndexChanged( QgsOWSConnection.selectedConnection("SOS")) QgsDebug("populateConnectionList: selectedConnection = {}".format( QgsOWSConnection.selectedConnection("SOS")))
def on_btnConnect_clicked(self): self.cmbOfferings.clear() self.htmlView.setText ("") self.btnAdd.setEnabled(False) self.btnConnect.setEnabled(False) connection = QgsOWSConnection("SOS", QgsOWSConnection.selectedConnection("SOS")) url = str(connection.uri().param('url')) QgsMessageLog.logMessage(self.tr("Connecting to {url}").format(url=url), "SosClient", QgsMessageLog.INFO) if url != "" : self.executeRequest(SensorObservationService.capabilitiesUrl(url), self.capabilitiesRequest)
def on_cmbConnections_currentIndexChanged (self, text): text = str(text) if QgsOWSConnection.selectedConnection("SOS") != text: QgsOWSConnection.setSelectedConnection("SOS", text) if text != "": self.btnConnect.setEnabled(True) self.btnEdit.setEnabled(True) self.btnDelete.setEnabled(True) else: self.btnConnect.setEnabled(False) self.btnEdit.setEnabled(False) self.btnDelete.setEnabled(False)
def on_cmbConnections_currentIndexChanged(self, text): text = str(text) if QgsOWSConnection.selectedConnection("SOS") != text: QgsOWSConnection.setSelectedConnection("SOS", text) if text != "": self.btnConnect.setEnabled(True) self.btnEdit.setEnabled(True) self.btnDelete.setEnabled(True) else: self.btnConnect.setEnabled(False) self.btnEdit.setEnabled(False) self.btnDelete.setEnabled(False)
def on_btnConnect_clicked(self): self.cmbOfferings.clear() self.htmlView.setText("") self.btnAdd.setEnabled(False) self.btnConnect.setEnabled(False) connection = QgsOWSConnection( "SOS", QgsOWSConnection.selectedConnection("SOS")) url = str(connection.uri().param('url')) QgsMessageLog.logMessage( self.tr("Connecting to {url}").format(url=url), "SosClient", QgsMessageLog.INFO) if url != "": self.executeRequest(SensorObservationService.capabilitiesUrl(url), self.capabilitiesRequest)