void PageRoomsList::connectSignals() { connect(chatWidget, SIGNAL(nickCountUpdate(const int)), this, SLOT(updateNickCounter(const int))); connect(BtnCreate, SIGNAL(clicked()), this, SLOT(onCreateClick())); connect(BtnJoin, SIGNAL(clicked()), this, SLOT(onJoinClick())); connect(searchText, SIGNAL(moveUp()), this, SLOT(moveSelectionUp())); connect(searchText, SIGNAL(moveDown()), this, SLOT(moveSelectionDown())); connect(searchText, SIGNAL(returnPressed()), this, SLOT(onJoinClick())); connect(roomsList, SIGNAL(doubleClicked (const QModelIndex &)), this, SLOT(onJoinClick())); connect(roomsList, SIGNAL(clicked (const QModelIndex &)), searchText, SLOT(setFocus())); connect(showGamesInLobby, SIGNAL(triggered()), this, SLOT(onFilterChanged())); connect(showGamesInProgress, SIGNAL(triggered()), this, SLOT(onFilterChanged())); connect(showPassword, SIGNAL(triggered()), this, SLOT(onFilterChanged())); connect(showJoinRestricted, SIGNAL(triggered()), this, SLOT(onFilterChanged())); connect(searchText, SIGNAL(textChanged (const QString &)), this, SLOT(onFilterChanged())); connect(this, SIGNAL(askJoinConfirmation (const QString &)), this, SLOT(onJoinConfirmation(const QString &)), Qt::QueuedConnection); // Set focus on search box connect(this, SIGNAL(pageEnter()), searchText, SLOT(setFocus())); // sorting connect(roomsList->horizontalHeader(), SIGNAL(sortIndicatorChanged(int, Qt::SortOrder)), this, SLOT(onSortIndicatorChanged(int, Qt::SortOrder))); }
void PageMain::connectSignals() { #ifndef QT_DEBUG connect(this, SIGNAL(pageEnter()), this, SLOT(updateTip())); #endif connect(BtnNet, SIGNAL(clicked()), this, SLOT(toggleNetworkChoice())); //connect(BtnNetLocal, SIGNAL(clicked()), this, SLOT(toggleNetworkChoice())); //connect(BtnNetOfficial, SIGNAL(clicked()), this, SLOT(toggleNetworkChoice())); // TODO: add signal-forwarding required by (currently missing) encapsulation }
void AbstractPage::triggerPageEnter() { emit pageEnter(); }