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
|
||||
@ -13,7 +14,7 @@ class Info;
|
||||
|
||||
// Automatically converts an int slider into a float one.
|
||||
// Do not read the int values or ranges directly from it.
|
||||
class ConfigFloatSlider : public ToolTipSlider
|
||||
class ConfigFloatSlider final : public ConfigControl<ToolTipSlider>
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@ -23,6 +24,9 @@ public:
|
||||
// Returns the adjusted float value
|
||||
float GetValue() const;
|
||||
|
||||
protected:
|
||||
void OnConfigChanged() override;
|
||||
|
||||
private:
|
||||
float m_minimum;
|
||||
float m_step;
|
||||
|
Reference in New Issue
Block a user