| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <QWidget> |
| 7 |
|
| 8 |
#include <array> |
| 9 |
|
| 10 |
class QComboBox; |
| 11 |
class QHBoxLayout; |
| 12 |
class QGridLayout; |
| 13 |
class QGroupBox; |
| 14 |
class QPushButton; |
| 15 |
|
| 16 |
namespace Core |
| 17 |
{ |
| 18 |
enum class State; |
| 19 |
} |
| 20 |
|
| 21 |
class GamecubeControllersWidget final : public QWidget |
| 22 |
{ |
| 23 |
Q_OBJECT |
| 24 |
public: |
| 25 |
explicit GamecubeControllersWidget(QWidget* parent); |
| 26 |
|
| 27 |
private: |
| 28 |
void LoadSettings(Core::State state); |
| 29 |
void SaveSettings(); |
| 30 |
|
| 31 |
void OnGCTypeChanged(size_t index); |
| 32 |
void OnGCPadConfigure(size_t index); |
| 33 |
|
| 34 |
void CreateLayout(); |
| 35 |
void ConnectWidgets(); |
| 36 |
|
| 37 |
|
| 38 |
QGroupBox* m_gc_box; |
| 39 |
QGridLayout* m_gc_layout; |
| 40 |
std::array<QComboBox*, 4> m_gc_controller_boxes; |
| 41 |
std::array<QPushButton*, 4> m_gc_buttons; |
| 42 |
std::array<QHBoxLayout*, 4> m_gc_groups; |
| 43 |
}; |