QTfrontend/ui/page/pagenetgame.cpp
changeset 6539 3222bb0612ca
parent 6227 ce60b734fff1
child 6616 f77bb02b669f
equal deleted inserted replaced
6538:5a1f49d84d95 6539:3222bb0612ca
    65     leRoomName = new HistoryLineEdit(this,10);
    65     leRoomName = new HistoryLineEdit(this,10);
    66     leRoomName->setMaxLength(60);
    66     leRoomName->setMaxLength(60);
    67     leRoomName->setMinimumWidth(200);
    67     leRoomName->setMinimumWidth(200);
    68     leRoomName->setMaximumWidth(400);
    68     leRoomName->setMaximumWidth(400);
    69 
    69 
       
    70     //Button to signify whether the player is ready to start playing
    70     BtnGo = new QPushButton(this);
    71     BtnGo = new QPushButton(this);
    71     BtnGo->setToolTip(QPushButton::tr("Ready"));
    72     BtnGo->setToolTip(QPushButton::tr("Ready"));
    72     BtnGo->setIcon(QIcon(":/res/lightbulb_off.png"));
    73     BtnGo->setIcon(QIcon(":/res/lightbulb_off.png"));
    73     BtnGo->setIconSize(QSize(25, 34));
    74     BtnGo->setIconSize(QSize(25, 34));
    74     BtnGo->setMinimumWidth(50);
    75     BtnGo->setMinimumWidth(50);
    75     BtnGo->setMinimumHeight(50);
    76     BtnGo->setMinimumHeight(50);
    76 
       
    77 
    77 
    78     bottomLayout->addWidget(leRoomName);
    78     bottomLayout->addWidget(leRoomName);
    79     BtnUpdate = addButton(QAction::tr("Update"), bottomLayout, 1);
    79     BtnUpdate = addButton(QAction::tr("Update"), bottomLayout, 1);
    80 
    80 
    81     bottomLayout->addStretch();
    81     bottomLayout->addStretch();
   170 {
   170 {
   171     BtnMaster->setVisible(isMaster);
   171     BtnMaster->setVisible(isMaster);
   172     BtnStart->setVisible(isMaster);
   172     BtnStart->setVisible(isMaster);
   173     BtnUpdate->setVisible(isMaster);
   173     BtnUpdate->setVisible(isMaster);
   174     leRoomName->setVisible(isMaster);
   174     leRoomName->setVisible(isMaster);
       
   175 
       
   176     //disable the `toggle ready` button, because the start button does the same
       
   177     //job when the user is chief
       
   178     BtnGo->setVisible(!isMaster);
   175 }
   179 }
   176 
   180 
   177 void PageNetGame::setUser(const QString & nickname)
   181 void PageNetGame::setUser(const QString & nickname)
   178 {
   182 {
   179     pChatWidget->setUser(nickname);
   183     pChatWidget->setUser(nickname);