Qt: Add 'Enable Touchpad' to Controller Settings

Have to shuffle a few other things around to fit in 768p.
This commit is contained in:
Stenzek 2025-01-07 13:41:01 +10:00
parent 0a124ee839
commit 1063c3da7f
No known key found for this signature in database
3 changed files with 97 additions and 94 deletions

View File

@ -21,6 +21,10 @@ ControllerGlobalSettingsWidget::ControllerGlobalSettingsWidget(QWidget* parent,
ControllerSettingWidgetBinder::BindWidgetToInputProfileBool(sif, m_ui.enableSDLSource, "InputSources", "SDL", true); ControllerSettingWidgetBinder::BindWidgetToInputProfileBool(sif, m_ui.enableSDLSource, "InputSources", "SDL", true);
ControllerSettingWidgetBinder::BindWidgetToInputProfileBool(sif, m_ui.enableSDLEnhancedMode, "InputSources", ControllerSettingWidgetBinder::BindWidgetToInputProfileBool(sif, m_ui.enableSDLEnhancedMode, "InputSources",
"SDLControllerEnhancedMode", false); "SDLControllerEnhancedMode", false);
ControllerSettingWidgetBinder::BindWidgetToInputProfileBool(sif, m_ui.enableTouchPadAsPointer, "InputSources",
"SDLTouchpadAsPointer", false);
ControllerSettingWidgetBinder::BindWidgetToInputProfileBool(sif, m_ui.enableSDLPS5PlayerLED, "InputSources",
"SDLPS5PlayerLED", false);
connect(m_ui.enableSDLSource, &QCheckBox::checkStateChanged, this, connect(m_ui.enableSDLSource, &QCheckBox::checkStateChanged, this,
&ControllerGlobalSettingsWidget::updateSDLOptionsEnabled); &ControllerGlobalSettingsWidget::updateSDLOptionsEnabled);
connect(m_ui.ledSettings, &QToolButton::clicked, this, &ControllerGlobalSettingsWidget::ledSettingsClicked); connect(m_ui.ledSettings, &QToolButton::clicked, this, &ControllerGlobalSettingsWidget::ledSettingsClicked);
@ -137,7 +141,13 @@ void ControllerGlobalSettingsWidget::ledSettingsClicked()
void ControllerGlobalSettingsWidget::updateSDLOptionsEnabled() void ControllerGlobalSettingsWidget::updateSDLOptionsEnabled()
{ {
const bool enabled = m_ui.enableSDLSource->isChecked(); const bool enabled = m_ui.enableSDLSource->isChecked();
if (m_ui.enableSDLEnhancedMode)
m_ui.enableSDLEnhancedMode->setEnabled(enabled); m_ui.enableSDLEnhancedMode->setEnabled(enabled);
if (m_ui.enableTouchPadAsPointer)
m_ui.enableTouchPadAsPointer->setEnabled(enabled);
if (m_ui.enableSDLPS5PlayerLED)
m_ui.enableSDLPS5PlayerLED->setEnabled(enabled);
if (m_ui.ledSettings)
m_ui.ledSettings->setEnabled(enabled); m_ui.ledSettings->setEnabled(enabled);
} }
@ -151,10 +161,6 @@ ControllerLEDSettingsDialog::ControllerLEDSettingsDialog(QWidget* parent, Contro
linkButton(m_ui.SDL2LED, 2); linkButton(m_ui.SDL2LED, 2);
linkButton(m_ui.SDL3LED, 3); linkButton(m_ui.SDL3LED, 3);
SettingsInterface* sif = dialog->getEditingSettingsInterface();
ControllerSettingWidgetBinder::BindWidgetToInputProfileBool(sif, m_ui.enableSDLPS5PlayerLED, "InputSources",
"SDLPS5PlayerLED", false);
connect(m_ui.buttonBox->button(QDialogButtonBox::Close), &QPushButton::clicked, this, &QDialog::accept); connect(m_ui.buttonBox->button(QDialogButtonBox::Close), &QPushButton::clicked, this, &QDialog::accept);
} }

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>902</width> <width>902</width>
<height>800</height> <height>743</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="mainLayout" columnstretch="1,0"> <layout class="QGridLayout" name="mainLayout" columnstretch="1,0">
@ -109,13 +109,17 @@
<string>SDL Input Source</string> <string>SDL Input Source</string>
</property> </property>
<layout class="QGridLayout" name="sdlGridLayout"> <layout class="QGridLayout" name="sdlGridLayout">
<item row="0" column="0" colspan="2"> <item row="3" column="1">
<widget class="QLabel" name="label_2"> <widget class="QCheckBox" name="enableSDLMFIDriver">
<property name="text"> <property name="text">
<string>The SDL input source supports most controllers, and provides advanced functionality for DualShock 4 / DualSense pads in Bluetooth mode (Vibration / LED Control).</string> <string>Enable MFI Driver</string>
</property> </property>
<property name="wordWrap"> </widget>
<bool>true</bool> </item>
<item row="3" column="0">
<widget class="QCheckBox" name="enableSDLIOKitDriver">
<property name="text">
<string>Enable IOKit Driver</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -126,15 +130,45 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="label_2">
<property name="text">
<string>The SDL input source supports most controllers, and provides Vibration/LED functionality for DualShock 4 / DualSense pads in Bluetooth mode.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="enableTouchPadAsPointer">
<property name="text">
<string>Enable Touchpad</string>
</property>
</widget>
</item>
<item row="1" column="1"> <item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QCheckBox" name="enableSDLEnhancedMode"> <widget class="QCheckBox" name="enableSDLEnhancedMode">
<property name="text"> <property name="text">
<string>DualShock 4 / DualSense Enhanced Mode</string> <string>DualShock 4 / DualSense Enhanced Mode</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QCheckBox" name="enableSDLPS5PlayerLED">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Enable DualSense Player LED</string>
</property>
</widget>
</item>
<item> <item>
<widget class="QToolButton" name="ledSettings"> <widget class="QToolButton" name="ledSettings">
<property name="toolTip"> <property name="toolTip">
@ -147,20 +181,6 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="2" column="0">
<widget class="QCheckBox" name="enableSDLIOKitDriver">
<property name="text">
<string>Enable IOKit Driver</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="enableSDLMFIDriver">
<property name="text">
<string>Enable MFI Driver</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
@ -287,6 +307,24 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="3" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QCheckBox" name="enableMouseMapping">
<property name="text">
<string>Enable Mouse Mapping</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="enableRawInput">
<property name="text">
<string>Use Raw Input</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QLabel" name="label_6"> <widget class="QLabel" name="label_6">
<property name="text"> <property name="text">
@ -342,24 +380,6 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="3" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QCheckBox" name="enableMouseMapping">
<property name="text">
<string>Enable Mouse Mapping</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="enableRawInput">
<property name="text">
<string>Use Raw Input</string>
</property>
</widget>
</item>
</layout>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
@ -371,7 +391,7 @@
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>40</height> <height>1</height>
</size> </size>
</property> </property>
</spacer> </spacer>

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>501</width> <width>501</width>
<height>128</height> <height>108</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -38,18 +38,6 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="0" column="2">
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>SDL-2 LED</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="ColorPickerButton" name="SDL2LED"/>
</item>
</layout>
</widget>
</item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QGroupBox" name="groupBox_2"> <widget class="QGroupBox" name="groupBox_2">
<property name="title"> <property name="title">
@ -62,28 +50,19 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="3" column="0" colspan="4"> <item row="0" column="2">
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0"> <widget class="QGroupBox" name="groupBox_3">
<property name="sizeConstraint"> <property name="title">
<enum>QLayout::SetDefaultConstraint</enum> <string>SDL-2 LED</string>
</property>
<property name="bottomMargin">
<number>0</number>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item> <item>
<widget class="QCheckBox" name="enableSDLPS5PlayerLED"> <widget class="ColorPickerButton" name="SDL2LED"/>
<property name="sizePolicy"> </item>
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> </layout>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Enable DualSense Player LED</string>
</property>
</widget> </widget>
</item> </item>
<item> <item row="1" column="2" colspan="2">
<widget class="QDialogButtonBox" name="buttonBox"> <widget class="QDialogButtonBox" name="buttonBox">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@ -92,13 +71,11 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="standardButtons"> <property name="standardButtons">
<set>QDialogButtonBox::Close</set> <set>QDialogButtonBox::StandardButton::Close</set>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item>
</layout>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>