def __init__(self, user_id): super().__init__() self.setupUi(self) self.show() self.user_id = user_id self.connectFunction() rows = DB.get_input_list(self.user_id) if rows != []: self.input_id_list = rows[:] for row in rows: self.user.addItem(f'{row[0]}.{row[1]}') rows = DB.load_data_list(self.user_id, 2) if rows != []: self.applied_trainer_list = rows[:] for row in rows: self.applied_trainer.addItem(f'{row[0]}.{row[1]}-{row[2]}') self.input_id = 0 self.target_id = 0
def change_ucs(self, i): self.ids.clear() self.data = [] for row in DB.load_data_list(self.user_id, i): self.ids.addItem(str(row[0]) + "-" + row[1]) self.data.append(row)