def on_btnDelete_clicked(self): msg = str( self. tr("Are you sure you want to remove the %s connection and all associated settings?" )) % (self.cmbConnections.currentText()) result = QtGui.QMessageBox.information( self, self.tr("Confirm Delete"), msg, QtGui.QMessageBox.Ok | QtGui.QMessageBox.Cancel) if result == QtGui.QMessageBox.Ok: QgsOWSConnection.deleteConnection( "SOS", self.cmbConnections.currentText()) self.populateConnectionList()
def on_btnDelete_clicked(self): msg = str (self.tr("Are you sure you want to remove the %s connection and all associated settings?")) % (self.cmbConnections.currentText()) result = QtGui.QMessageBox.information(self, self.tr("Confirm Delete"), msg, QtGui.QMessageBox.Ok | QtGui.QMessageBox.Cancel) if result == QtGui.QMessageBox.Ok : QgsOWSConnection.deleteConnection("SOS", self.cmbConnections.currentText()) self.populateConnectionList()