def updateStats(self): year = self.cmbYear.currentText() sMonth = self.cmbMonth.currentText() if sMonth is not "" and sMonth is not None: month = key_from_value(self.months, sMonth) day = self.cmbDay.currentText() else: month = "" day = "" data = LibStats.getMonth(year, month, day) self.txtApostado.setText(str(data[0]) + self.coin) self.txtGanancias.setText(str(data[1]) + self.coin) self.txtPerdidas.setText(str(data[2]) + self.coin) self.txtBeneficio.setText(str(data[3]) + self.coin) self.txtPendiente.setText(str(data[4]) + self.coin) self.txtYield.setText(str(data[5])) self.txtCuota.setText(str(data[6])) self.txtApuestas.setText(str(data[7])) self.txtAciertos.setText(str(data[8])) self.txtFallos.setText(str(data[9])) self.txtNulos.setText(str(data[10])) self.txtAcierto.setText(str(data[11])) self.txtApuestaMedia.setText(str(data[12]) + self.coin)
def initData(self): self.years, self.months = LibStats.getYears() self.cmbYear.addItems(self.years.keys()) self.updateMonths()