Пример #1
0
 def edit_teams(self):
     dlg = TeamDialog(self.team_list, self.timer.countdown, self.league.autopick)
     if (dlg.exec_() == QtGui.QDialog.Accepted):
         self.league.time_limit = dlg.get_time_limit()
         self.league.autopick = dlg.get_autopick()
         self.save()
         self.timer.set_countdown(self.league.time_limit)
         old_team_list = self.team_list[:]
         self.team_list = dlg.get_team_list()
         if len(old_team_list) != len(self.team_list) or any(i != j for i, j in zip(old_team_list, self.team_list)):
             self.set_draft_view()
Пример #2
0
 def edit_teams(self):
     dlg = TeamDialog(self.league.name, self.team_list, self.timer.countdown, self.league.autopick)
     if (dlg.exec_() == QtGui.QDialog.Accepted):
         self.league.time_limit = dlg.get_time_limit()
         self.league.autopick = dlg.get_autopick()
         self.timer.set_countdown(self.league.time_limit)
         old_team_list = self.team_list[:]
         self.team_list = dlg.get_team_list()
         if len(old_team_list) != len(self.team_list) or any(i != j for i, j in zip(old_team_list, self.team_list)):
             self.set_draft_view()
             ticker_model = []
             for team in self.team_list:
                 img_url = models.Team.find_by_name(team).img_url
                 ticker_model.append( { 'name': team, 'img_url': img_url } )
             self.ticker.set_teams(ticker_model, self.league.roster_count)