QTfrontend/teamselect.cpp
changeset 152 c558957ef644
parent 151 9eb5a4cee35e
child 153 dc10da2a73f9
equal deleted inserted replaced
151:9eb5a4cee35e 152:c558957ef644
    95   for (QStringList::ConstIterator it = teamslist.begin(); it != teamslist.end(); ++it ) {
    95   for (QStringList::ConstIterator it = teamslist.begin(); it != teamslist.end(); ++it ) {
    96     addTeam(*it);
    96     addTeam(*it);
    97   }
    97   }
    98 }
    98 }
    99 
    99 
   100 bool TeamSelWidget::isPlaying(HWTeam team)
   100 bool TeamSelWidget::isPlaying(HWTeam team) const
   101 {
   101 {
   102   return std::find(curPlayingTeams.begin(), curPlayingTeams.end(), team)!=curPlayingTeams.end();
   102   return std::find(curPlayingTeams.begin(), curPlayingTeams.end(), team)!=curPlayingTeams.end();
   103 }
   103 }
   104 
   104 
   105 unsigned char TeamSelWidget::numHedgedogs(HWTeam team)
   105 list<HWTeam> TeamSelWidget::getPlayingTeams() const
   106 {
   106 {
   107   TeamShowWidget* tsw=dynamic_cast<TeamShowWidget*>(framePlaying->getTeamWidget(team));
   107   return curPlayingTeams;
       
   108 }
       
   109 
       
   110 unsigned char TeamSelWidget::numHedgedogs(HWTeam team) const
       
   111 {
       
   112   const TeamShowWidget* tsw=dynamic_cast<TeamShowWidget*>(framePlaying->getTeamWidget(team));
   108   if(!tsw) return 0;
   113   if(!tsw) return 0;
   109   return tsw->getHedgehogsNum();
   114   return tsw->getHedgehogsNum();
   110 }
   115 }