2016-07-29 14:45:49 +02:00
|
|
|
|
// Copyright 2016 Citra Emulator Project
|
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2017-01-22 20:02:29 +01:00
|
|
|
|
#include <array>
|
2016-09-20 17:21:23 +02:00
|
|
|
|
#include <memory>
|
2018-10-30 05:03:25 +01:00
|
|
|
|
|
2016-07-29 14:45:49 +02:00
|
|
|
|
#include <QKeyEvent>
|
2016-09-18 02:38:01 +02:00
|
|
|
|
#include <QWidget>
|
2018-10-30 05:03:25 +01:00
|
|
|
|
|
2016-07-29 14:45:49 +02:00
|
|
|
|
#include "ui_configure_input.h"
|
|
|
|
|
|
|
|
|
|
class QPushButton;
|
|
|
|
|
class QString;
|
|
|
|
|
class QTimer;
|
|
|
|
|
|
|
|
|
|
namespace Ui {
|
2016-09-18 02:38:01 +02:00
|
|
|
|
class ConfigureInput;
|
2016-07-29 14:45:49 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class ConfigureInput : public QWidget {
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit ConfigureInput(QWidget* parent = nullptr);
|
|
|
|
|
|
|
|
|
|
/// Save all button configurations to settings file
|
|
|
|
|
void applyConfiguration();
|
|
|
|
|
|
|
|
|
|
private:
|
2018-11-02 03:06:48 +01:00
|
|
|
|
void updateUIEnabled();
|
2017-12-06 05:26:29 +01:00
|
|
|
|
|
2018-11-04 16:18:59 +01:00
|
|
|
|
void OnDockedModeChanged(bool last_state, bool new_state);
|
|
|
|
|
|
2016-12-10 00:59:09 +01:00
|
|
|
|
/// Load configuration settings.
|
|
|
|
|
void loadConfiguration();
|
2016-07-29 14:45:49 +02:00
|
|
|
|
/// Restore all buttons to their default values.
|
|
|
|
|
void restoreDefaults();
|
2018-08-26 10:23:12 +02:00
|
|
|
|
|
2018-11-02 03:06:48 +01:00
|
|
|
|
std::unique_ptr<Ui::ConfigureInput> ui;
|
2017-12-06 05:26:29 +01:00
|
|
|
|
|
2018-11-04 16:18:59 +01:00
|
|
|
|
std::array<QComboBox*, 8> players_controller;
|
|
|
|
|
std::array<QPushButton*, 8> players_configure;
|
2016-07-29 14:45:49 +02:00
|
|
|
|
};
|