diff -r fc1e0a4f152c -r 6521e1b2cd40 QTfrontend/teamselect.cpp --- a/QTfrontend/teamselect.cpp Tue Jan 16 22:13:58 2007 +0000 +++ b/QTfrontend/teamselect.cpp Wed Jan 17 19:56:51 2007 +0000 @@ -31,6 +31,8 @@ if(team.netTeam) { framePlaying->addTeam(team, true); curPlayingTeams.push_back(team); + QObject::connect(frameDontPlaying->getTeamWidget(team), SIGNAL(teamStatusChanged(HWTeam)), + this, SLOT(netTeamStatusChanged(const HWTeam&))); } else { frameDontPlaying->addTeam(team, false); curDontPlayingTeams.push_back(team); @@ -39,6 +41,19 @@ } } +void TeamSelWidget::removeNetTeam(const HWTeam& team) +{ + list::iterator itPlay=std::find(curPlayingTeams.begin(), curPlayingTeams.end(), team); + framePlaying->removeTeam(team); + curPlayingTeams.erase(itPlay); +} + +void TeamSelWidget::netTeamStatusChanged(const HWTeam& team) +{ + list::iterator itPlay=std::find(curPlayingTeams.begin(), curPlayingTeams.end(), team); + +} + //void TeamSelWidget::removeTeam(__attribute__ ((unused)) HWTeam team) //{ //curDontPlayingTeams.erase(std::find(curDontPlayingTeams.begin(), curDontPlayingTeams.end(), team)); @@ -54,6 +69,7 @@ if(!willBePlaying) { // playing team => dont playing curDontPlayingTeams.push_back(*itPlay); + emit teamNotPlaying(*itPlay); curPlayingTeams.erase(itPlay); } else { // return if max playing teams reached