def tbChonTu_click(self): dialogKey = Ui_Dialog(server.numClientLeft) value = dialogKey.exec_() if value: self.tbChonTu.setText(value) if self.rbTuTrai.isChecked(): firstName = 'Left_' else: firstName = 'Right_' if self.tbChonTu.text( ) == '0': #neu bang khong thi luc chong ket cac tu la nhu nhau if firstName[0] == 'L' and server.numClientLeft > 0: self.tbLCKHienTai.setText( str(int(server.dataSent2Client["Left_1"].dt2Pi2Ar[4]))) elif firstName[0] == 'R' and server.numClientRight > 0: self.tbLCKHienTai.setText( str(int(server.dataSent2Client["Right_1"].dt2Pi2Ar[4]))) else: self.tbLCKHienTai.setText('0') else: self.tbLCKHienTai.setText( str( int(server.dataSent2Client[ firstName + self.tbChonTu.text()].dt2Pi2Ar[4])))
def tbNumTu_click(self): numMaxLeft = server.numClientLeft + server.numClientRight + 1 dialogKey = Ui_Dialog(numMaxLeft) value = dialogKey.exec_() if value: self.tbNumTu.setText(value)
def tbInput_click(self): dialogKey = Ui_Dialog(31) value = dialogKey.exec_() if value: if int(value) < 16: self.tbInput.setText("16") self.tbInput.setText(value) self.tbInput.setStyleSheet( "background-color: #b6ffb2") #b6ffb2 #81D4FA
def btMoTu_click(self): #chong doi phim if (self.btClickTimer): return else: self.buttonTimer() maxTu = server.numClientLeft + server.numClientRight + 1 dialogKey = Ui_Dialog(maxTu) value = dialogKey.exec_() if value: nameTu = server.serverMain.getNameOfTu(int(value)) if nameTu[0] == 'H': return server.tuTraiPhai = nameTu[0] if server.isWaiting == 2: server.dongMoTuFunction(2, nameTu) elif server.isWaiting == 0: server.dongMoTuFunction(1, nameTu)
def tbYear_click(self): dialogKey = Ui_Dialog(3000) value = dialogKey.exec_() if value: self.tbYear.setText(value)
def tbMonth_click(self): dialogKey = Ui_Dialog(12) value = dialogKey.exec_() if value: self.tbMonth.setText(value)
def tbDay_click(self): dialogKey = Ui_Dialog(31) value = dialogKey.exec_() if value: self.tbDay.setText(value)
def tbKCCaiDat_click(self): dialogKey = Ui_Dialog(10) value = dialogKey.exec_() if value: self.tbKCCaiDat.setText(value)
def btSecond_click(self): dialogKey = Ui_Dialog(60) value = dialogKey.exec_() if value: self.tbSecond.setText(value)
def btPhut_click(self): dialogKey = Ui_Dialog(60) value = dialogKey.exec_() if value: self.tbPhut.setText(value)
def btGio_click(self): dialogKey = Ui_Dialog(24) value = dialogKey.exec_() if value: self.tbGio.setText(value)
def tbGio_click(self): dialogKey = Ui_Dialog(24) value = dialogKey.exec_() if value: self.tbGio.setText(value) self.timeSplit[0] = str(value)
def tbTimes_click(self): dialogKey = Ui_Dialog(60) value = dialogKey.exec_() if value: self.tbTimes.setText(value) self.timeSplit[2] = str(value)
def tbPhut_click(self): dialogKey = Ui_Dialog(60) value = dialogKey.exec_() if value: self.tbPhut.setText(value) self.timeSplit[1] = str(value)
def tbHumiTo_click(self): dialogKey = Ui_Dialog(100) value = dialogKey.exec_() if value: self.tbHumiTo.setText(value)
def tbTempFrom_click(self): dialogKey = Ui_Dialog(60) value = dialogKey.exec_() if value: self.tbTempFrom.setText(value)