mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
DolphinQt: Refactor, add ConfigControl class
This reduces code duplication in the different ConfigControls. This is helpful for the next commit, which will modify the now deduplicated code.
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "DolphinQt/Config/ConfigControls/ConfigControl.h"
|
||||
#include "DolphinQt/Config/ToolTipControls/ToolTipSlider.h"
|
||||
|
||||
namespace Config
|
||||
@ -11,13 +12,16 @@ template <typename T>
|
||||
class Info;
|
||||
}
|
||||
|
||||
class ConfigSlider : public ToolTipSlider
|
||||
class ConfigSlider final : public ConfigControl<ToolTipSlider>
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ConfigSlider(int minimum, int maximum, const Config::Info<int>& setting, int tick = 0);
|
||||
void Update(int value);
|
||||
|
||||
protected:
|
||||
void OnConfigChanged() override;
|
||||
|
||||
private:
|
||||
const Config::Info<int>& m_setting;
|
||||
};
|
||||
|
Reference in New Issue
Block a user