Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Suyu
Commits
5b96915c
There was an error fetching the commit references. Please try again later.
Commit
5b96915c
authored
8 years ago
by
Yuri Kunde Schlesner
Browse files
Options
Downloads
Patches
Plain Diff
Qt: Reorganize connection of menu events
parent
4cb1f368
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/citra_qt/main.cpp
+22
-13
22 additions, 13 deletions
src/citra_qt/main.cpp
src/citra_qt/main.h
+1
-0
1 addition, 0 deletions
src/citra_qt/main.h
with
23 additions
and
13 deletions
src/citra_qt/main.cpp
+
22
−
13
View file @
5b96915c
...
...
@@ -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
*>
();
...
...
This diff is collapsed.
Click to expand it.
src/citra_qt/main.h
+
1
−
0
View file @
5b96915c
...
...
@@ -72,6 +72,7 @@ private:
void
RestoreUIState
();
void
ConnectWidgetEvents
();
void
ConnectMenuEvents
();
bool
LoadROM
(
const
QString
&
filename
);
void
BootGame
(
const
QString
&
filename
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment