QTfrontend/ui/page/pageroomslist.cpp
changeset 9738 18bb6d1fc9d9
parent 9702 27006953d901
child 9997 879fc2f86c36
equal deleted inserted replaced
9737:f0769402350c 9738:18bb6d1fc9d9
   167     showGamesInProgress->setChecked(true);
   167     showGamesInProgress->setChecked(true);
   168     stateMenu->addAction(showGamesInLobby);
   168     stateMenu->addAction(showGamesInLobby);
   169     stateMenu->addAction(showGamesInProgress);
   169     stateMenu->addAction(showGamesInProgress);
   170     btnState->setMenu(stateMenu);
   170     btnState->setMenu(stateMenu);
   171 
   171 
   172     // Clear filters button
       
   173 
       
   174     BtnClear = addButton(tr("Clear filters"), filterLayout, 0);
       
   175     BtnClear->setStyleSheet("padding: 4px;");
       
   176 
       
   177     // Lobby chat
   172     // Lobby chat
   178 
   173 
   179     chatWidget = new HWChatWidget(this, false);
   174     chatWidget = new HWChatWidget(this, false);
   180     m_splitter->addWidget(chatWidget);
   175     m_splitter->addWidget(chatWidget);
   181 
   176 
   197 {
   192 {
   198     connect(chatWidget, SIGNAL(nickCountUpdate(const int)), this, SLOT(updateNickCounter(const int)));
   193     connect(chatWidget, SIGNAL(nickCountUpdate(const int)), this, SLOT(updateNickCounter(const int)));
   199 
   194 
   200     connect(BtnCreate, SIGNAL(clicked()), this, SLOT(onCreateClick()));
   195     connect(BtnCreate, SIGNAL(clicked()), this, SLOT(onCreateClick()));
   201     connect(BtnJoin, SIGNAL(clicked()), this, SLOT(onJoinClick()));
   196     connect(BtnJoin, SIGNAL(clicked()), this, SLOT(onJoinClick()));
   202     connect(BtnClear, SIGNAL(clicked()), this, SLOT(onClearClick()));
       
   203     connect(searchText, SIGNAL(moveUp()), this, SLOT(moveSelectionUp()));
   197     connect(searchText, SIGNAL(moveUp()), this, SLOT(moveSelectionUp()));
   204     connect(searchText, SIGNAL(moveDown()), this, SLOT(moveSelectionDown()));
   198     connect(searchText, SIGNAL(moveDown()), this, SLOT(moveSelectionDown()));
   205     connect(searchText, SIGNAL(returnPressed()), this, SLOT(onJoinClick()));
   199     connect(searchText, SIGNAL(returnPressed()), this, SLOT(onJoinClick()));
   206     connect(roomsList, SIGNAL(doubleClicked (const QModelIndex &)), this, SLOT(onJoinClick()));
   200     connect(roomsList, SIGNAL(doubleClicked (const QModelIndex &)), this, SLOT(onJoinClick()));
   207     connect(roomsList, SIGNAL(clicked (const QModelIndex &)), searchText, SLOT(setFocus()));
   201     connect(roomsList, SIGNAL(clicked (const QModelIndex &)), searchText, SLOT(setFocus()));
   529 void PageRoomsList::onRefreshClick()
   523 void PageRoomsList::onRefreshClick()
   530 {
   524 {
   531     emit askForRoomList();
   525     emit askForRoomList();
   532 }
   526 }
   533 
   527 
   534 void PageRoomsList::onClearClick()
       
   535 {
       
   536     showGamesInLobby->setChecked(true);
       
   537     showGamesInProgress->setChecked(true);
       
   538     searchText->clear();
       
   539     searchText->setFocus();
       
   540 }
       
   541 
       
   542 void PageRoomsList::onJoinConfirmation(const QString & room)
   528 void PageRoomsList::onJoinConfirmation(const QString & room)
   543 {
   529 {
   544 
   530 
   545     QMessageBox reallyJoinMsg(this);
   531     QMessageBox reallyJoinMsg(this);
   546     reallyJoinMsg.setIcon(QMessageBox::Question);
   532     reallyJoinMsg.setIcon(QMessageBox::Question);