From 6a44855a5cdc819ca9046fb81b61a7209792df1e Mon Sep 17 00:00:00 2001 From: Matt Lowe Date: Sun, 23 Nov 2014 00:36:50 +0100 Subject: [PATCH 1/3] Added double click to join a room Can now double click on a room in the lobby to join --- cockatrice/src/gameselector.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cockatrice/src/gameselector.cpp b/cockatrice/src/gameselector.cpp index 25bf2ebd..475768da 100644 --- a/cockatrice/src/gameselector.cpp +++ b/cockatrice/src/gameselector.cpp @@ -76,6 +76,7 @@ GameSelector::GameSelector(AbstractClient *_client, const TabSupervisor *_tabSup connect(joinButton, SIGNAL(clicked()), this, SLOT(actJoin())); connect(spectateButton, SIGNAL(clicked()), this, SLOT(actJoin())); + connect(gameListView, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(actJoin())); } void GameSelector::actSetFilter() From 9e349d8b886cc94de1cdf0a37b8827e162088c7b Mon Sep 17 00:00:00 2001 From: Matt Lowe Date: Sun, 23 Nov 2014 00:46:54 +0100 Subject: [PATCH 2/3] Added "ENTER" to join a room Can now join a room by highlighting a room and pressing ENTER. Works nice with arrow navigation. --- cockatrice/src/gameselector.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cockatrice/src/gameselector.cpp b/cockatrice/src/gameselector.cpp index 475768da..eef42706 100644 --- a/cockatrice/src/gameselector.cpp +++ b/cockatrice/src/gameselector.cpp @@ -77,6 +77,7 @@ GameSelector::GameSelector(AbstractClient *_client, const TabSupervisor *_tabSup connect(joinButton, SIGNAL(clicked()), this, SLOT(actJoin())); connect(spectateButton, SIGNAL(clicked()), this, SLOT(actJoin())); connect(gameListView, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(actJoin())); + connect(gameListView, SIGNAL(activated(const QModelIndex &)), this, SLOT(actJoin())); } void GameSelector::actSetFilter() From bbcfe84d088775897544d9db019cb81853b936c5 Mon Sep 17 00:00:00 2001 From: Matt Lowe Date: Sun, 23 Nov 2014 20:01:09 +0100 Subject: [PATCH 3/3] Added double click/Enter for Server tab Added the same functionality to the server tab --- cockatrice/src/tab_server.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cockatrice/src/tab_server.cpp b/cockatrice/src/tab_server.cpp index b82248a3..4fba193b 100644 --- a/cockatrice/src/tab_server.cpp +++ b/cockatrice/src/tab_server.cpp @@ -52,6 +52,8 @@ RoomSelector::RoomSelector(AbstractClient *_client, QWidget *parent) setLayout(vbox); connect(client, SIGNAL(listRoomsEventReceived(const Event_ListRooms &)), this, SLOT(processListRoomsEvent(const Event_ListRooms &))); + connect(roomList, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(joinClicked())); + connect(roomList, SIGNAL(activated(const QModelIndex &)), this, SLOT(joinClicked())); client->sendCommand(client->prepareSessionCommand(Command_ListRooms())); }