Permalink
Browse files

Qt/Hotkeys: Implement missing "Other State Management" tab

  • Loading branch information...
spycrab committed Jun 3, 2018
1 parent 1e51e26 commit 9c26a1a458b3c291061c0f4671fcf253b1611134
@@ -54,6 +54,7 @@ add_executable(dolphin-emu
Config/Mapping/HotkeyGeneral.cpp
Config/Mapping/HotkeyGraphics.cpp
Config/Mapping/HotkeyStates.cpp
Config/Mapping/HotkeyStatesOther.cpp
Config/Mapping/HotkeyTAS.cpp
Config/Mapping/HotkeyWii.cpp
Config/Mapping/IOWindow.cpp
@@ -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();
}
@@ -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;
}
@@ -74,6 +74,7 @@
<QtMoc Include="Config\Mapping\HotkeyGeneral.h" />
<QtMoc Include="Config\Mapping\HotkeyGraphics.h" />
<QtMoc Include="Config\Mapping\HotkeyStates.h" />
<QtMoc Include="Config\Mapping\HotkeyStatesOther.h" />
<QtMoc Include="Config\Mapping\HotkeyTAS.h" />
<QtMoc Include="Config\Mapping\HotkeyWii.h" />
<QtMoc Include="Config\Mapping\IOWindow.h" />
@@ -207,6 +208,7 @@
<ClCompile Include="$(QtMocOutPrefix)HotkeyGraphics.cpp" />
<ClCompile Include="$(QtMocOutPrefix)HotkeyScheduler.cpp" />
<ClCompile Include="$(QtMocOutPrefix)HotkeyStates.cpp" />
<ClCompile Include="$(QtMocOutPrefix)HotkeyStatesOther.cpp" />
<ClCompile Include="$(QtMocOutPrefix)HotkeyTAS.cpp" />
<ClCompile Include="$(QtMocOutPrefix)HotkeyWii.cpp" />
<ClCompile Include="$(QtMocOutPrefix)IOWindow.cpp" />
@@ -285,6 +287,7 @@
<ClCompile Include="Config\Mapping\HotkeyGeneral.cpp" />
<ClCompile Include="Config\Mapping\HotkeyGraphics.cpp" />
<ClCompile Include="Config\Mapping\HotkeyStates.cpp" />
<ClCompile Include="Config\Mapping\HotkeyStatesOther.cpp" />
<ClCompile Include="Config\Mapping\HotkeyTAS.cpp" />
<ClCompile Include="Config\Mapping\HotkeyWii.cpp" />
<ClCompile Include="Config\Mapping\IOWindow.cpp" />

0 comments on commit 9c26a1a

Please sign in to comment.