2017-05-09 16:49:10 +00:00
|
|
|
// Copyright 2017 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
|
|
|
|
#include <array>
|
|
|
|
|
2017-05-20 15:53:17 +00:00
|
|
|
class MappingWindow;
|
2017-05-09 16:49:10 +00:00
|
|
|
class QDialogButtonBox;
|
|
|
|
class QCheckBox;
|
|
|
|
class QComboBox;
|
|
|
|
class QHBoxLayout;
|
2017-05-27 02:14:20 +00:00
|
|
|
class QGridLayout;
|
2017-05-09 16:49:10 +00:00
|
|
|
class QGroupBox;
|
|
|
|
class QLabel;
|
|
|
|
class QVBoxLayout;
|
|
|
|
class QPushButton;
|
|
|
|
class QRadioButton;
|
|
|
|
|
|
|
|
class ControllersWindow final : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit ControllersWindow(QWidget* parent);
|
|
|
|
|
|
|
|
private:
|
2020-01-22 00:50:05 +00:00
|
|
|
void OnWiimoteModeChanged();
|
|
|
|
void UpdateDisabledWiimoteControls();
|
2017-05-09 16:49:10 +00:00
|
|
|
void OnGCTypeChanged(int state);
|
|
|
|
void SaveSettings();
|
|
|
|
void OnBluetoothPassthroughSyncPressed();
|
|
|
|
void OnBluetoothPassthroughResetPressed();
|
2017-05-15 03:14:45 +00:00
|
|
|
void OnWiimoteRefreshPressed();
|
2017-05-09 16:49:10 +00:00
|
|
|
void OnGCPadConfigure();
|
|
|
|
void OnWiimoteConfigure();
|
2019-10-22 23:49:48 +00:00
|
|
|
void OnControllerInterfaceConfigure();
|
2017-05-09 16:49:10 +00:00
|
|
|
|
|
|
|
void CreateGamecubeLayout();
|
|
|
|
void CreateWiimoteLayout();
|
2019-10-21 23:43:37 +00:00
|
|
|
void CreateCommonLayout();
|
2017-05-09 16:49:10 +00:00
|
|
|
void CreateMainLayout();
|
|
|
|
void ConnectWidgets();
|
|
|
|
void LoadSettings();
|
|
|
|
|
|
|
|
// Main
|
|
|
|
QDialogButtonBox* m_button_box;
|
|
|
|
|
|
|
|
// Gamecube
|
|
|
|
QGroupBox* m_gc_box;
|
2017-05-27 02:14:20 +00:00
|
|
|
QGridLayout* m_gc_layout;
|
2017-05-09 16:49:10 +00:00
|
|
|
std::array<QComboBox*, 4> m_gc_controller_boxes;
|
|
|
|
std::array<QPushButton*, 4> m_gc_buttons;
|
|
|
|
std::array<QHBoxLayout*, 4> m_gc_groups;
|
|
|
|
|
|
|
|
// Wii Remote
|
|
|
|
QGroupBox* m_wiimote_box;
|
2017-05-27 02:14:20 +00:00
|
|
|
QGridLayout* m_wiimote_layout;
|
2017-05-09 16:49:10 +00:00
|
|
|
std::array<QLabel*, 4> m_wiimote_labels;
|
|
|
|
std::array<QComboBox*, 4> m_wiimote_boxes;
|
|
|
|
std::array<QPushButton*, 4> m_wiimote_buttons;
|
|
|
|
std::array<QHBoxLayout*, 4> m_wiimote_groups;
|
|
|
|
std::array<QLabel*, 2> m_wiimote_pt_labels;
|
|
|
|
|
|
|
|
QRadioButton* m_wiimote_emu;
|
|
|
|
QRadioButton* m_wiimote_passthrough;
|
|
|
|
QPushButton* m_wiimote_sync;
|
|
|
|
QPushButton* m_wiimote_reset;
|
|
|
|
QCheckBox* m_wiimote_continuous_scanning;
|
|
|
|
QCheckBox* m_wiimote_real_balance_board;
|
|
|
|
QCheckBox* m_wiimote_speaker_data;
|
2020-01-22 00:50:05 +00:00
|
|
|
QCheckBox* m_wiimote_ciface;
|
2017-05-15 03:14:45 +00:00
|
|
|
QPushButton* m_wiimote_refresh;
|
2017-05-09 16:49:10 +00:00
|
|
|
|
2019-10-21 23:43:37 +00:00
|
|
|
// Common
|
|
|
|
QGroupBox* m_common_box;
|
2019-10-22 23:49:48 +00:00
|
|
|
QVBoxLayout* m_common_layout;
|
2019-10-21 23:43:37 +00:00
|
|
|
QCheckBox* m_common_bg_input;
|
2019-10-22 23:49:48 +00:00
|
|
|
QPushButton* m_common_configure_controller_interface;
|
2017-05-09 16:49:10 +00:00
|
|
|
};
|