mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Qt/Hotkeys: Implement missing "Other State Management" tab
This commit is contained in:
44
Source/Core/DolphinQt2/Config/Mapping/HotkeyStatesOther.cpp
Normal file
44
Source/Core/DolphinQt2/Config/Mapping/HotkeyStatesOther.cpp
Normal file
@ -0,0 +1,44 @@
|
||||
// Copyright 2018 Dolphin Emulator Project
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "DolphinQt2/Config/Mapping/HotkeyStatesOther.h"
|
||||
|
||||
#include <QGroupBox>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
#include "Core/HotkeyManager.h"
|
||||
|
||||
HotkeyStatesOther::HotkeyStatesOther(MappingWindow* window) : MappingWidget(window)
|
||||
{
|
||||
CreateMainLayout();
|
||||
}
|
||||
|
||||
void HotkeyStatesOther::CreateMainLayout()
|
||||
{
|
||||
auto* layout = new QHBoxLayout;
|
||||
|
||||
layout->addWidget(
|
||||
CreateGroupBox(tr("Select Last State"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_SELECT_STATE)));
|
||||
layout->addWidget(CreateGroupBox(tr("Load Last State"),
|
||||
HotkeyManagerEmu::GetHotkeyGroup(HKGP_LOAD_LAST_STATE)));
|
||||
layout->addWidget(
|
||||
CreateGroupBox(tr("Other State Hotkeys"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_STATE_MISC)));
|
||||
|
||||
setLayout(layout);
|
||||
}
|
||||
|
||||
InputConfig* HotkeyStatesOther::GetConfig()
|
||||
{
|
||||
return HotkeyManagerEmu::GetConfig();
|
||||
}
|
||||
|
||||
void HotkeyStatesOther::LoadSettings()
|
||||
{
|
||||
HotkeyManagerEmu::LoadConfig();
|
||||
}
|
||||
|
||||
void HotkeyStatesOther::SaveSettings()
|
||||
{
|
||||
HotkeyManagerEmu::GetConfig()->SaveConfig();
|
||||
}
|
23
Source/Core/DolphinQt2/Config/Mapping/HotkeyStatesOther.h
Normal file
23
Source/Core/DolphinQt2/Config/Mapping/HotkeyStatesOther.h
Normal file
@ -0,0 +1,23 @@
|
||||
// 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 HotkeyStatesOther final : public MappingWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit HotkeyStatesOther(MappingWindow* window);
|
||||
|
||||
InputConfig* GetConfig() override;
|
||||
|
||||
private:
|
||||
void LoadSettings() override;
|
||||
void SaveSettings() override;
|
||||
void CreateMainLayout();
|
||||
};
|
@ -29,6 +29,7 @@
|
||||
#include "DolphinQt2/Config/Mapping/HotkeyGeneral.h"
|
||||
#include "DolphinQt2/Config/Mapping/HotkeyGraphics.h"
|
||||
#include "DolphinQt2/Config/Mapping/HotkeyStates.h"
|
||||
#include "DolphinQt2/Config/Mapping/HotkeyStatesOther.h"
|
||||
#include "DolphinQt2/Config/Mapping/HotkeyTAS.h"
|
||||
#include "DolphinQt2/Config/Mapping/HotkeyWii.h"
|
||||
#include "DolphinQt2/Config/Mapping/WiimoteEmuExtension.h"
|
||||
@ -318,6 +319,7 @@ void MappingWindow::SetMappingType(MappingWindow::Type type)
|
||||
AddWidget(tr("Graphics"), new HotkeyGraphics(this));
|
||||
AddWidget(tr("3D"), new Hotkey3D(this));
|
||||
AddWidget(tr("Save and Load State"), new HotkeyStates(this));
|
||||
AddWidget(tr("Other State Management"), new HotkeyStatesOther(this));
|
||||
setWindowTitle(tr("Hotkey Settings"));
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user