dolphin/Source/Core/DolphinQt/TAS/TASSpinBox.h
Stavros Kosmas d09436cd1a DolphinQt: Improve TAS UI Widgets
Made Stick and IR Widgets bigger
Improved Stick and IR layouts to better utilize space
Made Stick and IR Widgets Scale at a fixed ratio when window is resized
Added Scrollbars to Stick and IR Widgets
Reduced Spinbox padding in dark style
2026-03-12 04:59:49 +02:00

32 lines
698 B
C++

// Copyright 2023 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <QSpinBox>
#include "DolphinQt/TAS/TASControlState.h"
class TASInputWindow;
class TASSpinBox : public QSpinBox
{
Q_OBJECT
public:
explicit TASSpinBox(QWidget* parent = nullptr);
// Can be called from the CPU thread
int GetValue() const;
// Must be called from the CPU thread
void OnControllerValueChanged(int new_value);
QValidator::State validate(QString& input, int& pos) const override;
void fixup(QString& input) const override;
private slots:
void OnUIValueChanged(int new_value);
void ApplyControllerValueChange();
private:
TASControlState m_state;
};