mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Merge pull request #6386 from spycrab/qt_dbg_code
Qt/Debugger: Implement "Code" widget
This commit is contained in:
47
Source/Core/DolphinQt2/Config/Mapping/HotkeyDebugging.cpp
Normal file
47
Source/Core/DolphinQt2/Config/Mapping/HotkeyDebugging.cpp
Normal 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();
|
||||
}
|
25
Source/Core/DolphinQt2/Config/Mapping/HotkeyDebugging.h
Normal file
25
Source/Core/DolphinQt2/Config/Mapping/HotkeyDebugging.h
Normal 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;
|
||||
};
|
@ -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));
|
||||
|
Reference in New Issue
Block a user