From cb47857e8abffb00c390a90718ca9b83d1822fa4 Mon Sep 17 00:00:00 2001 From: Michael M Date: Sat, 4 Nov 2017 18:45:37 -0700 Subject: [PATCH] Rename GCPadWiiU -> GCPadWiiUConfigDialog This name better reflects its new standalone functionality. --- Source/Core/DolphinQt2/CMakeLists.txt | 2 +- .../DolphinQt2/Config/ControllersWindow.cpp | 4 ++-- ...CPadWiiU.cpp => GCPadWiiUConfigDialog.cpp} | 19 ++++++++++--------- .../{GCPadWiiU.h => GCPadWiiUConfigDialog.h} | 4 ++-- Source/Core/DolphinQt2/DolphinQt2.vcxproj | 2 +- 5 files changed, 16 insertions(+), 15 deletions(-) rename Source/Core/DolphinQt2/Config/Mapping/{GCPadWiiU.cpp => GCPadWiiUConfigDialog.cpp} (75%) rename Source/Core/DolphinQt2/Config/Mapping/{GCPadWiiU.h => GCPadWiiUConfigDialog.h} (80%) diff --git a/Source/Core/DolphinQt2/CMakeLists.txt b/Source/Core/DolphinQt2/CMakeLists.txt index 16ddc53540..ff66dada5a 100644 --- a/Source/Core/DolphinQt2/CMakeLists.txt +++ b/Source/Core/DolphinQt2/CMakeLists.txt @@ -50,7 +50,7 @@ set(SRCS Config/LogWidget.cpp Config/Mapping/GCKeyboardEmu.cpp Config/Mapping/GCPadEmu.cpp - Config/Mapping/GCPadWiiU.cpp + Config/Mapping/GCPadWiiUConfigDialog.cpp Config/Mapping/Hotkey3D.cpp Config/Mapping/HotkeyGeneral.cpp Config/Mapping/HotkeyGraphics.cpp diff --git a/Source/Core/DolphinQt2/Config/ControllersWindow.cpp b/Source/Core/DolphinQt2/Config/ControllersWindow.cpp index 86f238761d..ea54ea880d 100644 --- a/Source/Core/DolphinQt2/Config/ControllersWindow.cpp +++ b/Source/Core/DolphinQt2/Config/ControllersWindow.cpp @@ -28,7 +28,7 @@ #include "Core/IOS/IOS.h" #include "Core/IOS/USB/Bluetooth/BTReal.h" #include "Core/NetPlayProto.h" -#include "DolphinQt2/Config/Mapping/GCPadWiiU.h" +#include "DolphinQt2/Config/Mapping/GCPadWiiUConfigDialog.h" #include "DolphinQt2/Config/Mapping/MappingWindow.h" #include "DolphinQt2/Settings.h" #include "UICommon/UICommon.h" @@ -418,7 +418,7 @@ void ControllersWindow::OnGCPadConfigure() type = MappingWindow::Type::MAPPING_GCPAD; break; case 2: // GameCube Adapter for Wii U - GCPadWiiU(index, this).exec(); + GCPadWiiUConfigDialog(static_cast(index), this).exec(); return; case 3: // Steering Wheel type = MappingWindow::Type::MAPPING_GC_STEERINGWHEEL; diff --git a/Source/Core/DolphinQt2/Config/Mapping/GCPadWiiU.cpp b/Source/Core/DolphinQt2/Config/Mapping/GCPadWiiUConfigDialog.cpp similarity index 75% rename from Source/Core/DolphinQt2/Config/Mapping/GCPadWiiU.cpp rename to Source/Core/DolphinQt2/Config/Mapping/GCPadWiiUConfigDialog.cpp index f08c4b6693..1b20728690 100644 --- a/Source/Core/DolphinQt2/Config/Mapping/GCPadWiiU.cpp +++ b/Source/Core/DolphinQt2/Config/Mapping/GCPadWiiUConfigDialog.cpp @@ -7,12 +7,13 @@ #include #include -#include "DolphinQt2/Config/Mapping/GCPadWiiU.h" +#include "DolphinQt2/Config/Mapping/GCPadWiiUConfigDialog.h" #include "Core/ConfigManager.h" #include "InputCommon/GCAdapter.h" -GCPadWiiU::GCPadWiiU(int port, QWidget* parent) : QDialog(parent), m_port{port} +GCPadWiiUConfigDialog::GCPadWiiUConfigDialog(int port, QWidget* parent) + : QDialog(parent), m_port{port} { CreateLayout(); ConnectWidgets(); @@ -20,7 +21,7 @@ GCPadWiiU::GCPadWiiU(int port, QWidget* parent) : QDialog(parent), m_port{port} LoadSettings(); } -void GCPadWiiU::CreateLayout() +void GCPadWiiUConfigDialog::CreateLayout() { setWindowTitle(tr("GameCube Adapter for Wii U at Port %1").arg(m_port + 1)); @@ -45,20 +46,20 @@ void GCPadWiiU::CreateLayout() setLayout(m_layout); } -void GCPadWiiU::ConnectWidgets() +void GCPadWiiUConfigDialog::ConnectWidgets() { - connect(m_rumble, &QCheckBox::toggled, this, &GCPadWiiU::SaveSettings); - connect(m_simulate_bongos, &QCheckBox::toggled, this, &GCPadWiiU::SaveSettings); - connect(m_button_box, &QDialogButtonBox::accepted, this, &GCPadWiiU::accept); + connect(m_rumble, &QCheckBox::toggled, this, &GCPadWiiUConfigDialog::SaveSettings); + connect(m_simulate_bongos, &QCheckBox::toggled, this, &GCPadWiiUConfigDialog::SaveSettings); + connect(m_button_box, &QDialogButtonBox::accepted, this, &GCPadWiiUConfigDialog::accept); } -void GCPadWiiU::LoadSettings() +void GCPadWiiUConfigDialog::LoadSettings() { m_rumble->setChecked(SConfig::GetInstance().m_AdapterRumble[m_port]); m_simulate_bongos->setChecked(SConfig::GetInstance().m_AdapterKonga[m_port]); } -void GCPadWiiU::SaveSettings() +void GCPadWiiUConfigDialog::SaveSettings() { SConfig::GetInstance().m_AdapterRumble[m_port] = m_rumble->isChecked(); SConfig::GetInstance().m_AdapterKonga[m_port] = m_simulate_bongos->isChecked(); diff --git a/Source/Core/DolphinQt2/Config/Mapping/GCPadWiiU.h b/Source/Core/DolphinQt2/Config/Mapping/GCPadWiiUConfigDialog.h similarity index 80% rename from Source/Core/DolphinQt2/Config/Mapping/GCPadWiiU.h rename to Source/Core/DolphinQt2/Config/Mapping/GCPadWiiUConfigDialog.h index bbbacf94bb..851b50a6fa 100644 --- a/Source/Core/DolphinQt2/Config/Mapping/GCPadWiiU.h +++ b/Source/Core/DolphinQt2/Config/Mapping/GCPadWiiUConfigDialog.h @@ -11,10 +11,10 @@ class QLabel; class QDialogButtonBox; class QVBoxLayout; -class GCPadWiiU final : public QDialog +class GCPadWiiUConfigDialog final : public QDialog { public: - explicit GCPadWiiU(int port, QWidget* parent = nullptr); + explicit GCPadWiiUConfigDialog(int port, QWidget* parent = nullptr); private: void LoadSettings(); diff --git a/Source/Core/DolphinQt2/DolphinQt2.vcxproj b/Source/Core/DolphinQt2/DolphinQt2.vcxproj index 8d55c59e73..8ac0466b49 100644 --- a/Source/Core/DolphinQt2/DolphinQt2.vcxproj +++ b/Source/Core/DolphinQt2/DolphinQt2.vcxproj @@ -177,7 +177,7 @@ - +