summaryrefslogtreecommitdiffstats
path: root/src/citra_qt/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/citra_qt/main.cpp61
1 files changed, 22 insertions, 39 deletions
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp
index b17ed6968..d7fad555f 100644
--- a/src/citra_qt/main.cpp
+++ b/src/citra_qt/main.cpp
@@ -16,8 +16,6 @@
#include "citra_qt/bootmanager.h"
#include "citra_qt/configuration/config.h"
#include "citra_qt/configuration/configure_dialog.h"
-#include "citra_qt/debugger/callstack.h"
-#include "citra_qt/debugger/disassembler.h"
#include "citra_qt/debugger/graphics/graphics.h"
#include "citra_qt/debugger/graphics/graphics_breakpoints.h"
#include "citra_qt/debugger/graphics/graphics_cmdlists.h"
@@ -40,7 +38,6 @@
#include "common/scm_rev.h"
#include "common/scope_exit.h"
#include "common/string_util.h"
-#include "core/arm/disassembler/load_symbol_map.h"
#include "core/core.h"
#include "core/file_sys/archive_source_sd_savedata.h"
#include "core/gdbstub/gdbstub.h"
@@ -93,7 +90,7 @@ void GMainWindow::InitializeWidgets() {
render_window = new GRenderWindow(this, emu_thread.get());
render_window->hide();
- game_list = new GameList();
+ game_list = new GameList(this);
ui.horizontalLayout->addWidget(game_list);
// Create status bar
@@ -130,15 +127,6 @@ void GMainWindow::InitializeDebugWidgets() {
debug_menu->addAction(microProfileDialog->toggleViewAction());
#endif
- disasmWidget = new DisassemblerWidget(this, emu_thread.get());
- addDockWidget(Qt::BottomDockWidgetArea, disasmWidget);
- disasmWidget->hide();
- debug_menu->addAction(disasmWidget->toggleViewAction());
- connect(this, &GMainWindow::EmulationStarting, disasmWidget,
- &DisassemblerWidget::OnEmulationStarting);
- connect(this, &GMainWindow::EmulationStopping, disasmWidget,
- &DisassemblerWidget::OnEmulationStopping);
-
registersWidget = new RegistersWidget(this);
addDockWidget(Qt::RightDockWidgetArea, registersWidget);
registersWidget->hide();
@@ -148,11 +136,6 @@ void GMainWindow::InitializeDebugWidgets() {
connect(this, &GMainWindow::EmulationStopping, registersWidget,
&RegistersWidget::OnEmulationStopping);
- callstackWidget = new CallstackWidget(this);
- addDockWidget(Qt::RightDockWidgetArea, callstackWidget);
- callstackWidget->hide();
- debug_menu->addAction(callstackWidget->toggleViewAction());
-
graphicsWidget = new GPUCommandStreamWidget(this);
addDockWidget(Qt::RightDockWidgetArea, graphicsWidget);
graphicsWidget->hide();
@@ -247,6 +230,9 @@ void GMainWindow::RestoreUIState() {
ui.action_Display_Dock_Widget_Headers->setChecked(UISettings::values.display_titlebar);
OnDisplayTitleBars(ui.action_Display_Dock_Widget_Headers->isChecked());
+ ui.action_Show_Filter_Bar->setChecked(UISettings::values.show_filter_bar);
+ game_list->setFilterVisible(ui.action_Show_Filter_Bar->isChecked());
+
ui.action_Show_Status_Bar->setChecked(UISettings::values.show_status_bar);
statusBar()->setVisible(ui.action_Show_Status_Bar->isChecked());
}
@@ -266,8 +252,6 @@ void GMainWindow::ConnectWidgetEvents() {
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);
connect(ui.action_Exit, &QAction::triggered, this, &QMainWindow::close);
@@ -283,6 +267,8 @@ void GMainWindow::ConnectMenuEvents() {
&GMainWindow::ToggleWindowMode);
connect(ui.action_Display_Dock_Widget_Headers, &QAction::triggered, this,
&GMainWindow::OnDisplayTitleBars);
+ ui.action_Show_Filter_Bar->setShortcut(tr("CTRL+F"));
+ connect(ui.action_Show_Filter_Bar, &QAction::triggered, this, &GMainWindow::OnToggleFilterBar);
connect(ui.action_Show_Status_Bar, &QAction::triggered, statusBar(), &QStatusBar::setVisible);
}
@@ -386,26 +372,17 @@ void GMainWindow::BootGame(const QString& filename) {
connect(render_window, SIGNAL(Closed()), this, SLOT(OnStopGame()));
// BlockingQueuedConnection is important here, it makes sure we've finished refreshing our views
// before the CPU continues
- connect(emu_thread.get(), SIGNAL(DebugModeEntered()), disasmWidget, SLOT(OnDebugModeEntered()),
- Qt::BlockingQueuedConnection);
connect(emu_thread.get(), SIGNAL(DebugModeEntered()), registersWidget,
SLOT(OnDebugModeEntered()), Qt::BlockingQueuedConnection);
- connect(emu_thread.get(), SIGNAL(DebugModeEntered()), callstackWidget,
- SLOT(OnDebugModeEntered()), Qt::BlockingQueuedConnection);
connect(emu_thread.get(), SIGNAL(DebugModeEntered()), waitTreeWidget,
SLOT(OnDebugModeEntered()), Qt::BlockingQueuedConnection);
- connect(emu_thread.get(), SIGNAL(DebugModeLeft()), disasmWidget, SLOT(OnDebugModeLeft()),
- Qt::BlockingQueuedConnection);
connect(emu_thread.get(), SIGNAL(DebugModeLeft()), registersWidget, SLOT(OnDebugModeLeft()),
Qt::BlockingQueuedConnection);
- connect(emu_thread.get(), SIGNAL(DebugModeLeft()), callstackWidget, SLOT(OnDebugModeLeft()),
- Qt::BlockingQueuedConnection);
connect(emu_thread.get(), SIGNAL(DebugModeLeft()), waitTreeWidget, SLOT(OnDebugModeLeft()),
Qt::BlockingQueuedConnection);
// Update the GUI
registersWidget->OnDebugModeEntered();
- callstackWidget->OnDebugModeEntered();
if (ui.action_Single_Window_Mode->isChecked()) {
game_list->hide();
}
@@ -444,6 +421,7 @@ void GMainWindow::ShutdownGame() {
ui.action_Stop->setEnabled(false);
render_window->hide();
game_list->show();
+ game_list->setFilterFocus();
// Disable status bar updates
status_bar_update_timer.stop();
@@ -525,16 +503,6 @@ void GMainWindow::OnMenuLoadFile() {
}
}
-void GMainWindow::OnMenuLoadSymbolMap() {
- QString filename = QFileDialog::getOpenFileName(
- this, tr("Load Symbol Map"), UISettings::values.symbols_path, tr("Symbol Map (*.*)"));
- if (!filename.isEmpty()) {
- UISettings::values.symbols_path = QFileInfo(filename).path();
-
- LoadSymbolMap(filename.toStdString());
- }
-}
-
void GMainWindow::OnMenuSelectGameListRoot() {
QString dir_path = QFileDialog::getExistingDirectory(this, tr("Select Directory"));
if (!dir_path.isEmpty()) {
@@ -617,6 +585,15 @@ void GMainWindow::OnConfigure() {
}
}
+void GMainWindow::OnToggleFilterBar() {
+ game_list->setFilterVisible(ui.action_Show_Filter_Bar->isChecked());
+ if (ui.action_Show_Filter_Bar->isChecked()) {
+ game_list->setFilterFocus();
+ } else {
+ game_list->clearFilter();
+ }
+}
+
void GMainWindow::OnSwapScreens() {
Settings::values.swap_screen = !Settings::values.swap_screen;
Settings::Apply();
@@ -671,6 +648,7 @@ void GMainWindow::closeEvent(QCloseEvent* event) {
#endif
UISettings::values.single_window_mode = ui.action_Single_Window_Mode->isChecked();
UISettings::values.display_titlebar = ui.action_Display_Dock_Widget_Headers->isChecked();
+ UISettings::values.show_filter_bar = ui.action_Show_Filter_Bar->isChecked();
UISettings::values.show_status_bar = ui.action_Show_Status_Bar->isChecked();
UISettings::values.first_start = false;
@@ -720,6 +698,11 @@ bool GMainWindow::ConfirmChangeGame() {
return answer != QMessageBox::No;
}
+void GMainWindow::filterBarSetChecked(bool state) {
+ ui.action_Show_Filter_Bar->setChecked(state);
+ emit(OnToggleFilterBar());
+}
+
#ifdef main
#undef main
#endif