author | displacer |
Fri, 18 Aug 2006 20:46:43 +0000 | |
changeset 118 | fac200ee771c |
parent 117 | d21a48200772 |
child 120 | 87264c35b09a |
permissions | -rw-r--r-- |
80 | 1 |
#include "teamselhelper.h" |
2 |
||
3 |
#include <QPixmap> |
|
4 |
#include <QPushButton> |
|
5 |
||
6 |
void TeamLabel::teamButtonClicked() |
|
7 |
{ |
|
8 |
emit teamActivated(text()); |
|
9 |
} |
|
10 |
||
117 | 11 |
TeamShowWidget::TeamShowWidget(HWTeam team, QWidget * parent) : |
80 | 12 |
QWidget(parent), mainLayout(this), m_team(team) |
13 |
{ |
|
86
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
84
diff
changeset
|
14 |
this->setMaximumHeight(40); |
80 | 15 |
QLabel* pixlbl=new QLabel(); |
118 | 16 |
pixlbl->setPixmap(QPixmap(QString("../share/hedgewars/Data/Forts/")+m_team.Fort+"L.png").scaledToHeight(30)); |
80 | 17 |
mainLayout.addWidget(pixlbl); |
18 |
||
117 | 19 |
TeamLabel* lbl=new TeamLabel(team.TeamName); |
80 | 20 |
mainLayout.addWidget(lbl); |
21 |
||
22 |
QPushButton* butt=new QPushButton("o"); |
|
84 | 23 |
butt->setGeometry(0, 0, 25, 25); |
86
664b536a1c27
Predefined teams, 'simple game' doesn't need to create team
unc0rr
parents:
84
diff
changeset
|
24 |
butt->setMaximumWidth(30); |
80 | 25 |
mainLayout.addWidget(butt); |
26 |
||
27 |
QObject::connect(butt, SIGNAL(clicked()), this, SLOT(activateTeam())); |
|
28 |
} |
|
29 |
||
30 |
void TeamShowWidget::activateTeam() |
|
31 |
{ |
|
32 |
emit teamStatusChanged(m_team); |
|
33 |
} |