equal
deleted
inserted
replaced
42 availableColors.push_back(*color6); |
42 availableColors.push_back(*color6); |
43 |
43 |
44 resetColors(); |
44 resetColors(); |
45 } |
45 } |
46 |
46 |
47 void FrameTeams::setNonInteractive() |
47 void FrameTeams::setInteractivity(bool interactive) |
48 { |
48 { |
49 nonInteractive=true; |
49 nonInteractive = !interactive; |
50 for(tmapTeamToWidget::iterator it=teamToWidget.begin(); it!=teamToWidget.end(); ++it) { |
50 for(tmapTeamToWidget::iterator it=teamToWidget.begin(); it!=teamToWidget.end(); ++it) { |
51 TeamShowWidget* pts=dynamic_cast<TeamShowWidget*>(it.value()); |
51 TeamShowWidget* pts = dynamic_cast<TeamShowWidget*>(it.value()); |
52 if(!pts) throw; |
52 if(!pts) throw; |
53 pts->setNonInteractive(); |
53 pts->setInteractivity(interactive); |
54 } |
54 } |
55 } |
55 } |
56 |
56 |
57 void FrameTeams::resetColors() |
57 void FrameTeams::resetColors() |
58 { |
58 { |
59 currentColor=availableColors.begin(); |
59 currentColor=availableColors.begin(); |
68 } |
68 } |
69 |
69 |
70 void FrameTeams::addTeam(HWTeam team, bool willPlay) |
70 void FrameTeams::addTeam(HWTeam team, bool willPlay) |
71 { |
71 { |
72 TeamShowWidget* pTeamShowWidget = new TeamShowWidget(team, willPlay, this); |
72 TeamShowWidget* pTeamShowWidget = new TeamShowWidget(team, willPlay, this); |
73 if(nonInteractive) pTeamShowWidget->setNonInteractive(); |
73 if(nonInteractive) pTeamShowWidget->setInteractivity(false); |
74 // int hght=teamToWidget.empty() ? 0 : teamToWidget.begin()->second->size().height(); |
74 // int hght=teamToWidget.empty() ? 0 : teamToWidget.begin()->second->size().height(); |
75 mainLayout.addWidget(pTeamShowWidget); |
75 mainLayout.addWidget(pTeamShowWidget); |
76 teamToWidget.insert(team, pTeamShowWidget); |
76 teamToWidget.insert(team, pTeamShowWidget); |
77 QResizeEvent* pevent=new QResizeEvent(parentWidget()->size(), parentWidget()->size()); |
77 QResizeEvent* pevent=new QResizeEvent(parentWidget()->size(), parentWidget()->size()); |
78 QCoreApplication::postEvent(parentWidget(), pevent); |
78 QCoreApplication::postEvent(parentWidget(), pevent); |