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