def rf_fun_1(self): number_number = int(self.linemyedit.text())-1 baseball_1.get_database2("rf") name = baseball_1.get_name_batting("rf",number_number) text_data = "AVERAGE "+str(name[1])+"\n"+"OEF "+str(name[2])+"\n"+"WAR "+str(name[4]) self.textEdit.setText(text_data) judge = baseball_1.get_picture_2(name[0]) self.label.setScaledContents(True) self.lineEdit.setText(name[0]) if(judge==1): self.label.setPixmap(QtGui.QPixmap(_fromUtf8("images/"+name[0]+".jpg"))) elif(judge==2): self.label.setPixmap(QtGui.QPixmap(_fromUtf8("images/"+name[0]+".png"))) name = baseball_1.get_name_fielding("rf",number_number) print name[0] judge = baseball_1.get_picture_2(str(name[0])) self.label_2.setScaledContents(True) self.lineEdit_2.setText(name[0]) text_data = "AVERAGE "+str(name[1])+"\n"+"DEF "+str(name[3])+"\n"+"WAR "+str(name[4]) self.textEdit_2.setText(text_data) if(judge==1): self.label_2.setPixmap(QtGui.QPixmap(_fromUtf8("images/"+name[0]+".jpg"))) elif(judge==2): self.label_2.setPixmap(QtGui.QPixmap(_fromUtf8("images/"+name[0]+".png")))
def pitcher_fun_1(self): baseball_1.get_database2("lf") name = baseball_1.get_name_batting("lf",number_number) judge = baseball_1.get_picture_2(name) self.label.setScaledContents(True) self.lineEdit.setText(name) if(judge==1): self.label.setPixmap(QtGui.QPixmap(_fromUtf8("images/"+name+".jpg"))) elif(judge==2): self.label.setPixmap(QtGui.QPixmap(_fromUtf8("images/"+name+".png"))) name = baseball_1.get_name_fielding("lf",number_number) judge = baseball_1.get_picture_2(name) self.label_2.setScaledContents(True) self.lineEdit_2.setText(name) if(judge==1): self.label_2.setPixmap(QtGui.QPixmap(_fromUtf8("images/"+name+".jpg"))) elif(judge==2): self.label_2.setPixmap(QtGui.QPixmap(_fromUtf8("images/"+name+".png")))