2018-04-14 04:51:32 +00:00
|
|
|
// Copyright 2018 Dolphin Emulator Project
|
2021-07-05 01:22:19 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2018-04-14 04:51:32 +00:00
|
|
|
|
|
|
|
#include "DolphinQt/Config/Mapping/HotkeyControllerProfile.h"
|
|
|
|
|
2020-02-27 05:02:48 +00:00
|
|
|
#include <QGridLayout>
|
2018-04-14 04:51:32 +00:00
|
|
|
#include <QGroupBox>
|
|
|
|
|
|
|
|
#include "Core/HotkeyManager.h"
|
|
|
|
|
|
|
|
HotkeyControllerProfile::HotkeyControllerProfile(MappingWindow* window) : MappingWidget(window)
|
|
|
|
{
|
2018-05-24 03:20:58 +00:00
|
|
|
CreateMainLayout();
|
2018-04-14 04:51:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void HotkeyControllerProfile::CreateMainLayout()
|
|
|
|
{
|
2020-02-27 05:02:48 +00:00
|
|
|
const auto main_layout = new QGridLayout;
|
2018-04-14 04:51:32 +00:00
|
|
|
|
2020-02-27 05:02:48 +00:00
|
|
|
main_layout->addWidget(
|
|
|
|
CreateGroupBox(tr("Wii Remote %1").arg(1),
|
|
|
|
HotkeyManagerEmu::GetHotkeyGroup(HKGP_CONTROLLER_PROFILE_1)),
|
|
|
|
0, 0);
|
2018-04-14 04:51:32 +00:00
|
|
|
|
2020-02-27 05:02:48 +00:00
|
|
|
main_layout->addWidget(
|
|
|
|
CreateGroupBox(tr("Wii Remote %1").arg(2),
|
|
|
|
HotkeyManagerEmu::GetHotkeyGroup(HKGP_CONTROLLER_PROFILE_2)),
|
|
|
|
0, 1);
|
|
|
|
|
|
|
|
main_layout->addWidget(
|
|
|
|
CreateGroupBox(tr("Wii Remote %1").arg(3),
|
|
|
|
HotkeyManagerEmu::GetHotkeyGroup(HKGP_CONTROLLER_PROFILE_3)),
|
|
|
|
1, 0);
|
|
|
|
|
|
|
|
main_layout->addWidget(
|
|
|
|
CreateGroupBox(tr("Wii Remote %1").arg(4),
|
|
|
|
HotkeyManagerEmu::GetHotkeyGroup(HKGP_CONTROLLER_PROFILE_4)),
|
|
|
|
1, 1);
|
|
|
|
|
|
|
|
setLayout(main_layout);
|
2018-04-14 04:51:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
InputConfig* HotkeyControllerProfile::GetConfig()
|
|
|
|
{
|
2018-05-24 03:20:58 +00:00
|
|
|
return HotkeyManagerEmu::GetConfig();
|
2018-04-14 04:51:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void HotkeyControllerProfile::LoadSettings()
|
|
|
|
{
|
2018-05-24 03:20:58 +00:00
|
|
|
HotkeyManagerEmu::LoadConfig();
|
2018-04-14 04:51:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void HotkeyControllerProfile::SaveSettings()
|
|
|
|
{
|
2018-05-24 03:20:58 +00:00
|
|
|
HotkeyManagerEmu::GetConfig()->SaveConfig();
|
2018-04-14 04:51:32 +00:00
|
|
|
}
|