Skip to content
Permalink
Browse files
Merge pull request #6386 from spycrab/qt_dbg_code
Qt/Debugger: Implement "Code" widget
  • Loading branch information
Helios747 committed Mar 15, 2018
2 parents 19d97f3 + 0a5f0ef commit 1c3cc26
Show file tree
Hide file tree
Showing 21 changed files with 1,695 additions and 12 deletions.
@@ -57,6 +57,7 @@ set(SRCS
Config/Mapping/GCPadEmu.cpp
Config/Mapping/GCPadWiiUConfigDialog.cpp
Config/Mapping/Hotkey3D.cpp
Config/Mapping/HotkeyDebugging.cpp
Config/Mapping/HotkeyGeneral.cpp
Config/Mapping/HotkeyGraphics.cpp
Config/Mapping/HotkeyStates.cpp
@@ -78,6 +79,8 @@ set(SRCS
Config/PropertiesDialog.cpp
Config/SettingsWindow.cpp
Debugger/BreakpointWidget.cpp
Debugger/CodeViewWidget.cpp
Debugger/CodeWidget.cpp
Debugger/NewBreakpointDialog.cpp
Debugger/RegisterColumn.cpp
Debugger/RegisterWidget.cpp
@@ -0,0 +1,47 @@
// Copyright 2018 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.

#include "DolphinQt2/Config/Mapping/HotkeyDebugging.h"

#include <QGroupBox>
#include <QHBoxLayout>
#include <QVBoxLayout>

#include "Core/HotkeyManager.h"

HotkeyDebugging::HotkeyDebugging(MappingWindow* window) : MappingWidget(window)
{
CreateMainLayout();
}

void HotkeyDebugging::CreateMainLayout()
{
m_main_layout = new QHBoxLayout();

m_main_layout->addWidget(
CreateGroupBox(tr("Stepping"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_STEPPING)));

auto* vbox = new QVBoxLayout();
vbox->addWidget(CreateGroupBox(tr("Program Counter"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_PC)));
vbox->addWidget(
CreateGroupBox(tr("Breakpoint"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_BREAKPOINT)));
m_main_layout->addItem(vbox);

setLayout(m_main_layout);
}

InputConfig* HotkeyDebugging::GetConfig()
{
return HotkeyManagerEmu::GetConfig();
}

void HotkeyDebugging::LoadSettings()
{
HotkeyManagerEmu::LoadConfig();
}

void HotkeyDebugging::SaveSettings()
{
HotkeyManagerEmu::GetConfig()->SaveConfig();
}
@@ -0,0 +1,25 @@
// Copyright 2018 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.

#pragma once

#include "DolphinQt2/Config/Mapping/MappingWidget.h"

class QHBoxLayout;

class HotkeyDebugging final : public MappingWidget
{
public:
explicit HotkeyDebugging(MappingWindow* window);

InputConfig* GetConfig() override;

private:
void LoadSettings() override;
void SaveSettings() override;
void CreateMainLayout();

// Main
QHBoxLayout* m_main_layout;
};
@@ -22,6 +22,7 @@
#include "DolphinQt2/Config/Mapping/GCMicrophone.h"
#include "DolphinQt2/Config/Mapping/GCPadEmu.h"
#include "DolphinQt2/Config/Mapping/Hotkey3D.h"
#include "DolphinQt2/Config/Mapping/HotkeyDebugging.h"
#include "DolphinQt2/Config/Mapping/HotkeyGeneral.h"
#include "DolphinQt2/Config/Mapping/HotkeyGraphics.h"
#include "DolphinQt2/Config/Mapping/HotkeyStates.h"
@@ -278,6 +279,7 @@ void MappingWindow::SetMappingType(MappingWindow::Type type)
widget = new HotkeyGeneral(this);
AddWidget(tr("General"), widget);
AddWidget(tr("TAS Tools"), new HotkeyTAS(this));
AddWidget(tr("Debugging"), new HotkeyDebugging(this));
AddWidget(tr("Wii and Wii Remote"), new HotkeyWii(this));
AddWidget(tr("Graphics"), new HotkeyGraphics(this));
AddWidget(tr("3D"), new Hotkey3D(this));
@@ -25,6 +25,7 @@ class BreakpointWidget : public QDockWidget
bool do_break = true);
void AddRangedMBP(u32 from, u32 to, bool do_read = true, bool do_write = true, bool do_log = true,
bool do_break = true);
void Update();

protected:
void closeEvent(QCloseEvent*) override;
@@ -38,8 +39,6 @@ class BreakpointWidget : public QDockWidget
void OnLoad();
void OnSave();

void Update();

QToolBar* m_toolbar;
QTableWidget* m_table;
QAction* m_load;

0 comments on commit 1c3cc26

Please sign in to comment.