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