| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <QLabel> |
| 7 |
|
| 8 |
#include "DolphinQt/Config/ConfigControls/ConfigControl.h" |
| 9 |
#include "DolphinQt/Config/ToolTipControls/ToolTipSlider.h" |
| 10 |
|
| 11 |
#include "Common/Config/ConfigInfo.h" |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
class ConfigFloatSlider final : public ConfigControl<ToolTipSlider> |
| 16 |
{ |
| 17 |
Q_OBJECT |
| 18 |
public: |
| 19 |
ConfigFloatSlider(float minimum, float maximum, const Config::Info<float>& setting, float step, |
| 20 |
Config::Layer* layer = nullptr); |
| 21 |
void Update(int value); |
| 22 |
|
| 23 |
|
| 24 |
float GetValue() const; |
| 25 |
|
| 26 |
protected: |
| 27 |
void OnConfigChanged() override; |
| 28 |
|
| 29 |
private: |
| 30 |
float m_minimum; |
| 31 |
float m_step; |
| 32 |
const Config::Info<float> m_setting; |
| 33 |
}; |
| 34 |
|
| 35 |
class ConfigFloatLabel final : public QLabel |
| 36 |
{ |
| 37 |
public: |
| 38 |
ConfigFloatLabel(const QString& text, ConfigFloatSlider* widget); |
| 39 |
}; |