summaryrefslogtreecommitdiffstats
path: root/src/citra_qt
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2017-02-18 11:26:57 +0100
committerYuri Kunde Schlesner <yuriks@yuriks.net>2017-02-18 11:26:57 +0100
commit5b96915c6992fb5446f2cc1fba49e21152730f0b (patch)
tree52e7145f6f7419f9774dc34fc89be881c509df97 /src/citra_qt
parentQt: Re-organize setup of debugging widgets (diff)
downloadyuzu-5b96915c6992fb5446f2cc1fba49e21152730f0b.tar
yuzu-5b96915c6992fb5446f2cc1fba49e21152730f0b.tar.gz
yuzu-5b96915c6992fb5446f2cc1fba49e21152730f0b.tar.bz2
yuzu-5b96915c6992fb5446f2cc1fba49e21152730f0b.tar.lz
yuzu-5b96915c6992fb5446f2cc1fba49e21152730f0b.tar.xz
yuzu-5b96915c6992fb5446f2cc1fba49e21152730f0b.tar.zst
yuzu-5b96915c6992fb5446f2cc1fba49e21152730f0b.zip
Diffstat (limited to 'src/citra_qt')
-rw-r--r--src/citra_qt/main.cpp35
-rw-r--r--src/citra_qt/main.h1
2 files changed, 23 insertions, 13 deletions
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp
index 96ec42214..05709fcb0 100644
--- a/src/citra_qt/main.cpp
+++ b/src/citra_qt/main.cpp
@@ -66,6 +66,7 @@ GMainWindow::GMainWindow() : config(new Config()), emu_thread(nullptr) {
SetDefaultUIGeometry();
RestoreUIState();
+ ConnectMenuEvents();
ConnectWidgetEvents();
setWindowTitle(QString("Citra | %1-%2").arg(Common::g_scm_branch, Common::g_scm_desc));
@@ -231,26 +232,34 @@ void GMainWindow::RestoreUIState() {
}
void GMainWindow::ConnectWidgetEvents() {
- connect(game_list, SIGNAL(GameChosen(QString)), this, SLOT(OnGameListLoadFile(QString)),
- Qt::DirectConnection);
+ connect(game_list, SIGNAL(GameChosen(QString)), this, SLOT(OnGameListLoadFile(QString)));
connect(game_list, SIGNAL(OpenSaveFolderRequested(u64)), this,
- SLOT(OnGameListOpenSaveFolder(u64)), Qt::DirectConnection);
- connect(ui.action_Configure, SIGNAL(triggered()), this, SLOT(OnConfigure()));
- connect(ui.action_Load_File, SIGNAL(triggered()), this, SLOT(OnMenuLoadFile()),
- Qt::DirectConnection);
- connect(ui.action_Load_Symbol_Map, SIGNAL(triggered()), this, SLOT(OnMenuLoadSymbolMap()));
- connect(ui.action_Select_Game_List_Root, SIGNAL(triggered()), this,
- SLOT(OnMenuSelectGameListRoot()));
- connect(ui.action_Start, SIGNAL(triggered()), this, SLOT(OnStartGame()));
- connect(ui.action_Pause, SIGNAL(triggered()), this, SLOT(OnPauseGame()));
- connect(ui.action_Stop, SIGNAL(triggered()), this, SLOT(OnStopGame()));
- connect(ui.action_Single_Window_Mode, SIGNAL(triggered(bool)), this, SLOT(ToggleWindowMode()));
+ SLOT(OnGameListOpenSaveFolder(u64)));
connect(this, SIGNAL(EmulationStarting(EmuThread*)), render_window,
SLOT(OnEmulationStarting(EmuThread*)));
connect(this, SIGNAL(EmulationStopping()), render_window, SLOT(OnEmulationStopping()));
}
+void GMainWindow::ConnectMenuEvents() {
+ // File
+ connect(ui.action_Load_File, &QAction::triggered, this, &GMainWindow::OnMenuLoadFile);
+ connect(ui.action_Load_Symbol_Map, &QAction::triggered, this,
+ &GMainWindow::OnMenuLoadSymbolMap);
+ connect(ui.action_Select_Game_List_Root, &QAction::triggered, this,
+ &GMainWindow::OnMenuSelectGameListRoot);
+
+ // Emulation
+ connect(ui.action_Start, &QAction::triggered, this, &GMainWindow::OnStartGame);
+ connect(ui.action_Pause, &QAction::triggered, this, &GMainWindow::OnPauseGame);
+ connect(ui.action_Stop, &QAction::triggered, this, &GMainWindow::OnStopGame);
+ connect(ui.action_Configure, &QAction::triggered, this, &GMainWindow::OnConfigure);
+
+ // View
+ connect(ui.action_Single_Window_Mode, &QAction::triggered, this,
+ &GMainWindow::ToggleWindowMode);
+}
+
void GMainWindow::OnDisplayTitleBars(bool show) {
QList<QDockWidget*> widgets = findChildren<QDockWidget*>();
diff --git a/src/citra_qt/main.h b/src/citra_qt/main.h
index e0d9a545b..87637b92b 100644
--- a/src/citra_qt/main.h
+++ b/src/citra_qt/main.h
@@ -72,6 +72,7 @@ private:
void RestoreUIState();
void ConnectWidgetEvents();
+ void ConnectMenuEvents();
bool LoadROM(const QString& filename);
void BootGame(const QString& filename);