def onOkBtnClicked(self): strPort = utils.qstr2str(self.ui.portCmbBox.currentText()) if not strPort.isdigit(): return port = int(strPort) if not utils.isPortOk(port): return self.emit(signals.SIG_CREATE_TCP_CLIENT, utils.qstr2str(self.ui.ipCmbBox.currentText()), port) self.close()
def onOkBtnClicked(self): strPort = utils.qstr2str(self.ui.portCmbBox.currentText()) if not strPort.isdigit(): return port = int(strPort) if not utils.isPortOk(port): return self.emit(self.okSig, utils.qstr2str(self.ui.ipCmbBox.currentText()), port) self.close()
def onBroadcastBtnClicked(self): curIp = utils.qstr2str(self.ui.ipCmbBox.currentText()) if curIp in ("127.0.0.1", "0.0.0.0"): return broadcastIp = utils.getBroadcastIp(curIp) if broadcastIp is None: return self.ui.ipCmbBox.setEditText(broadcastIp)
def onOkBtnClicked(self): strRemotePort = utils.qstr2str(self.ui.remotePortCmbBox.currentText()) strLocalPort = utils.qstr2str(self.ui.localPortCmbBox.currentText()) localPort = 0 if not self.ui.sysPortCbx.isChecked(): if not strLocalPort.isdigit(): return localPort = int(strLocalPort) if not utils.isPortOk(localPort): return if not strRemotePort.isdigit(): return remotePort = int(strRemotePort) if not utils.isPortOk(remotePort): return self.emit(signals.SIG_CREATE_UDP_CLIENT, utils.qstr2str(self.ui.ipCmbBox.currentText()), remotePort, localPort) self.close()