| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <QSpinBox> |
| 7 |
|
| 8 |
#include "DolphinQt/TAS/TASControlState.h" |
| 9 |
|
| 10 |
class TASInputWindow; |
| 11 |
|
| 12 |
class TASSpinBox : public QSpinBox |
| 13 |
{ |
| 14 |
Q_OBJECT |
| 15 |
public: |
| 16 |
explicit TASSpinBox(QWidget* parent = nullptr); |
| 17 |
|
| 18 |
|
| 19 |
int GetValue() const; |
| 20 |
|
| 21 |
void OnControllerValueChanged(int new_value); |
| 22 |
QValidator::State validate(QString& input, int& pos) const override; |
| 23 |
void fixup(QString& input) const override; |
| 24 |
|
| 25 |
private slots: |
| 26 |
void OnUIValueChanged(int new_value); |
| 27 |
void ApplyControllerValueChange(); |
| 28 |
|
| 29 |
private: |
| 30 |
TASControlState m_state; |
| 31 |
}; |