Merge pull request #11802 from Dentomologist/rename_graphicsslider_to_configslider

Qt: Rename GraphicsSlider to ConfigSlider
This commit is contained in:
Admiral H. Curtiss 2023-04-29 16:47:56 +02:00 committed by GitHub
commit 79607a060c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 19 additions and 19 deletions

View File

@ -41,6 +41,8 @@ add_executable(dolphin-emu
Config/ConfigControls/ConfigChoice.h Config/ConfigControls/ConfigChoice.h
Config/ConfigControls/ConfigRadio.cpp Config/ConfigControls/ConfigRadio.cpp
Config/ConfigControls/ConfigRadio.h Config/ConfigControls/ConfigRadio.h
Config/ConfigControls/ConfigSlider.cpp
Config/ConfigControls/ConfigSlider.h
Config/ControllerInterface/ControllerInterfaceWindow.cpp Config/ControllerInterface/ControllerInterfaceWindow.cpp
Config/ControllerInterface/ControllerInterfaceWindow.h Config/ControllerInterface/ControllerInterfaceWindow.h
Config/ControllerInterface/DualShockUDPClientAddServerDialog.cpp Config/ControllerInterface/DualShockUDPClientAddServerDialog.cpp
@ -75,8 +77,6 @@ add_executable(dolphin-emu
Config/Graphics/GeneralWidget.h Config/Graphics/GeneralWidget.h
Config/Graphics/GraphicsInteger.cpp Config/Graphics/GraphicsInteger.cpp
Config/Graphics/GraphicsInteger.h Config/Graphics/GraphicsInteger.h
Config/Graphics/GraphicsSlider.cpp
Config/Graphics/GraphicsSlider.h
Config/Graphics/GraphicsWidget.h Config/Graphics/GraphicsWidget.h
Config/Graphics/GraphicsWindow.cpp Config/Graphics/GraphicsWindow.cpp
Config/Graphics/GraphicsWindow.h Config/Graphics/GraphicsWindow.h

View File

@ -1,7 +1,7 @@
// Copyright 2017 Dolphin Emulator Project // Copyright 2017 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
#include "DolphinQt/Config/Graphics/GraphicsSlider.h" #include "DolphinQt/Config/ConfigControls/ConfigSlider.h"
#include <QSignalBlocker> #include <QSignalBlocker>
@ -9,7 +9,7 @@
#include "DolphinQt/Settings.h" #include "DolphinQt/Settings.h"
GraphicsSlider::GraphicsSlider(int minimum, int maximum, const Config::Info<int>& setting, int tick) ConfigSlider::ConfigSlider(int minimum, int maximum, const Config::Info<int>& setting, int tick)
: ToolTipSlider(Qt::Horizontal), m_setting(setting) : ToolTipSlider(Qt::Horizontal), m_setting(setting)
{ {
setMinimum(minimum); setMinimum(minimum);
@ -18,7 +18,7 @@ GraphicsSlider::GraphicsSlider(int minimum, int maximum, const Config::Info<int>
setValue(Config::Get(setting)); setValue(Config::Get(setting));
connect(this, &GraphicsSlider::valueChanged, this, &GraphicsSlider::Update); connect(this, &ConfigSlider::valueChanged, this, &ConfigSlider::Update);
connect(&Settings::Instance(), &Settings::ConfigChanged, this, [this] { connect(&Settings::Instance(), &Settings::ConfigChanged, this, [this] {
QFont bf = font(); QFont bf = font();
@ -30,7 +30,7 @@ GraphicsSlider::GraphicsSlider(int minimum, int maximum, const Config::Info<int>
}); });
} }
void GraphicsSlider::Update(int value) void ConfigSlider::Update(int value)
{ {
Config::SetBaseOrCurrent(m_setting, value); Config::SetBaseOrCurrent(m_setting, value);
} }

View File

@ -11,11 +11,11 @@ template <typename T>
class Info; class Info;
} }
class GraphicsSlider : public ToolTipSlider class ConfigSlider : public ToolTipSlider
{ {
Q_OBJECT Q_OBJECT
public: public:
GraphicsSlider(int minimum, int maximum, const Config::Info<int>& setting, int tick = 0); ConfigSlider(int minimum, int maximum, const Config::Info<int>& setting, int tick = 0);
void Update(int value); void Update(int value);
private: private:

View File

@ -19,8 +19,8 @@
#include "Core/ConfigLoaders/GameConfigLoader.h" #include "Core/ConfigLoaders/GameConfigLoader.h"
#include "Core/ConfigManager.h" #include "Core/ConfigManager.h"
#include "DolphinQt/Config/ConfigControls/ConfigSlider.h"
#include "DolphinQt/Config/GameConfigEdit.h" #include "DolphinQt/Config/GameConfigEdit.h"
#include "DolphinQt/Config/Graphics/GraphicsSlider.h"
#include "UICommon/GameFile.h" #include "UICommon/GameFile.h"

View File

@ -17,7 +17,7 @@
#include "DolphinQt/Config/ConfigControls/ConfigBool.h" #include "DolphinQt/Config/ConfigControls/ConfigBool.h"
#include "DolphinQt/Config/ConfigControls/ConfigChoice.h" #include "DolphinQt/Config/ConfigControls/ConfigChoice.h"
#include "DolphinQt/Config/ConfigControls/ConfigRadio.h" #include "DolphinQt/Config/ConfigControls/ConfigRadio.h"
#include "DolphinQt/Config/Graphics/GraphicsSlider.h" #include "DolphinQt/Config/ConfigControls/ConfigSlider.h"
#include "DolphinQt/Config/Graphics/GraphicsWindow.h" #include "DolphinQt/Config/Graphics/GraphicsWindow.h"
#include "DolphinQt/Config/Graphics/PostProcessingConfigWindow.h" #include "DolphinQt/Config/Graphics/PostProcessingConfigWindow.h"
#include "DolphinQt/QtUtils/NonDefaultQPushButton.h" #include "DolphinQt/QtUtils/NonDefaultQPushButton.h"
@ -160,8 +160,8 @@ void EnhancementsWidget::CreateWidgets()
m_3d_mode = new ConfigChoice({tr("Off"), tr("Side-by-Side"), tr("Top-and-Bottom"), tr("Anaglyph"), m_3d_mode = new ConfigChoice({tr("Off"), tr("Side-by-Side"), tr("Top-and-Bottom"), tr("Anaglyph"),
tr("HDMI 3D"), tr("Passive")}, tr("HDMI 3D"), tr("Passive")},
Config::GFX_STEREO_MODE); Config::GFX_STEREO_MODE);
m_3d_depth = new GraphicsSlider(0, Config::GFX_STEREO_DEPTH_MAXIMUM, Config::GFX_STEREO_DEPTH); m_3d_depth = new ConfigSlider(0, Config::GFX_STEREO_DEPTH_MAXIMUM, Config::GFX_STEREO_DEPTH);
m_3d_convergence = new GraphicsSlider(0, Config::GFX_STEREO_CONVERGENCE_MAXIMUM, m_3d_convergence = new ConfigSlider(0, Config::GFX_STEREO_CONVERGENCE_MAXIMUM,
Config::GFX_STEREO_CONVERGENCE, 100); Config::GFX_STEREO_CONVERGENCE, 100);
m_3d_swap_eyes = new ConfigBool(tr("Swap Eyes"), Config::GFX_STEREO_SWAP_EYES); m_3d_swap_eyes = new ConfigBool(tr("Swap Eyes"), Config::GFX_STEREO_SWAP_EYES);

View File

@ -9,7 +9,7 @@
class ConfigBool; class ConfigBool;
class ConfigChoice; class ConfigChoice;
class GraphicsSlider; class ConfigSlider;
class GraphicsWindow; class GraphicsWindow;
class QCheckBox; class QCheckBox;
class QComboBox; class QComboBox;
@ -49,8 +49,8 @@ private:
// Stereoscopy // Stereoscopy
ConfigChoice* m_3d_mode; ConfigChoice* m_3d_mode;
GraphicsSlider* m_3d_depth; ConfigSlider* m_3d_depth;
GraphicsSlider* m_3d_convergence; ConfigSlider* m_3d_convergence;
ConfigBool* m_3d_swap_eyes; ConfigBool* m_3d_swap_eyes;
int m_msaa_modes; int m_msaa_modes;

View File

@ -14,7 +14,7 @@
#include "Core/ConfigManager.h" #include "Core/ConfigManager.h"
#include "DolphinQt/Config/ConfigControls/ConfigBool.h" #include "DolphinQt/Config/ConfigControls/ConfigBool.h"
#include "DolphinQt/Config/Graphics/GraphicsSlider.h" #include "DolphinQt/Config/ConfigControls/ConfigSlider.h"
#include "DolphinQt/Config/Graphics/GraphicsWindow.h" #include "DolphinQt/Config/Graphics/GraphicsWindow.h"
#include "DolphinQt/Config/ToolTipControls/ToolTipSlider.h" #include "DolphinQt/Config/ToolTipControls/ToolTipSlider.h"
#include "DolphinQt/Settings.h" #include "DolphinQt/Settings.h"

View File

@ -57,6 +57,7 @@
<ClCompile Include="Config\ConfigControls\ConfigBool.cpp" /> <ClCompile Include="Config\ConfigControls\ConfigBool.cpp" />
<ClCompile Include="Config\ConfigControls\ConfigChoice.cpp" /> <ClCompile Include="Config\ConfigControls\ConfigChoice.cpp" />
<ClCompile Include="Config\ConfigControls\ConfigRadio.cpp" /> <ClCompile Include="Config\ConfigControls\ConfigRadio.cpp" />
<ClCompile Include="Config\ConfigControls\ConfigSlider.cpp" />
<ClCompile Include="Config\ControllerInterface\ControllerInterfaceWindow.cpp" /> <ClCompile Include="Config\ControllerInterface\ControllerInterfaceWindow.cpp" />
<ClCompile Include="Config\ControllerInterface\DualShockUDPClientAddServerDialog.cpp" /> <ClCompile Include="Config\ControllerInterface\DualShockUDPClientAddServerDialog.cpp" />
<ClCompile Include="Config\ControllerInterface\DualShockUDPClientWidget.cpp" /> <ClCompile Include="Config\ControllerInterface\DualShockUDPClientWidget.cpp" />
@ -74,7 +75,6 @@
<ClCompile Include="Config\Graphics\EnhancementsWidget.cpp" /> <ClCompile Include="Config\Graphics\EnhancementsWidget.cpp" />
<ClCompile Include="Config\Graphics\GeneralWidget.cpp" /> <ClCompile Include="Config\Graphics\GeneralWidget.cpp" />
<ClCompile Include="Config\Graphics\GraphicsInteger.cpp" /> <ClCompile Include="Config\Graphics\GraphicsInteger.cpp" />
<ClCompile Include="Config\Graphics\GraphicsSlider.cpp" />
<ClCompile Include="Config\Graphics\GraphicsWindow.cpp" /> <ClCompile Include="Config\Graphics\GraphicsWindow.cpp" />
<ClCompile Include="Config\Graphics\HacksWidget.cpp" /> <ClCompile Include="Config\Graphics\HacksWidget.cpp" />
<ClCompile Include="Config\Graphics\PostProcessingConfigWindow.cpp" /> <ClCompile Include="Config\Graphics\PostProcessingConfigWindow.cpp" />
@ -258,6 +258,7 @@
<QtMoc Include="Config\ConfigControls\ConfigBool.h" /> <QtMoc Include="Config\ConfigControls\ConfigBool.h" />
<QtMoc Include="Config\ConfigControls\ConfigChoice.h" /> <QtMoc Include="Config\ConfigControls\ConfigChoice.h" />
<QtMoc Include="Config\ConfigControls\ConfigRadio.h" /> <QtMoc Include="Config\ConfigControls\ConfigRadio.h" />
<QtMoc Include="Config\ConfigControls\ConfigSlider.h" />
<QtMoc Include="Config\ControllerInterface\ControllerInterfaceWindow.h" /> <QtMoc Include="Config\ControllerInterface\ControllerInterfaceWindow.h" />
<QtMoc Include="Config\ControllerInterface\DualShockUDPClientAddServerDialog.h" /> <QtMoc Include="Config\ControllerInterface\DualShockUDPClientAddServerDialog.h" />
<QtMoc Include="Config\ControllerInterface\DualShockUDPClientWidget.h" /> <QtMoc Include="Config\ControllerInterface\DualShockUDPClientWidget.h" />
@ -274,7 +275,6 @@
<QtMoc Include="Config\Graphics\EnhancementsWidget.h" /> <QtMoc Include="Config\Graphics\EnhancementsWidget.h" />
<QtMoc Include="Config\Graphics\GeneralWidget.h" /> <QtMoc Include="Config\Graphics\GeneralWidget.h" />
<QtMoc Include="Config\Graphics\GraphicsInteger.h" /> <QtMoc Include="Config\Graphics\GraphicsInteger.h" />
<QtMoc Include="Config\Graphics\GraphicsSlider.h" />
<QtMoc Include="Config\Graphics\GraphicsWidget.h" /> <QtMoc Include="Config\Graphics\GraphicsWidget.h" />
<QtMoc Include="Config\Graphics\GraphicsWindow.h" /> <QtMoc Include="Config\Graphics\GraphicsWindow.h" />
<QtMoc Include="Config\Graphics\HacksWidget.h" /> <QtMoc Include="Config\Graphics\HacksWidget.h" />