Merge pull request #7901 from spycrab/issue_11585

Qt/Mapping: Use QGridLayout in a few more places
This commit is contained in:
spycrab 2019-03-20 23:53:01 +01:00 committed by GitHub
commit fcd0dbef2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 141 additions and 145 deletions

View File

@ -4,10 +4,8 @@
#include "DolphinQt/Config/Mapping/GCPadEmu.h" #include "DolphinQt/Config/Mapping/GCPadEmu.h"
#include <QFormLayout> #include <QGridLayout>
#include <QGroupBox> #include <QGroupBox>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include "Core/HW/GCPad.h" #include "Core/HW/GCPad.h"
#include "Core/HW/GCPadEmu.h" #include "Core/HW/GCPadEmu.h"
@ -23,28 +21,26 @@ GCPadEmu::GCPadEmu(MappingWindow* window) : MappingWidget(window)
void GCPadEmu::CreateMainLayout() void GCPadEmu::CreateMainLayout()
{ {
m_main_layout = new QHBoxLayout(); auto* layout = new QGridLayout;
m_main_layout->addWidget( layout->addWidget(CreateGroupBox(tr("Buttons"), Pad::GetGroup(GetPort(), PadGroup::Buttons)), 0,
CreateGroupBox(tr("Buttons"), Pad::GetGroup(GetPort(), PadGroup::Buttons))); 0, -1, 1);
m_main_layout->addWidget( layout->addWidget(
CreateGroupBox(tr("Control Stick"), Pad::GetGroup(GetPort(), PadGroup::MainStick))); CreateGroupBox(tr("Control Stick"), Pad::GetGroup(GetPort(), PadGroup::MainStick)), 0, 1, -1,
m_main_layout->addWidget( 1);
CreateGroupBox(tr("C Stick"), Pad::GetGroup(GetPort(), PadGroup::CStick))); layout->addWidget(CreateGroupBox(tr("C Stick"), Pad::GetGroup(GetPort(), PadGroup::CStick)), 0, 2,
m_main_layout->addWidget(CreateGroupBox(tr("D-Pad"), Pad::GetGroup(GetPort(), PadGroup::DPad))); -1, 1);
layout->addWidget(CreateGroupBox(tr("D-Pad"), Pad::GetGroup(GetPort(), PadGroup::DPad)), 0, 3, -1,
1);
auto* hbox_layout = new QVBoxLayout(); layout->addWidget(CreateGroupBox(tr("Triggers"), Pad::GetGroup(GetPort(), PadGroup::Triggers)), 0,
4);
layout->addWidget(CreateGroupBox(tr("Rumble"), Pad::GetGroup(GetPort(), PadGroup::Rumble)), 1, 4);
m_main_layout->addLayout(hbox_layout); layout->addWidget(CreateGroupBox(tr("Options"), Pad::GetGroup(GetPort(), PadGroup::Options)), 2,
4);
hbox_layout->addWidget( setLayout(layout);
CreateGroupBox(tr("Triggers"), Pad::GetGroup(GetPort(), PadGroup::Triggers)));
hbox_layout->addWidget(CreateGroupBox(tr("Rumble"), Pad::GetGroup(GetPort(), PadGroup::Rumble)));
hbox_layout->addWidget(
CreateGroupBox(tr("Options"), Pad::GetGroup(GetPort(), PadGroup::Options)));
setLayout(m_main_layout);
} }
void GCPadEmu::LoadSettings() void GCPadEmu::LoadSettings()

View File

@ -6,13 +6,6 @@
#include "DolphinQt/Config/Mapping/MappingWidget.h" #include "DolphinQt/Config/Mapping/MappingWidget.h"
class QCheckBox;
class QFormLayout;
class QGroupBox;
class QHBoxLayout;
class QLabel;
class QVBoxLayout;
class GCPadEmu final : public MappingWidget class GCPadEmu final : public MappingWidget
{ {
Q_OBJECT Q_OBJECT
@ -25,6 +18,4 @@ private:
void LoadSettings() override; void LoadSettings() override;
void SaveSettings() override; void SaveSettings() override;
void CreateMainLayout(); void CreateMainLayout();
QHBoxLayout* m_main_layout;
}; };

View File

@ -4,9 +4,8 @@
#include "DolphinQt/Config/Mapping/HotkeyDebugging.h" #include "DolphinQt/Config/Mapping/HotkeyDebugging.h"
#include <QGridLayout>
#include <QGroupBox> #include <QGroupBox>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include "Core/HotkeyManager.h" #include "Core/HotkeyManager.h"
@ -17,16 +16,15 @@ HotkeyDebugging::HotkeyDebugging(MappingWindow* window) : MappingWidget(window)
void HotkeyDebugging::CreateMainLayout() void HotkeyDebugging::CreateMainLayout()
{ {
m_main_layout = new QHBoxLayout(); m_main_layout = new QGridLayout();
m_main_layout->addWidget( m_main_layout->addWidget(
CreateGroupBox(tr("Stepping"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_STEPPING))); CreateGroupBox(tr("Stepping"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_STEPPING)), 0, 0, -1, 1);
auto* vbox = new QVBoxLayout(); m_main_layout->addWidget(
vbox->addWidget(CreateGroupBox(tr("Program Counter"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_PC))); CreateGroupBox(tr("Program Counter"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_PC)), 0, 1);
vbox->addWidget( m_main_layout->addWidget(
CreateGroupBox(tr("Breakpoint"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_BREAKPOINT))); CreateGroupBox(tr("Breakpoint"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_BREAKPOINT)), 1, 1);
m_main_layout->addLayout(vbox);
setLayout(m_main_layout); setLayout(m_main_layout);
} }

View File

@ -6,7 +6,7 @@
#include "DolphinQt/Config/Mapping/MappingWidget.h" #include "DolphinQt/Config/Mapping/MappingWidget.h"
class QHBoxLayout; class QGridLayout;
class HotkeyDebugging final : public MappingWidget class HotkeyDebugging final : public MappingWidget
{ {
@ -22,5 +22,5 @@ private:
void CreateMainLayout(); void CreateMainLayout();
// Main // Main
QHBoxLayout* m_main_layout; QGridLayout* m_main_layout;
}; };

View File

@ -4,9 +4,8 @@
#include "DolphinQt/Config/Mapping/HotkeyGeneral.h" #include "DolphinQt/Config/Mapping/HotkeyGeneral.h"
#include <QGridLayout>
#include <QGroupBox> #include <QGroupBox>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include "Core/HotkeyManager.h" #include "Core/HotkeyManager.h"
@ -17,16 +16,15 @@ HotkeyGeneral::HotkeyGeneral(MappingWindow* window) : MappingWidget(window)
void HotkeyGeneral::CreateMainLayout() void HotkeyGeneral::CreateMainLayout()
{ {
m_main_layout = new QHBoxLayout(); m_main_layout = new QGridLayout;
m_main_layout->addWidget( m_main_layout->addWidget(
CreateGroupBox(tr("General"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_GENERAL))); CreateGroupBox(tr("General"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_GENERAL)), 0, 0, -1, 1);
auto* vbox = new QVBoxLayout(); m_main_layout->addWidget(
vbox->addWidget(CreateGroupBox(tr("Volume"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_VOLUME))); CreateGroupBox(tr("Volume"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_VOLUME)), 0, 1);
vbox->addWidget( m_main_layout->addWidget(
CreateGroupBox(tr("Emulation Speed"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_SPEED))); CreateGroupBox(tr("Emulation Speed"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_SPEED)), 1, 1);
m_main_layout->addLayout(vbox);
setLayout(m_main_layout); setLayout(m_main_layout);
} }

View File

@ -6,7 +6,7 @@
#include "DolphinQt/Config/Mapping/MappingWidget.h" #include "DolphinQt/Config/Mapping/MappingWidget.h"
class QHBoxLayout; class QGridLayout;
class HotkeyGeneral final : public MappingWidget class HotkeyGeneral final : public MappingWidget
{ {
@ -22,5 +22,5 @@ private:
void CreateMainLayout(); void CreateMainLayout();
// Main // Main
QHBoxLayout* m_main_layout; QGridLayout* m_main_layout;
}; };

View File

@ -4,9 +4,8 @@
#include "DolphinQt/Config/Mapping/HotkeyGraphics.h" #include "DolphinQt/Config/Mapping/HotkeyGraphics.h"
#include <QGridLayout>
#include <QGroupBox> #include <QGroupBox>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include "Core/HotkeyManager.h" #include "Core/HotkeyManager.h"
@ -17,17 +16,16 @@ HotkeyGraphics::HotkeyGraphics(MappingWindow* window) : MappingWidget(window)
void HotkeyGraphics::CreateMainLayout() void HotkeyGraphics::CreateMainLayout()
{ {
m_main_layout = new QHBoxLayout(); m_main_layout = new QGridLayout();
m_main_layout->addWidget( m_main_layout->addWidget(
CreateGroupBox(tr("Freelook"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_FREELOOK))); CreateGroupBox(tr("Freelook"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_FREELOOK)), 0, 0, -1, 1);
auto* vbox = new QVBoxLayout(); m_main_layout->addWidget(CreateGroupBox(tr("Graphics Toggles"),
vbox->addWidget(CreateGroupBox(tr("Graphics Toggles"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_GRAPHICS_TOGGLES)),
HotkeyManagerEmu::GetHotkeyGroup(HKGP_GRAPHICS_TOGGLES))); 0, 1);
vbox->addWidget( m_main_layout->addWidget(
CreateGroupBox(tr("Internal Resolution"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_IR))); CreateGroupBox(tr("Internal Resolution"), HotkeyManagerEmu::GetHotkeyGroup(HKGP_IR)), 1, 1);
m_main_layout->addLayout(vbox);
setLayout(m_main_layout); setLayout(m_main_layout);
} }

View File

@ -6,7 +6,7 @@
#include "DolphinQt/Config/Mapping/MappingWidget.h" #include "DolphinQt/Config/Mapping/MappingWidget.h"
class QHBoxLayout; class QGridLayout;
class HotkeyGraphics final : public MappingWidget class HotkeyGraphics final : public MappingWidget
{ {
@ -22,5 +22,5 @@ private:
void CreateMainLayout(); void CreateMainLayout();
// Main // Main
QHBoxLayout* m_main_layout; QGridLayout* m_main_layout;
}; };

View File

@ -4,6 +4,7 @@
#include "DolphinQt/Config/Mapping/WiimoteEmuExtension.h" #include "DolphinQt/Config/Mapping/WiimoteEmuExtension.h"
#include <QGridLayout>
#include <QGroupBox> #include <QGroupBox>
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QLabel> #include <QLabel>
@ -33,43 +34,50 @@ WiimoteEmuExtension::WiimoteEmuExtension(MappingWindow* window) : MappingWidget(
void WiimoteEmuExtension::CreateClassicLayout() void WiimoteEmuExtension::CreateClassicLayout()
{ {
auto* hbox = new QHBoxLayout(); auto* layout = new QGridLayout();
m_classic_box = new QGroupBox(tr("Classic Controller"), this); m_classic_box = new QGroupBox(tr("Classic Controller"), this);
hbox->addWidget(CreateGroupBox( layout->addWidget(
tr("Buttons"), Wiimote::GetClassicGroup(GetPort(), WiimoteEmu::ClassicGroup::Buttons))); CreateGroupBox(tr("Buttons"),
hbox->addWidget(CreateGroupBox( Wiimote::GetClassicGroup(GetPort(), WiimoteEmu::ClassicGroup::Buttons)),
tr("Left Stick"), Wiimote::GetClassicGroup(GetPort(), WiimoteEmu::ClassicGroup::LeftStick))); 0, 0, -1, 1);
hbox->addWidget( layout->addWidget(
CreateGroupBox(tr("Left Stick"),
Wiimote::GetClassicGroup(GetPort(), WiimoteEmu::ClassicGroup::LeftStick)),
0, 1, -1, 1);
layout->addWidget(
CreateGroupBox(tr("Right Stick"), CreateGroupBox(tr("Right Stick"),
Wiimote::GetClassicGroup(GetPort(), WiimoteEmu::ClassicGroup::RightStick))); Wiimote::GetClassicGroup(GetPort(), WiimoteEmu::ClassicGroup::RightStick)),
0, 2, -1, 1);
auto* vbox = new QVBoxLayout(); layout->addWidget(CreateGroupBox(tr("D-Pad"), Wiimote::GetClassicGroup(
vbox->addWidget(CreateGroupBox( GetPort(), WiimoteEmu::ClassicGroup::DPad)),
tr("D-Pad"), Wiimote::GetClassicGroup(GetPort(), WiimoteEmu::ClassicGroup::DPad))); 0, 3);
vbox->addWidget(CreateGroupBox( layout->addWidget(
tr("Triggers"), Wiimote::GetClassicGroup(GetPort(), WiimoteEmu::ClassicGroup::Triggers))); CreateGroupBox(tr("Triggers"),
hbox->addLayout(vbox); Wiimote::GetClassicGroup(GetPort(), WiimoteEmu::ClassicGroup::Triggers)),
1, 3);
m_classic_box->setLayout(hbox); m_classic_box->setLayout(layout);
} }
void WiimoteEmuExtension::CreateDrumsLayout() void WiimoteEmuExtension::CreateDrumsLayout()
{ {
auto* hbox = new QHBoxLayout(); auto* layout = new QGridLayout();
m_drums_box = new QGroupBox(tr("Drums"), this); m_drums_box = new QGroupBox(tr("Drums"), this);
hbox->addWidget(CreateGroupBox(tr("Stick"), layout->addWidget(
Wiimote::GetDrumsGroup(GetPort(), WiimoteEmu::DrumsGroup::Stick))); CreateGroupBox(tr("Stick"), Wiimote::GetDrumsGroup(GetPort(), WiimoteEmu::DrumsGroup::Stick)),
0, 0, -1, 1);
auto* vbox = new QVBoxLayout(); layout->addWidget(
vbox->addWidget( CreateGroupBox(tr("Pads"), Wiimote::GetDrumsGroup(GetPort(), WiimoteEmu::DrumsGroup::Pads)),
CreateGroupBox(tr("Pads"), Wiimote::GetDrumsGroup(GetPort(), WiimoteEmu::DrumsGroup::Pads))); 0, 1);
vbox->addWidget(CreateGroupBox( layout->addWidget(CreateGroupBox(tr("Buttons"), Wiimote::GetDrumsGroup(
tr("Buttons"), Wiimote::GetDrumsGroup(GetPort(), WiimoteEmu::DrumsGroup::Buttons))); GetPort(), WiimoteEmu::DrumsGroup::Buttons)),
hbox->addLayout(vbox); 1, 1);
m_drums_box->setLayout(hbox); m_drums_box->setLayout(layout);
} }
void WiimoteEmuExtension::CreateNoneLayout() void WiimoteEmuExtension::CreateNoneLayout()
@ -86,24 +94,28 @@ void WiimoteEmuExtension::CreateNoneLayout()
void WiimoteEmuExtension::CreateNunchukLayout() void WiimoteEmuExtension::CreateNunchukLayout()
{ {
auto* hbox = new QHBoxLayout(); auto* layout = new QGridLayout();
m_nunchuk_box = new QGroupBox(tr("Nunchuk"), this); m_nunchuk_box = new QGroupBox(tr("Nunchuk"), this);
hbox->addWidget(CreateGroupBox( layout->addWidget(CreateGroupBox(tr("Stick"), Wiimote::GetNunchukGroup(
tr("Stick"), Wiimote::GetNunchukGroup(GetPort(), WiimoteEmu::NunchukGroup::Stick))); GetPort(), WiimoteEmu::NunchukGroup::Stick)),
hbox->addWidget(CreateGroupBox( 0, 0, -1, 1);
tr("Tilt"), Wiimote::GetNunchukGroup(GetPort(), WiimoteEmu::NunchukGroup::Tilt))); layout->addWidget(CreateGroupBox(tr("Tilt"), Wiimote::GetNunchukGroup(
hbox->addWidget(CreateGroupBox( GetPort(), WiimoteEmu::NunchukGroup::Tilt)),
tr("Swing"), Wiimote::GetNunchukGroup(GetPort(), WiimoteEmu::NunchukGroup::Swing))); 0, 1, -1, 1);
layout->addWidget(CreateGroupBox(tr("Swing"), Wiimote::GetNunchukGroup(
GetPort(), WiimoteEmu::NunchukGroup::Swing)),
0, 2, -1, 1);
auto* vbox = new QVBoxLayout(); layout->addWidget(
vbox->addWidget(CreateGroupBox( CreateGroupBox(tr("Buttons"),
tr("Buttons"), Wiimote::GetNunchukGroup(GetPort(), WiimoteEmu::NunchukGroup::Buttons))); Wiimote::GetNunchukGroup(GetPort(), WiimoteEmu::NunchukGroup::Buttons)),
vbox->addWidget(CreateGroupBox( 0, 3);
tr("Shake"), Wiimote::GetNunchukGroup(GetPort(), WiimoteEmu::NunchukGroup::Shake))); layout->addWidget(CreateGroupBox(tr("Shake"), Wiimote::GetNunchukGroup(
hbox->addLayout(vbox); GetPort(), WiimoteEmu::NunchukGroup::Shake)),
1, 3);
m_nunchuk_box->setLayout(hbox); m_nunchuk_box->setLayout(layout);
} }
void WiimoteEmuExtension::CreateGuitarLayout() void WiimoteEmuExtension::CreateGuitarLayout()
@ -137,34 +149,38 @@ void WiimoteEmuExtension::CreateGuitarLayout()
void WiimoteEmuExtension::CreateTurntableLayout() void WiimoteEmuExtension::CreateTurntableLayout()
{ {
auto* hbox = new QHBoxLayout(); auto* layout = new QGridLayout();
m_turntable_box = new QGroupBox(tr("Turntable"), this); m_turntable_box = new QGroupBox(tr("Turntable"), this);
hbox->addWidget(CreateGroupBox( layout->addWidget(CreateGroupBox(tr("Stick"), Wiimote::GetTurntableGroup(
tr("Stick"), Wiimote::GetTurntableGroup(GetPort(), WiimoteEmu::TurntableGroup::Stick))); GetPort(), WiimoteEmu::TurntableGroup::Stick)),
0, 0, -1, 1);
auto* vbox = new QVBoxLayout(); layout->addWidget(
vbox->addWidget(CreateGroupBox( CreateGroupBox(tr("Buttons"),
tr("Buttons"), Wiimote::GetTurntableGroup(GetPort(), WiimoteEmu::TurntableGroup::Buttons))); Wiimote::GetTurntableGroup(GetPort(), WiimoteEmu::TurntableGroup::Buttons)),
vbox->addWidget(CreateGroupBox( 0, 1);
tr("Effect"), Wiimote::GetTurntableGroup(GetPort(), WiimoteEmu::TurntableGroup::EffectDial))); layout->addWidget(
hbox->addLayout(vbox); CreateGroupBox(tr("Effect"),
Wiimote::GetTurntableGroup(GetPort(), WiimoteEmu::TurntableGroup::EffectDial)),
1, 1, -1, 1);
auto* vbox2 = new QVBoxLayout(); layout->addWidget(
vbox2->addWidget(
// i18n: "Table" refers to a turntable // i18n: "Table" refers to a turntable
CreateGroupBox(tr("Left Table"), CreateGroupBox(tr("Left Table"),
Wiimote::GetTurntableGroup(GetPort(), WiimoteEmu::TurntableGroup::LeftTable))); Wiimote::GetTurntableGroup(GetPort(), WiimoteEmu::TurntableGroup::LeftTable)),
vbox2->addWidget(CreateGroupBox( 0, 2);
// i18n: "Table" refers to a turntable layout->addWidget(CreateGroupBox(
tr("Right Table"), // i18n: "Table" refers to a turntable
Wiimote::GetTurntableGroup(GetPort(), WiimoteEmu::TurntableGroup::RightTable))); tr("Right Table"), Wiimote::GetTurntableGroup(
vbox2->addWidget( GetPort(), WiimoteEmu::TurntableGroup::RightTable)),
1, 2);
layout->addWidget(
CreateGroupBox(tr("Crossfade"), CreateGroupBox(tr("Crossfade"),
Wiimote::GetTurntableGroup(GetPort(), WiimoteEmu::TurntableGroup::Crossfade))); Wiimote::GetTurntableGroup(GetPort(), WiimoteEmu::TurntableGroup::Crossfade)),
hbox->addLayout(vbox2); 2, 2);
m_turntable_box->setLayout(hbox); m_turntable_box->setLayout(layout);
} }
void WiimoteEmuExtension::CreateMainLayout() void WiimoteEmuExtension::CreateMainLayout()

View File

@ -6,9 +6,8 @@
#include <QComboBox> #include <QComboBox>
#include <QFormLayout> #include <QFormLayout>
#include <QGridLayout>
#include <QGroupBox> #include <QGroupBox>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include "Core/HW/Wiimote.h" #include "Core/HW/Wiimote.h"
#include "Core/HW/WiimoteEmu/WiimoteEmu.h" #include "Core/HW/WiimoteEmu/WiimoteEmu.h"
@ -29,16 +28,19 @@ WiimoteEmuGeneral::WiimoteEmuGeneral(MappingWindow* window, WiimoteEmuExtension*
void WiimoteEmuGeneral::CreateMainLayout() void WiimoteEmuGeneral::CreateMainLayout()
{ {
m_main_layout = new QHBoxLayout(); auto* layout = new QGridLayout;
auto* vbox_layout = new QVBoxLayout(); layout->addWidget(
CreateGroupBox(tr("Buttons"),
m_main_layout->addWidget(CreateGroupBox( Wiimote::GetWiimoteGroup(GetPort(), WiimoteEmu::WiimoteGroup::Buttons)),
tr("Buttons"), Wiimote::GetWiimoteGroup(GetPort(), WiimoteEmu::WiimoteGroup::Buttons))); 0, 0, -1, 1);
m_main_layout->addWidget(CreateGroupBox( layout->addWidget(CreateGroupBox(tr("D-Pad"), Wiimote::GetWiimoteGroup(
tr("D-Pad"), Wiimote::GetWiimoteGroup(GetPort(), WiimoteEmu::WiimoteGroup::DPad))); GetPort(), WiimoteEmu::WiimoteGroup::DPad)),
m_main_layout->addWidget(CreateGroupBox( 0, 1, -1, 1);
tr("Hotkeys"), Wiimote::GetWiimoteGroup(GetPort(), WiimoteEmu::WiimoteGroup::Hotkeys))); layout->addWidget(
CreateGroupBox(tr("Hotkeys"),
Wiimote::GetWiimoteGroup(GetPort(), WiimoteEmu::WiimoteGroup::Hotkeys)),
0, 2, -1, 1);
auto* extension_group = auto* extension_group =
Wiimote::GetWiimoteGroup(GetPort(), WiimoteEmu::WiimoteGroup::Attachments); Wiimote::GetWiimoteGroup(GetPort(), WiimoteEmu::WiimoteGroup::Attachments);
@ -56,16 +58,17 @@ void WiimoteEmuGeneral::CreateMainLayout()
static_cast<QFormLayout*>(extension->layout())->addRow(m_extension_combo); static_cast<QFormLayout*>(extension->layout())->addRow(m_extension_combo);
vbox_layout->addWidget(extension); layout->addWidget(extension, 0, 3);
vbox_layout->addWidget(CreateGroupBox( layout->addWidget(CreateGroupBox(tr("Rumble"), Wiimote::GetWiimoteGroup(
tr("Rumble"), Wiimote::GetWiimoteGroup(GetPort(), WiimoteEmu::WiimoteGroup::Rumble))); GetPort(), WiimoteEmu::WiimoteGroup::Rumble)),
1, 3);
vbox_layout->addWidget(CreateGroupBox( layout->addWidget(
tr("Options"), Wiimote::GetWiimoteGroup(GetPort(), WiimoteEmu::WiimoteGroup::Options))); CreateGroupBox(tr("Options"),
Wiimote::GetWiimoteGroup(GetPort(), WiimoteEmu::WiimoteGroup::Options)),
2, 3);
m_main_layout->addLayout(vbox_layout); setLayout(layout);
setLayout(m_main_layout);
} }
void WiimoteEmuGeneral::Connect(MappingWindow* window) void WiimoteEmuGeneral::Connect(MappingWindow* window)

View File

@ -7,7 +7,6 @@
#include "DolphinQt/Config/Mapping/MappingWidget.h" #include "DolphinQt/Config/Mapping/MappingWidget.h"
class QComboBox; class QComboBox;
class QHBoxLayout;
class WiimoteEmuExtension; class WiimoteEmuExtension;
class WiimoteEmuGeneral final : public MappingWidget class WiimoteEmuGeneral final : public MappingWidget
@ -26,9 +25,6 @@ private:
void OnAttachmentChanged(int index); void OnAttachmentChanged(int index);
void Update(); void Update();
// Main
QHBoxLayout* m_main_layout;
// Extensions // Extensions
QComboBox* m_extension_combo; QComboBox* m_extension_combo;