552 |
552 |
553 pNetTeamsWidget = new TeamSelWidget(this); |
553 pNetTeamsWidget = new TeamSelWidget(this); |
554 pNetTeamsWidget->setAcceptOuter(true); |
554 pNetTeamsWidget->setAcceptOuter(true); |
555 pageLayout->addWidget(pNetTeamsWidget, 0, 1); |
555 pageLayout->addWidget(pNetTeamsWidget, 0, 1); |
556 |
556 |
|
557 |
|
558 QHBoxLayout * bottomLayout = new QHBoxLayout; |
|
559 pageLayout->addLayout(bottomLayout, 3, 0, 1, 2); |
|
560 |
|
561 BtnBack = addButton(":/res/Exit.png", bottomLayout, 0, true); |
|
562 |
557 BtnGo = new QPushButton(this); |
563 BtnGo = new QPushButton(this); |
558 BtnGo->setFont(*font14); |
564 BtnGo->setFont(*font14); |
559 //BtnGo->setText(QPushButton::tr("Ready")); |
565 //BtnGo->setText(QPushButton::tr("Ready")); |
560 BtnGo->setIcon(QIcon(":/res/lightbulb_off.png")); |
566 BtnGo->setIcon(QIcon(":/res/lightbulb_off.png")); |
561 BtnGo->setIconSize(QSize(25, 34)); |
567 BtnGo->setIconSize(QSize(25, 34)); |
562 pageLayout->addWidget(BtnGo, 3, 1); |
568 BtnGo->setMinimumWidth(50); |
563 |
569 BtnGo->setMinimumHeight(50); |
564 BtnBack = addButton(":/res/Exit.png", pageLayout, 3, 0, true); |
570 bottomLayout->addWidget(BtnGo, 2); |
565 |
571 |
566 BtnMaster = addButton(tr("Control"), pageLayout, 2, 1); |
572 |
|
573 BtnMaster = addButton(tr("Control"), bottomLayout, 3); |
567 QMenu * menu = new QMenu(BtnMaster); |
574 QMenu * menu = new QMenu(BtnMaster); |
568 startGame = new QAction(QAction::tr("Start"), menu); |
575 startGame = new QAction(QAction::tr("Start"), menu); |
569 restrictJoins = new QAction(QAction::tr("Restrict Joins"), menu); |
576 restrictJoins = new QAction(QAction::tr("Restrict Joins"), menu); |
570 restrictJoins->setCheckable(true); |
577 restrictJoins->setCheckable(true); |
571 restrictTeamAdds = new QAction(QAction::tr("Restrict Team Additions"), menu); |
578 restrictTeamAdds = new QAction(QAction::tr("Restrict Team Additions"), menu); |
573 menu->addAction(startGame); |
580 menu->addAction(startGame); |
574 menu->addAction(restrictJoins); |
581 menu->addAction(restrictJoins); |
575 menu->addAction(restrictTeamAdds); |
582 menu->addAction(restrictTeamAdds); |
576 |
583 |
577 BtnMaster->setMenu(menu); |
584 BtnMaster->setMenu(menu); |
|
585 |
|
586 bottomLayout->insertStretch(1, 100); |
578 } |
587 } |
579 |
588 |
580 void PageNetGame::setReadyStatus(bool isReady) |
589 void PageNetGame::setReadyStatus(bool isReady) |
581 { |
590 { |
582 if(isReady) |
591 if(isReady) |
583 BtnGo->setIcon(QIcon(":/res/lightbulb_on.png")); |
592 BtnGo->setIcon(QIcon(":/res/lightbulb_on.png")); |
584 else |
593 else |
585 BtnGo->setIcon(QIcon(":/res/lightbulb_off.png")); |
594 BtnGo->setIcon(QIcon(":/res/lightbulb_off.png")); |
|
595 } |
|
596 |
|
597 void PageNetGame::setMasterMode(bool isMaster) |
|
598 { |
|
599 BtnMaster->setVisible(isMaster); |
586 } |
600 } |
587 |
601 |
588 PageInfo::PageInfo(QWidget* parent) : AbstractPage(parent) |
602 PageInfo::PageInfo(QWidget* parent) : AbstractPage(parent) |
589 { |
603 { |
590 QFont * font14 = new QFont("MS Shell Dlg", 14); |
604 QFont * font14 = new QFont("MS Shell Dlg", 14); |