Merge pull request #6386 from spycrab/qt_dbg_code

Qt/Debugger: Implement "Code" widget
This commit is contained in:
Anthony
2018-03-15 11:35:26 -07:00
committed by GitHub
21 changed files with 1695 additions and 12 deletions

View File

@ -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();
}

View File

@ -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;
};

View File

@ -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));