Fix build. Again.

This commit is contained in:
Steven Cherry 2016-06-21 22:22:22 -05:00 committed by Anon
parent ee8b3cba8c
commit f5a275e8c4

View File

@ -1,50 +1,50 @@
// Copyright 2016 Citra Emulator Project // Copyright 2016 Citra Emulator Project
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#pragma once #pragma once
#include <memory> #include <memory>
#include <QWidget> #include <QWidget>
#include <QKeyEvent> #include <QKeyEvent>
#include <QTimer> #include <QTimer>
#include "citra_qt/config.h" #include "citra_qt/config.h"
#include "core/settings.h" #include "core/settings.h"
#include "ui_configure_input.h" #include "ui_configure_input.h"
class QPushButton; class QPushButton;
class QString; class QString;
namespace Ui { namespace Ui {
class ConfigureInput; class ConfigureInput;
} }
class ConfigureInput : public QWidget class ConfigureInput : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit ConfigureInput(QWidget* parent = nullptr); explicit ConfigureInput(QWidget* parent = nullptr);
~ConfigureInput(); ~ConfigureInput();
void applyConfiguration(); void applyConfiguration();
public Q_SLOTS: public Q_SLOTS:
void handleClick(); void handleClick();
void restoreDefaults(); void restoreDefaults();
private: private:
std::unique_ptr<Ui::ConfigureInput> ui; std::unique_ptr<Ui::ConfigureInput> ui;
std::map<Settings::NativeInput::Values, QPushButton*> input_mapping; std::map<Settings::NativeInput::Values, QPushButton*> input_mapping;
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(); QTimer* timer = new QTimer();
void setConfiguration(); void setConfiguration();
void removeDuplicates(const QString& newValue); void removeDuplicates(const QString& newValue);
void keyPressEvent(QKeyEvent* event) override; void keyPressEvent(QKeyEvent* event) override;
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;
private Q_SLOTS: private Q_SLOTS:
void setKey(); void setKey();
}; };