mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-25 11:20:15 +00:00
Cleanup
This commit is contained in:
parent
071d0325a3
commit
4ba93b819a
@ -3,6 +3,7 @@
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <utility>
|
||||
#include <QTimer>
|
||||
|
||||
#include "citra_qt/configure_input.h"
|
||||
|
||||
@ -45,6 +46,7 @@ ConfigureInput::ConfigureInput(QWidget* parent) :
|
||||
}
|
||||
connect(ui->btnRestoreDefaults, SIGNAL(released()), this, SLOT(restoreDefaults()));
|
||||
setFocusPolicy(Qt::ClickFocus);
|
||||
timer = new QTimer(this);
|
||||
timer->setSingleShot(true);
|
||||
connect(timer, &QTimer::timeout, this, [&]() { key_pressed = Qt::Key_Escape; setKey(); });
|
||||
this->setConfiguration();
|
||||
|
@ -7,7 +7,6 @@
|
||||
#include <memory>
|
||||
#include <QWidget>
|
||||
#include <QKeyEvent>
|
||||
#include <QTimer>
|
||||
|
||||
#include "citra_qt/config.h"
|
||||
#include "core/settings.h"
|
||||
@ -15,6 +14,7 @@
|
||||
|
||||
class QPushButton;
|
||||
class QString;
|
||||
class QTimer;
|
||||
|
||||
namespace Ui {
|
||||
class ConfigureInput;
|
||||
@ -35,15 +35,15 @@ private:
|
||||
int key_pressed;
|
||||
QPushButton* changing_button = nullptr; /// button currently waiting for key press.
|
||||
QString previous_mapping;
|
||||
QTimer* timer = new QTimer(this);
|
||||
QTimer* timer;
|
||||
|
||||
void setConfiguration();
|
||||
void removeDuplicates(const QString& newValue);
|
||||
void keyPressEvent(QKeyEvent* event) override;
|
||||
QString getKeyName(int key_code) const;
|
||||
Qt::Key getKeyValue(const QString& text) const;
|
||||
void setKey();
|
||||
private Q_SLOTS:
|
||||
void setKey();
|
||||
private Q_SLOTS:
|
||||
void handleClick();
|
||||
void restoreDefaults();
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user