Skip to content

Commit

Permalink
Merge pull request #11800 from Dentomologist/rename_graphicsradioint_…
Browse files Browse the repository at this point in the history
…to_configradioint

Qt: Rename GraphicsRadioInt to ConfigRadioInt
  • Loading branch information
lioncash committed Apr 28, 2023
2 parents 88320f3 + a7abd7d commit 8e6e6f3
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Source/Core/DolphinQt/CMakeLists.txt
Expand Up @@ -39,6 +39,8 @@ add_executable(dolphin-emu
Config/ConfigControls/ConfigBool.h
Config/ConfigControls/ConfigChoice.cpp
Config/ConfigControls/ConfigChoice.h
Config/ConfigControls/ConfigRadio.cpp
Config/ConfigControls/ConfigRadio.h
Config/ControllerInterface/ControllerInterfaceWindow.cpp
Config/ControllerInterface/ControllerInterfaceWindow.h
Config/ControllerInterface/DualShockUDPClientAddServerDialog.cpp
Expand Down Expand Up @@ -73,8 +75,6 @@ add_executable(dolphin-emu
Config/Graphics/GeneralWidget.h
Config/Graphics/GraphicsInteger.cpp
Config/Graphics/GraphicsInteger.h
Config/Graphics/GraphicsRadio.cpp
Config/Graphics/GraphicsRadio.h
Config/Graphics/GraphicsSlider.cpp
Config/Graphics/GraphicsSlider.h
Config/Graphics/GraphicsWidget.h
Expand Down
@@ -1,20 +1,19 @@
// Copyright 2018 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#include "DolphinQt/Config/Graphics/GraphicsRadio.h"
#include "DolphinQt/Config/ConfigControls/ConfigRadio.h"

#include <QSignalBlocker>

#include "Common/Config/Config.h"

#include "DolphinQt/Settings.h"

GraphicsRadioInt::GraphicsRadioInt(const QString& label, const Config::Info<int>& setting,
int value)
ConfigRadioInt::ConfigRadioInt(const QString& label, const Config::Info<int>& setting, int value)
: ToolTipRadioButton(label), m_setting(setting), m_value(value)
{
setChecked(Config::Get(m_setting) == m_value);
connect(this, &QRadioButton::toggled, this, &GraphicsRadioInt::Update);
connect(this, &QRadioButton::toggled, this, &ConfigRadioInt::Update);

connect(&Settings::Instance(), &Settings::ConfigChanged, this, [this] {
QFont bf = font();
Expand All @@ -26,7 +25,7 @@ GraphicsRadioInt::GraphicsRadioInt(const QString& label, const Config::Info<int>
});
}

void GraphicsRadioInt::Update()
void ConfigRadioInt::Update()
{
if (!isChecked())
return;
Expand Down
Expand Up @@ -7,11 +7,11 @@

#include "Common/Config/Config.h"

class GraphicsRadioInt : public ToolTipRadioButton
class ConfigRadioInt : public ToolTipRadioButton
{
Q_OBJECT
public:
GraphicsRadioInt(const QString& label, const Config::Info<int>& setting, int value);
ConfigRadioInt(const QString& label, const Config::Info<int>& setting, int value);

private:
void Update();
Expand Down
Expand Up @@ -16,7 +16,7 @@

#include "DolphinQt/Config/ConfigControls/ConfigBool.h"
#include "DolphinQt/Config/ConfigControls/ConfigChoice.h"
#include "DolphinQt/Config/Graphics/GraphicsRadio.h"
#include "DolphinQt/Config/ConfigControls/ConfigRadio.h"
#include "DolphinQt/Config/Graphics/GraphicsSlider.h"
#include "DolphinQt/Config/Graphics/GraphicsWindow.h"
#include "DolphinQt/Config/Graphics/PostProcessingConfigWindow.h"
Expand Down
6 changes: 3 additions & 3 deletions Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp
Expand Up @@ -20,7 +20,7 @@

#include "DolphinQt/Config/ConfigControls/ConfigBool.h"
#include "DolphinQt/Config/ConfigControls/ConfigChoice.h"
#include "DolphinQt/Config/Graphics/GraphicsRadio.h"
#include "DolphinQt/Config/ConfigControls/ConfigRadio.h"
#include "DolphinQt/Config/Graphics/GraphicsWindow.h"
#include "DolphinQt/Config/ToolTipControls/ToolTipComboBox.h"
#include "DolphinQt/QtUtils/ModalMessageBox.h"
Expand Down Expand Up @@ -110,8 +110,8 @@ void GeneralWidget::CreateWidgets()
}};
for (size_t i = 0; i < modes.size(); i++)
{
m_shader_compilation_mode[i] = new GraphicsRadioInt(
tr(modes[i]), Config::GFX_SHADER_COMPILATION_MODE, static_cast<int>(i));
m_shader_compilation_mode[i] =
new ConfigRadioInt(tr(modes[i]), Config::GFX_SHADER_COMPILATION_MODE, static_cast<int>(i));
shader_compilation_layout->addWidget(m_shader_compilation_mode[i], static_cast<int>(i / 2),
static_cast<int>(i % 2));
}
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/DolphinQt/Config/Graphics/GeneralWidget.h
Expand Up @@ -8,7 +8,7 @@

class ConfigBool;
class ConfigChoice;
class GraphicsRadioInt;
class ConfigRadioInt;
class GraphicsWindow;
class QCheckBox;
class QComboBox;
Expand Down Expand Up @@ -48,6 +48,6 @@ class GeneralWidget final : public GraphicsWidget
ConfigBool* m_autoadjust_window_size;
ConfigBool* m_show_messages;
ConfigBool* m_render_main_window;
std::array<GraphicsRadioInt*, 4> m_shader_compilation_mode{};
std::array<ConfigRadioInt*, 4> m_shader_compilation_mode{};
ConfigBool* m_wait_for_shaders;
};
4 changes: 2 additions & 2 deletions Source/Core/DolphinQt/DolphinQt.vcxproj
Expand Up @@ -56,6 +56,7 @@
<ClCompile Include="Config\CommonControllersWidget.cpp" />
<ClCompile Include="Config\ConfigControls\ConfigBool.cpp" />
<ClCompile Include="Config\ConfigControls\ConfigChoice.cpp" />
<ClCompile Include="Config\ConfigControls\ConfigRadio.cpp" />
<ClCompile Include="Config\ControllerInterface\ControllerInterfaceWindow.cpp" />
<ClCompile Include="Config\ControllerInterface\DualShockUDPClientAddServerDialog.cpp" />
<ClCompile Include="Config\ControllerInterface\DualShockUDPClientWidget.cpp" />
Expand All @@ -73,7 +74,6 @@
<ClCompile Include="Config\Graphics\EnhancementsWidget.cpp" />
<ClCompile Include="Config\Graphics\GeneralWidget.cpp" />
<ClCompile Include="Config\Graphics\GraphicsInteger.cpp" />
<ClCompile Include="Config\Graphics\GraphicsRadio.cpp" />
<ClCompile Include="Config\Graphics\GraphicsSlider.cpp" />
<ClCompile Include="Config\Graphics\GraphicsWindow.cpp" />
<ClCompile Include="Config\Graphics\HacksWidget.cpp" />
Expand Down Expand Up @@ -257,6 +257,7 @@
<QtMoc Include="Config\CommonControllersWidget.h" />
<QtMoc Include="Config\ConfigControls\ConfigBool.h" />
<QtMoc Include="Config\ConfigControls\ConfigChoice.h" />
<QtMoc Include="Config\ConfigControls\ConfigRadio.h" />
<QtMoc Include="Config\ControllerInterface\ControllerInterfaceWindow.h" />
<QtMoc Include="Config\ControllerInterface\DualShockUDPClientAddServerDialog.h" />
<QtMoc Include="Config\ControllerInterface\DualShockUDPClientWidget.h" />
Expand All @@ -273,7 +274,6 @@
<QtMoc Include="Config\Graphics\EnhancementsWidget.h" />
<QtMoc Include="Config\Graphics\GeneralWidget.h" />
<QtMoc Include="Config\Graphics\GraphicsInteger.h" />
<QtMoc Include="Config\Graphics\GraphicsRadio.h" />
<QtMoc Include="Config\Graphics\GraphicsSlider.h" />
<QtMoc Include="Config\Graphics\GraphicsWidget.h" />
<QtMoc Include="Config\Graphics\GraphicsWindow.h" />
Expand Down

0 comments on commit 8e6e6f3

Please sign in to comment.