diff -r 29b477319854 -r 3c3dc6a148ca QTfrontend/frameTeam.cpp --- a/QTfrontend/frameTeam.cpp Sun Jul 16 08:13:51 2006 +0000 +++ b/QTfrontend/frameTeam.cpp Thu Jul 20 20:11:32 2006 +0000 @@ -1,39 +1,38 @@ -#include "frameTeam.h" -#include "teamselhelper.h" - -#include -#include - -#include -using namespace std; - -FrameTeams::FrameTeams(QWidget* parent) : - QWidget(parent), mainLayout(this) -{ -} - -void FrameTeams::addTeam(tmprop team) -{ - TeamShowWidget* pTeamShowWidget =new TeamShowWidget(team, this); - int hght=teamToWidget.empty() ? 0 : teamToWidget.begin()->second->size().height(); - teamToWidget.insert(make_pair(team, pTeamShowWidget)); - mainLayout.addWidget(pTeamShowWidget); - QResizeEvent* pevent=new QResizeEvent(parentWidget()->size(), parentWidget()->size()); - QCoreApplication::postEvent(parentWidget(), pevent); -} - -void FrameTeams::removeTeam(tmprop team) -{ - tmapTeamToWidget::iterator it=teamToWidget.find(team); - mainLayout.removeWidget(it->second); - delete it->second; - teamToWidget.erase(team); -} - -QWidget* FrameTeams::getTeamWidget(tmprop team) -{ - tmapTeamToWidget::iterator it=teamToWidget.find(team); - QWidget* ret = it!=teamToWidget.end() ? it->second : 0; - if(!ret) throw; // FIXME: this is debug exception - return ret; -} +#include "frameTeam.h" +#include "teamselhelper.h" + +#include +#include + +using namespace std; + +FrameTeams::FrameTeams(QWidget* parent) : + QWidget(parent), mainLayout(this) +{ +} + +void FrameTeams::addTeam(tmprop team) +{ + TeamShowWidget* pTeamShowWidget =new TeamShowWidget(team, this); + int hght=teamToWidget.empty() ? 0 : teamToWidget.begin()->second->size().height(); + teamToWidget.insert(make_pair(team, pTeamShowWidget)); + mainLayout.addWidget(pTeamShowWidget); + QResizeEvent* pevent=new QResizeEvent(parentWidget()->size(), parentWidget()->size()); + QCoreApplication::postEvent(parentWidget(), pevent); +} + +void FrameTeams::removeTeam(tmprop team) +{ + tmapTeamToWidget::iterator it=teamToWidget.find(team); + mainLayout.removeWidget(it->second); + delete it->second; + teamToWidget.erase(team); +} + +QWidget* FrameTeams::getTeamWidget(tmprop team) +{ + tmapTeamToWidget::iterator it=teamToWidget.find(team); + QWidget* ret = it!=teamToWidget.end() ? it->second : 0; + if(!ret) throw; // FIXME: this is debug exception + return ret; +}