mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-03-18 11:23:38 +00:00
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
32 lines
698 B
C++
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;
|
|
};
|