2016-07-29 08:45:49 -04: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 14:02:29 -05:00
|
|
|
|
#include <array>
|
2016-09-20 11:21:23 -04:00
|
|
|
|
#include <memory>
|
2018-10-30 00:03:25 -04:00
|
|
|
|
|
2016-07-29 08:45:49 -04:00
|
|
|
|
#include <QKeyEvent>
|
2016-09-17 20:38:01 -04:00
|
|
|
|
#include <QWidget>
|
2018-10-30 00:03:25 -04:00
|
|
|
|
|
2016-07-29 08:45:49 -04:00
|
|
|
|
#include "ui_configure_input.h"
|
|
|
|
|
|
|
|
|
|
class QPushButton;
|
|
|
|
|
class QString;
|
|
|
|
|
class QTimer;
|
|
|
|
|
|
|
|
|
|
namespace Ui {
|
2016-09-17 20:38:01 -04:00
|
|
|
|
class ConfigureInput;
|
2016-07-29 08:45:49 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class ConfigureInput : public QWidget {
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit ConfigureInput(QWidget* parent = nullptr);
|
2018-12-02 14:06:39 -05:00
|
|
|
|
~ConfigureInput() override;
|
2016-07-29 08:45:49 -04:00
|
|
|
|
|
|
|
|
|
/// Save all button configurations to settings file
|
|
|
|
|
void applyConfiguration();
|
|
|
|
|
|
|
|
|
|
private:
|
2018-11-01 22:06:48 -04:00
|
|
|
|
void updateUIEnabled();
|
2017-12-05 23:26:29 -05:00
|
|
|
|
|
2018-11-04 10:18:59 -05:00
|
|
|
|
void OnDockedModeChanged(bool last_state, bool new_state);
|
|
|
|
|
|
2016-12-09 18:59:09 -05:00
|
|
|
|
/// Load configuration settings.
|
|
|
|
|
void loadConfiguration();
|
2016-07-29 08:45:49 -04:00
|
|
|
|
/// Restore all buttons to their default values.
|
|
|
|
|
void restoreDefaults();
|
2018-08-26 04:23:12 -04:00
|
|
|
|
|
2018-11-01 22:06:48 -04:00
|
|
|
|
std::unique_ptr<Ui::ConfigureInput> ui;
|
2017-12-05 23:26:29 -05:00
|
|
|
|
|
2018-11-04 10:18:59 -05:00
|
|
|
|
std::array<QComboBox*, 8> players_controller;
|
|
|
|
|
std::array<QPushButton*, 8> players_configure;
|
2016-07-29 08:45:49 -04:00
|
|
|
|
};
|