summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Config/Mapping/HotkeyGBA.cpp
blob: 39922a37cd3d54b2c3571a6e3d3cddf859c3f620 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright 2021 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#include "DolphinQt/Config/Mapping/HotkeyGBA.h"

#include <QGroupBox>
#include <QHBoxLayout>

#include "Core/HotkeyManager.h"

HotkeyGBA::HotkeyGBA(MappingWindow* window) : MappingWidget(window)
{
  CreateMainLayout();
}

void HotkeyGBA::CreateMainLayout()
{
  m_main_layout = new QHBoxLayout();

  m_main_layout->addWidget(
      CreateGroupBox(tr("Core"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_GBA_CORE)));
  m_main_layout->addWidget(
      CreateGroupBox(tr("Volume"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_GBA_VOLUME)));
  m_main_layout->addWidget(
      CreateGroupBox(tr("Window Size"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_GBA_SIZE)));

  setLayout(m_main_layout);
}

InputConfig* HotkeyGBA::GetConfig()
{
  return HotkeyManagerEmu::GetConfig();
}

void HotkeyGBA::LoadSettings()
{
  HotkeyManagerEmu::LoadConfig();
}

void HotkeyGBA::SaveSettings()
{
  HotkeyManagerEmu::GetConfig()->SaveConfig();
}