QTfrontend/frameTeam.cpp
changeset 132 2d0f404cdf05
parent 117 d21a48200772
child 134 3d87d8e58020
equal deleted inserted replaced
131:482f78c595ec 132:2d0f404cdf05
     9 FrameTeams::FrameTeams(QWidget* parent) :
     9 FrameTeams::FrameTeams(QWidget* parent) :
    10   QWidget(parent), mainLayout(this)
    10   QWidget(parent), mainLayout(this)
    11 {
    11 {
    12 }
    12 }
    13 
    13 
    14 void FrameTeams::addTeam(HWTeam team)
    14 void FrameTeams::addTeam(HWTeam team, bool willPlay)
    15 {
    15 {
    16   TeamShowWidget* pTeamShowWidget =new TeamShowWidget(team, this);
    16   TeamShowWidget* pTeamShowWidget =new TeamShowWidget(team, willPlay, this);
    17 //  int hght=teamToWidget.empty() ? 0 : teamToWidget.begin()->second->size().height();
    17 //  int hght=teamToWidget.empty() ? 0 : teamToWidget.begin()->second->size().height();
    18   teamToWidget.insert(make_pair(team, pTeamShowWidget));
    18   teamToWidget.insert(make_pair(team, pTeamShowWidget));
    19   mainLayout.addWidget(pTeamShowWidget);
    19   mainLayout.addWidget(pTeamShowWidget);
    20   QResizeEvent* pevent=new QResizeEvent(parentWidget()->size(), parentWidget()->size());
    20   QResizeEvent* pevent=new QResizeEvent(parentWidget()->size(), parentWidget()->size());
    21   QCoreApplication::postEvent(parentWidget(), pevent);
    21   QCoreApplication::postEvent(parentWidget(), pevent);