202 emit setEnabledGameStart(curPlayingTeams.size()>1); |
202 emit setEnabledGameStart(curPlayingTeams.size()>1); |
203 } |
203 } |
204 |
204 |
205 void TeamSelWidget::addScrArea(FrameTeams* pfteams, QColor color, int maxHeight) |
205 void TeamSelWidget::addScrArea(FrameTeams* pfteams, QColor color, int maxHeight) |
206 { |
206 { |
207 VertScrArea* area=new VertScrArea(color); |
207 VertScrArea* area = new VertScrArea(color); |
208 area->setWidget(pfteams); |
208 area->setWidget(pfteams); |
209 mainLayout.addWidget(area, 30); |
209 mainLayout.addWidget(area, 30); |
210 if (maxHeight > 0) |
210 if (maxHeight > 0) |
211 area->setMaximumHeight(maxHeight); |
211 { |
|
212 area->setMaximumHeight(maxHeight); |
|
213 area->setStyleSheet( |
|
214 "FrameTeams{" |
|
215 "border: solid;" |
|
216 "border-width: 1px;" |
|
217 "border-radius: 16px;" |
|
218 "border-color: #ffcc00;" |
|
219 "}" |
|
220 ); |
|
221 } |
212 } |
222 } |
213 |
223 |
214 TeamSelWidget::TeamSelWidget(QWidget* parent) : |
224 TeamSelWidget::TeamSelWidget(QWidget* parent) : |
215 QGroupBox(parent), mainLayout(this), m_acceptOuter(false) |
225 QGroupBox(parent), mainLayout(this), m_acceptOuter(false) |
216 { |
226 { |
217 setTitle(QGroupBox::tr("Playing teams")); |
227 setTitle(QGroupBox::tr("Playing teams")); |
218 framePlaying = new FrameTeams(); |
228 framePlaying = new FrameTeams(); |
219 framePlaying->setStyleSheet( |
|
220 "FrameTeams{" |
|
221 "border: solid;" |
|
222 "border-width: 1px;" |
|
223 "border-radius: 16px;" |
|
224 "border-color: #ffcc00;" |
|
225 "}" |
|
226 ); |
|
227 frameDontPlaying = new FrameTeams(); |
229 frameDontPlaying = new FrameTeams(); |
228 frameDontPlaying->setStyleSheet( |
|
229 "FrameTeams{" |
|
230 "background-image: url(\":/res/panelbg.png\");" |
|
231 "}" |
|
232 ); |
|
233 |
230 |
234 QPalette p; |
231 QPalette p; |
235 p.setColor(QPalette::Window, QColor(0x00, 0x00, 0x00)); |
232 p.setColor(QPalette::Window, QColor(0x00, 0x00, 0x00)); |
236 addScrArea(framePlaying, p.color(QPalette::Window).light(105), 200); |
233 addScrArea(framePlaying, p.color(QPalette::Window).light(105), 200); |
237 addScrArea(frameDontPlaying, p.color(QPalette::Window).dark(105), 0); |
234 addScrArea(frameDontPlaying, p.color(QPalette::Window).dark(105), 0); |