mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-15 11:22:44 +01:00
f3253d0f14
The previous code could potentially be a compilation issue waiting to occur, given we forward declare the type for a std::unique_ptr. If the complete definition of the forward declared type isn't visible in a translation unit that the class is used in, then it would fail to compile. Defaulting the destructor in a cpp file ensures the std::unique_ptr's destructor is only invoked where its complete type is known.
47 lines
985 B
C++
47 lines
985 B
C++
// Copyright 2016 Citra Emulator Project
|
|
// Licensed under GPLv2 or any later version
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include <array>
|
|
#include <memory>
|
|
|
|
#include <QKeyEvent>
|
|
#include <QWidget>
|
|
|
|
#include "ui_configure_input.h"
|
|
|
|
class QPushButton;
|
|
class QString;
|
|
class QTimer;
|
|
|
|
namespace Ui {
|
|
class ConfigureInput;
|
|
}
|
|
|
|
class ConfigureInput : public QWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ConfigureInput(QWidget* parent = nullptr);
|
|
~ConfigureInput() override;
|
|
|
|
/// Save all button configurations to settings file
|
|
void applyConfiguration();
|
|
|
|
private:
|
|
void updateUIEnabled();
|
|
|
|
void OnDockedModeChanged(bool last_state, bool new_state);
|
|
|
|
/// Load configuration settings.
|
|
void loadConfiguration();
|
|
/// Restore all buttons to their default values.
|
|
void restoreDefaults();
|
|
|
|
std::unique_ptr<Ui::ConfigureInput> ui;
|
|
|
|
std::array<QComboBox*, 8> players_controller;
|
|
std::array<QPushButton*, 8> players_configure;
|
|
};
|