34 QWidget(parent), mainLayout(this), m_team(team), m_isPlaying(isPlaying), phhoger(0), colorButt(0) |
34 QWidget(parent), mainLayout(this), m_team(team), m_isPlaying(isPlaying), phhoger(0), colorButt(0) |
35 { |
35 { |
36 mainLayout.setSpacing(1); |
36 mainLayout.setSpacing(1); |
37 mainLayout.setMargin(2); |
37 mainLayout.setMargin(2); |
38 this->setMaximumHeight(35); |
38 this->setMaximumHeight(35); |
39 QPixmap* px=new QPixmap(QPixmap(datadir->absolutePath() + "/Forts/" + m_team.Fort + "L.png").scaled(40, 40)); |
39 //QPixmap* px=new QPixmap(QPixmap(datadir->absolutePath() + "/Forts/" + m_team.Fort + "L.png").scaled(40, 40)); |
|
40 QIcon difficultyIcon(QString(":/res/botlevels/%1.png").arg(m_team.difficulty)); |
40 |
41 |
41 QPalette newPalette = palette(); |
42 QPalette newPalette = palette(); |
42 newPalette.setColor(QPalette::Button, palette().color(backgroundRole())); |
43 newPalette.setColor(QPalette::Button, palette().color(backgroundRole())); |
43 |
44 |
44 // team fort |
45 // team fort |
45 QPushButton* butt=new QPushButton(*px, "", this); |
46 QPushButton* butt=new QPushButton(difficultyIcon, "", this); // *px |
46 butt->setFlat(true); |
47 butt->setFlat(true); |
47 butt->setGeometry(0, 0, 30, 30); |
48 butt->setGeometry(0, 0, 30, 30); |
48 butt->setMaximumWidth(30); |
49 butt->setMaximumWidth(30); |
49 butt->setPalette(newPalette); |
50 butt->setPalette(newPalette); |
50 mainLayout.addWidget(butt); |
51 mainLayout.addWidget(butt); |