1 #include "teamselhelper.h" |
1 #include "teamselhelper.h" |
2 |
2 |
3 #include <QPixmap> |
3 #include <QPixmap> |
4 #include <QPushButton> |
4 #include <QPushButton> |
|
5 #include "hwconsts.h" |
5 |
6 |
6 void TeamLabel::teamButtonClicked() |
7 void TeamLabel::teamButtonClicked() |
7 { |
8 { |
8 emit teamActivated(text()); |
9 emit teamActivated(text()); |
9 } |
10 } |
10 |
11 |
11 TeamShowWidget::TeamShowWidget(HWTeam team, QWidget * parent) : |
12 TeamShowWidget::TeamShowWidget(HWTeam team, QWidget * parent) : |
12 QWidget(parent), mainLayout(this), m_team(team) |
13 QWidget(parent), mainLayout(this), m_team(team) |
13 { |
14 { |
14 this->setMaximumHeight(40); |
15 this->setMaximumHeight(40); |
15 QPixmap* px=new QPixmap(QPixmap(QString("../share/hedgewars/Data/Forts/")+m_team.Fort+"L.png").scaled(40, 40)); |
16 QPixmap* px=new QPixmap(QPixmap(datadir->absolutePath() + "/Forts/" + m_team.Fort + "L.png").scaled(40, 40)); |
16 |
17 |
17 QPushButton* butt=new QPushButton(*px, "", this); |
18 QPushButton* butt=new QPushButton(*px, "", this); |
18 butt->setFlat(true); |
19 butt->setFlat(true); |
19 butt->setGeometry(0, 0, 30, 30); |
20 butt->setGeometry(0, 0, 30, 30); |
20 butt->setMaximumWidth(30); |
21 butt->setMaximumWidth(30); |