mirror of
https://github.com/jpd002/Play-.git
synced 2025-04-28 13:47:57 +03:00
61 lines
1.6 KiB
C++
61 lines
1.6 KiB
C++
#pragma once
|
|
|
|
#include <QDialog>
|
|
#include <QAbstractButton>
|
|
|
|
#include "../input/InputBindingManager.h"
|
|
|
|
namespace Ui
|
|
{
|
|
class ControllerConfigDialog;
|
|
}
|
|
|
|
class QTableView;
|
|
class QSlider;
|
|
class QLabel;
|
|
class QComboBox;
|
|
class CInputProviderQtKey;
|
|
class CInputProviderQtMouse;
|
|
|
|
class ControllerConfigDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ControllerConfigDialog(CInputBindingManager*, CInputProviderQtKey*, CInputProviderQtMouse*, QWidget* parent = 0);
|
|
~ControllerConfigDialog();
|
|
|
|
static void AutoConfigureKeyboard(uint32 padIndex, CInputBindingManager*);
|
|
|
|
private slots:
|
|
void bindingsViewDoubleClicked(const QModelIndex& index);
|
|
void bindingsViewDeleteItem();
|
|
void analogSensitivityValueChanged(uint32, int);
|
|
|
|
void on_buttonBox_clicked(QAbstractButton* button);
|
|
void on_ConfigAllButton_clicked();
|
|
|
|
void on_comboBox_currentIndexChanged(int index);
|
|
void on_addProfileButton_clicked();
|
|
void on_delProfileButton_clicked();
|
|
|
|
private:
|
|
struct PadUiElements
|
|
{
|
|
QTableView* bindingsView = nullptr;
|
|
QSlider* analogSensitivitySlider = nullptr;
|
|
QLabel* analogSensitivityValueLabel = nullptr;
|
|
QComboBox* hapticFeedbackComboBox = nullptr;
|
|
};
|
|
|
|
void PrepareBindingsView(uint32 padIndex);
|
|
void PrepareProfiles();
|
|
int OpenBindConfigDialog(uint32 padIndex, uint32 buttonIndex);
|
|
void UpdateAnalogSensitivityValueLabel(uint32 padIndex);
|
|
|
|
Ui::ControllerConfigDialog* ui;
|
|
CInputBindingManager* m_inputManager = nullptr;
|
|
CInputProviderQtKey* m_qtKeyInputProvider = nullptr;
|
|
CInputProviderQtMouse* m_qtMouseInputProvider = nullptr;
|
|
std::vector<PadUiElements> m_padUiElements;
|
|
};
|