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