2019-07-17 20:15:25 +02:00
|
|
|
// Copyright 2019 Dolphin Emulator Project
|
2021-07-05 03:22:19 +02:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2019-07-17 20:15:25 +02:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2024-09-29 17:12:22 -07:00
|
|
|
#include <QLabel>
|
|
|
|
#include <QPointer>
|
|
|
|
|
2024-09-17 23:29:13 -07:00
|
|
|
#include "DolphinQt/Config/ConfigControls/ConfigControl.h"
|
2020-10-17 00:05:43 -05:00
|
|
|
#include "DolphinQt/Config/ToolTipControls/ToolTipSpinBox.h"
|
2019-07-17 20:15:25 +02:00
|
|
|
|
|
|
|
namespace Config
|
|
|
|
{
|
|
|
|
template <typename T>
|
2020-09-20 13:58:17 +02:00
|
|
|
class Info;
|
2019-07-17 20:15:25 +02:00
|
|
|
}
|
|
|
|
|
2024-09-17 23:29:13 -07:00
|
|
|
class ConfigInteger final : public ConfigControl<ToolTipSpinBox>
|
2019-07-17 20:15:25 +02:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2023-04-28 19:41:09 -07:00
|
|
|
ConfigInteger(int minimum, int maximum, const Config::Info<int>& setting, int step = 1);
|
2024-09-17 23:29:13 -07:00
|
|
|
ConfigInteger(int minimum, int maximum, const Config::Info<int>& setting, Config::Layer* layer,
|
|
|
|
int step = 1);
|
|
|
|
|
2019-07-17 20:15:25 +02:00
|
|
|
void Update(int value);
|
|
|
|
|
2024-09-17 23:29:13 -07:00
|
|
|
protected:
|
|
|
|
void OnConfigChanged() override;
|
|
|
|
|
2019-07-17 20:15:25 +02:00
|
|
|
private:
|
2020-05-02 14:39:40 +02:00
|
|
|
const Config::Info<int>& m_setting;
|
2019-07-17 20:15:25 +02:00
|
|
|
};
|
2024-09-29 17:12:22 -07:00
|
|
|
|
|
|
|
class ConfigIntegerLabel final : public QLabel
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
ConfigIntegerLabel(const QString& text, ConfigInteger* widget);
|
|
|
|
|
|
|
|
private:
|
|
|
|
QPointer<ConfigInteger> m_widget;
|
|
|
|
};
|