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