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 QIcon difficultyIcon(QString(":/res/botlevels/%1.png").arg(m_team.difficulty)); |
40 QIcon* difficultyIcon=new QIcon(QString(":/res/botlevels/%1.png").arg(m_team.difficulty)); |
|
41 |
40 |
42 QPalette newPalette = palette(); |
41 QPalette newPalette = palette(); |
43 newPalette.setColor(QPalette::Button, palette().color(backgroundRole())); |
42 newPalette.setColor(QPalette::Button, palette().color(backgroundRole())); |
44 |
43 |
45 // team fort |
44 // team fort |
46 QPushButton* butt=new QPushButton(*difficultyIcon, "", this); // *px |
45 QPushButton* butt=new QPushButton(difficultyIcon, "", this); |
47 butt->setFlat(true); |
46 butt->setFlat(true); |
48 butt->setGeometry(0, 0, 30, 30); |
47 butt->setGeometry(0, 0, 30, 30); |
49 butt->setMaximumWidth(30); |
48 butt->setMaximumWidth(30); |
50 butt->setPalette(newPalette); |
49 butt->setPalette(newPalette); |
51 mainLayout.addWidget(butt); |
50 mainLayout.addWidget(butt); |