QTfrontend/ui/page/pagenetgame.cpp
changeset 8377 869f80966a77
parent 8179 a1ffcb559f99
child 8382 67e257b98422
equal deleted inserted replaced
8376:c11cc7246df7 8377:869f80966a77
    38 
    38 
    39     // chatwidget
    39     // chatwidget
    40     chatWidget = new HWChatWidget(this, true);
    40     chatWidget = new HWChatWidget(this, true);
    41     chatWidget->setShowFollow(false); // don't show follow in nicks' context menus
    41     chatWidget->setShowFollow(false); // don't show follow in nicks' context menus
    42     chatWidget->setIgnoreListKick(true); // kick ignored players automatically
    42     chatWidget->setIgnoreListKick(true); // kick ignored players automatically
    43     pageLayout->addWidget(chatWidget, 2, 0, 1, 2);
    43     pageLayout->addWidget(chatWidget, 1, 0, 1, 2);
    44     pageLayout->setRowStretch(1, 100);
    44     pageLayout->setRowStretch(0, 0);
    45     pageLayout->setRowStretch(2, 100);
    45     pageLayout->setRowStretch(1, 0);
    46 
    46 
    47     pGameCFG = new GameCFGWidget(this);
    47     pGameCFG = new GameCFGWidget(this);
    48     pageLayout->addWidget(pGameCFG, 0, 0);
    48     pageLayout->addWidget(pGameCFG, 0, 0);
    49 
    49 
    50     btnSetup = new QPushButton(this);
       
    51     btnSetup->setText(QPushButton::tr("Setup"));
       
    52     pageLayout->addWidget(btnSetup, 1, 0);
       
    53 
       
    54     pNetTeamsWidget = new TeamSelWidget(this);
    50     pNetTeamsWidget = new TeamSelWidget(this);
    55     pNetTeamsWidget->setAcceptOuter(true);
    51     pNetTeamsWidget->setAcceptOuter(true);
    56     pageLayout->addWidget(pNetTeamsWidget, 0, 1, 2, 1);
    52     pNetTeamsWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
       
    53     pageLayout->addWidget(pNetTeamsWidget, 0, 1, 1, 1);
    57 
    54 
    58     return pageLayout;
    55     return pageLayout;
       
    56 }
       
    57 
       
    58 QLayout * PageNetGame::footerLayoutLeftDefinition()
       
    59 {
       
    60     QHBoxLayout * bottomLeftLayout = new QHBoxLayout();
       
    61     
       
    62     btnSetup = addButton(":/res/Settings.png", bottomLeftLayout, 0, true);
       
    63     btnSetup->setWhatsThis(tr("Edit game preferences"));
       
    64 
       
    65     return bottomLeftLayout;
    59 }
    66 }
    60 
    67 
    61 QLayout * PageNetGame::footerLayoutDefinition()
    68 QLayout * PageNetGame::footerLayoutDefinition()
    62 {
    69 {
    63     QHBoxLayout * bottomLayout = new QHBoxLayout;
    70     QHBoxLayout * bottomLayout = new QHBoxLayout;
    82     bottomLayout->addWidget(BtnGo);
    89     bottomLayout->addWidget(BtnGo);
    83 
    90 
    84     BtnMaster = addButton(tr("Control"), bottomLayout, 3);
    91     BtnMaster = addButton(tr("Control"), bottomLayout, 3);
    85     bottomLayout->insertStretch(3, 100);
    92     bottomLayout->insertStretch(3, 100);
    86 
    93 
    87     BtnStart = addButton(QAction::tr("Start"), bottomLayout, 3);
    94     const QIcon& lp = QIcon(":/res/Start.png");
       
    95     QSize sz = lp.actualSize(QSize(65535, 65535));
       
    96     BtnStart = new QPushButton();
       
    97     BtnStart->setText(tr("Start"));
       
    98     BtnStart->setMinimumWidth(sz.width() + 60);
       
    99     BtnStart->setIcon(lp);
       
   100     BtnStart->setFixedHeight(50);
       
   101     BtnStart->setIconSize(sz);
       
   102     BtnStart->setFlat(true);
       
   103     BtnStart->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
       
   104     bottomLayout->addWidget(BtnStart);
    88 
   105 
    89     return bottomLayout;
   106     return bottomLayout;
    90 }
   107 }
    91 
   108 
    92 void PageNetGame::connectSignals()
   109 void PageNetGame::connectSignals()