Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #11801 from Dentomologist/rename_graphicsinteger_t…
…o_configinteger

Qt: Rename GraphicsInteger to ConfigInteger
  • Loading branch information
lioncash committed Apr 29, 2023
2 parents 6e6865a + 57a1339 commit ad1240e
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 19 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/ConfigInteger.cpp
Config/ConfigControls/ConfigInteger.h
Config/ConfigControls/ConfigRadio.cpp
Config/ConfigControls/ConfigRadio.h
Config/ConfigControls/ConfigSlider.cpp
Expand Down Expand Up @@ -75,8 +77,6 @@ add_executable(dolphin-emu
Config/Graphics/EnhancementsWidget.h
Config/Graphics/GeneralWidget.cpp
Config/Graphics/GeneralWidget.h
Config/Graphics/GraphicsInteger.cpp
Config/Graphics/GraphicsInteger.h
Config/Graphics/GraphicsWidget.h
Config/Graphics/GraphicsWindow.cpp
Config/Graphics/GraphicsWindow.h
Expand Down
@@ -1,16 +1,15 @@
// Copyright 2019 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#include "DolphinQt/Config/Graphics/GraphicsInteger.h"
#include "DolphinQt/Config/ConfigControls/ConfigInteger.h"

#include <QSignalBlocker>

#include "Common/Config/Config.h"

#include "DolphinQt/Settings.h"

GraphicsInteger::GraphicsInteger(int minimum, int maximum, const Config::Info<int>& setting,
int step)
ConfigInteger::ConfigInteger(int minimum, int maximum, const Config::Info<int>& setting, int step)
: ToolTipSpinBox(), m_setting(setting)
{
setMinimum(minimum);
Expand All @@ -19,7 +18,7 @@ GraphicsInteger::GraphicsInteger(int minimum, int maximum, const Config::Info<in

setValue(Config::Get(setting));

connect(this, qOverload<int>(&GraphicsInteger::valueChanged), this, &GraphicsInteger::Update);
connect(this, qOverload<int>(&ConfigInteger::valueChanged), this, &ConfigInteger::Update);
connect(&Settings::Instance(), &Settings::ConfigChanged, this, [this] {
QFont bf = font();
bf.setBold(Config::GetActiveLayerForConfig(m_setting) != Config::LayerType::Base);
Expand All @@ -30,7 +29,7 @@ GraphicsInteger::GraphicsInteger(int minimum, int maximum, const Config::Info<in
});
}

void GraphicsInteger::Update(int value)
void ConfigInteger::Update(int value)
{
Config::SetBaseOrCurrent(m_setting, value);
}
Expand Up @@ -11,11 +11,11 @@ template <typename T>
class Info;
}

class GraphicsInteger : public ToolTipSpinBox
class ConfigInteger : public ToolTipSpinBox
{
Q_OBJECT
public:
GraphicsInteger(int minimum, int maximum, const Config::Info<int>& setting, int step = 1);
ConfigInteger(int minimum, int maximum, const Config::Info<int>& setting, int step = 1);
void Update(int value);

private:
Expand Down
8 changes: 4 additions & 4 deletions Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.cpp
Expand Up @@ -17,7 +17,7 @@

#include "DolphinQt/Config/ConfigControls/ConfigBool.h"
#include "DolphinQt/Config/ConfigControls/ConfigChoice.h"
#include "DolphinQt/Config/Graphics/GraphicsInteger.h"
#include "DolphinQt/Config/ConfigControls/ConfigInteger.h"
#include "DolphinQt/Config/Graphics/GraphicsWindow.h"
#include "DolphinQt/Config/ToolTipControls/ToolTipCheckBox.h"
#include "DolphinQt/QtUtils/SignalBlocking.h"
Expand Down Expand Up @@ -57,7 +57,7 @@ void AdvancedWidget::CreateWidgets()
m_show_graphs = new ConfigBool(tr("Show Performance Graphs"), Config::GFX_SHOW_GRAPHS);
m_show_speed = new ConfigBool(tr("Show % Speed"), Config::GFX_SHOW_SPEED);
m_show_speed_colors = new ConfigBool(tr("Show Speed Colors"), Config::GFX_SHOW_SPEED_COLORS);
m_perf_samp_window = new GraphicsInteger(0, 10000, Config::GFX_PERF_SAMP_WINDOW, 100);
m_perf_samp_window = new ConfigInteger(0, 10000, Config::GFX_PERF_SAMP_WINDOW, 100);
m_perf_samp_window->SetTitle(tr("Performance Sample Window (ms)"));
m_log_render_time =
new ConfigBool(tr("Log Render Time to File"), Config::GFX_LOG_RENDER_TIME_TO_FILE);
Expand Down Expand Up @@ -134,8 +134,8 @@ void AdvancedWidget::CreateWidgets()
m_use_fullres_framedumps = new ConfigBool(tr("Dump at Internal Resolution"),
Config::GFX_INTERNAL_RESOLUTION_FRAME_DUMPS);
m_dump_use_ffv1 = new ConfigBool(tr("Use Lossless Codec (FFV1)"), Config::GFX_USE_FFV1);
m_dump_bitrate = new GraphicsInteger(0, 1000000, Config::GFX_BITRATE_KBPS, 1000);
m_png_compression_level = new GraphicsInteger(0, 9, Config::GFX_PNG_COMPRESSION_LEVEL);
m_dump_bitrate = new ConfigInteger(0, 1000000, Config::GFX_BITRATE_KBPS, 1000);
m_png_compression_level = new ConfigInteger(0, 9, Config::GFX_PNG_COMPRESSION_LEVEL);

dump_layout->addWidget(m_use_fullres_framedumps, 0, 0);
#if defined(HAVE_FFMPEG)
Expand Down
8 changes: 4 additions & 4 deletions Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.h
Expand Up @@ -7,7 +7,7 @@

class ConfigBool;
class ConfigChoice;
class GraphicsInteger;
class ConfigInteger;
class GraphicsWindow;
class QCheckBox;
class QComboBox;
Expand Down Expand Up @@ -42,7 +42,7 @@ class AdvancedWidget final : public GraphicsWidget
ConfigBool* m_show_graphs;
ConfigBool* m_show_speed;
ConfigBool* m_show_speed_colors;
GraphicsInteger* m_perf_samp_window;
ConfigInteger* m_perf_samp_window;
ConfigBool* m_log_render_time;

// Utility
Expand All @@ -61,8 +61,8 @@ class AdvancedWidget final : public GraphicsWidget
// Frame dumping
ConfigBool* m_dump_use_ffv1;
ConfigBool* m_use_fullres_framedumps;
GraphicsInteger* m_dump_bitrate;
GraphicsInteger* m_png_compression_level;
ConfigInteger* m_dump_bitrate;
ConfigInteger* m_png_compression_level;

// Misc
ConfigBool* m_enable_cropping;
Expand Down
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\ConfigInteger.cpp" />
<ClCompile Include="Config\ConfigControls\ConfigRadio.cpp" />
<ClCompile Include="Config\ConfigControls\ConfigSlider.cpp" />
<ClCompile Include="Config\ControllerInterface\ControllerInterfaceWindow.cpp" />
Expand All @@ -74,7 +75,6 @@
<ClCompile Include="Config\Graphics\AdvancedWidget.cpp" />
<ClCompile Include="Config\Graphics\EnhancementsWidget.cpp" />
<ClCompile Include="Config\Graphics\GeneralWidget.cpp" />
<ClCompile Include="Config\Graphics\GraphicsInteger.cpp" />
<ClCompile Include="Config\Graphics\GraphicsWindow.cpp" />
<ClCompile Include="Config\Graphics\HacksWidget.cpp" />
<ClCompile Include="Config\Graphics\PostProcessingConfigWindow.cpp" />
Expand Down Expand Up @@ -255,6 +255,7 @@
<QtMoc Include="Config\CommonControllersWidget.h" />
<QtMoc Include="Config\ConfigControls\ConfigBool.h" />
<QtMoc Include="Config\ConfigControls\ConfigChoice.h" />
<QtMoc Include="Config\ConfigControls\ConfigInteger.h" />
<QtMoc Include="Config\ConfigControls\ConfigRadio.h" />
<QtMoc Include="Config\ConfigControls\ConfigSlider.h" />
<QtMoc Include="Config\ControllerInterface\ControllerInterfaceWindow.h" />
Expand All @@ -272,7 +273,6 @@
<QtMoc Include="Config\Graphics\AdvancedWidget.h" />
<QtMoc Include="Config\Graphics\EnhancementsWidget.h" />
<QtMoc Include="Config\Graphics\GeneralWidget.h" />
<QtMoc Include="Config\Graphics\GraphicsInteger.h" />
<QtMoc Include="Config\Graphics\GraphicsWidget.h" />
<QtMoc Include="Config\Graphics\GraphicsWindow.h" />
<QtMoc Include="Config\Graphics\HacksWidget.h" />
Expand Down

0 comments on commit ad1240e

Please sign in to comment.