31 void TeamLabel::teamButtonClicked() |
32 void TeamLabel::teamButtonClicked() |
32 { |
33 { |
33 emit teamActivated(text()); |
34 emit teamActivated(text()); |
34 } |
35 } |
35 |
36 |
36 TeamShowWidget::TeamShowWidget(HWTeam team, bool isPlaying, FrameTeams * parent) : |
37 TeamShowWidget::TeamShowWidget(const HWTeam & team, bool isPlaying, FrameTeams * parent) : |
37 QWidget(parent), mainLayout(this), m_team(team), m_isPlaying(isPlaying), phhoger(0), |
38 QWidget(parent), mainLayout(this), m_team(team), m_isPlaying(isPlaying), phhoger(0), |
38 colorWidget(0) |
39 colorWidget(0) |
39 { |
40 { |
40 m_parentFrameTeams = parent; |
41 m_parentFrameTeams = parent; |
41 QPalette newPalette = palette(); |
42 QPalette newPalette = palette(); |
71 colorWidget = new ColorWidget(colorsModel, this); |
72 colorWidget = new ColorWidget(colorsModel, this); |
72 colorWidget->setMinimumWidth(26); |
73 colorWidget->setMinimumWidth(26); |
73 colorWidget->setMaximumWidth(26); |
74 colorWidget->setMaximumWidth(26); |
74 colorWidget->setMinimumHeight(26); |
75 colorWidget->setMinimumHeight(26); |
75 colorWidget->setMaximumHeight(26); |
76 colorWidget->setMaximumHeight(26); |
76 //colorWidget->setGeometry(0, 0, 26, 26); |
77 colorWidget->setColor(team.color()); |
77 connect(colorWidget, SIGNAL(colorChanged(int)), this, SLOT(onColorChanged(int))); |
78 connect(colorWidget, SIGNAL(colorChanged(int)), this, SLOT(onColorChanged(int))); |
78 colorWidget->setColor(m_parentFrameTeams->getNextColor()); |
|
79 mainLayout.addWidget(colorWidget); |
79 mainLayout.addWidget(colorWidget); |
80 |
80 |
81 phhoger = new CHedgehogerWidget(QImage(":/res/hh25x25.png"), QImage(":/res/hh25x25grey.png"), this); |
81 phhoger = new CHedgehogerWidget(QImage(":/res/hh25x25.png"), QImage(":/res/hh25x25grey.png"), this); |
82 connect(phhoger, SIGNAL(hedgehogsNumChanged()), this, SLOT(hhNumChanged())); |
82 connect(phhoger, SIGNAL(hedgehogsNumChanged()), this, SLOT(hhNumChanged())); |
83 phhoger->setHHNum(team.numHedgehogs()); |
83 phhoger->setHHNum(team.numHedgehogs()); |