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.enableSDLEnhancedMode, "InputSources",
"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,
&ControllerGlobalSettingsWidget::updateSDLOptionsEnabled);
connect(m_ui.ledSettings, &QToolButton::clicked, this, &ControllerGlobalSettingsWidget::ledSettingsClicked);
@ -137,8 +141,14 @@ void ControllerGlobalSettingsWidget::ledSettingsClicked()
void ControllerGlobalSettingsWidget::updateSDLOptionsEnabled()
{
const bool enabled = m_ui.enableSDLSource->isChecked();
m_ui.enableSDLEnhancedMode->setEnabled(enabled);
m_ui.ledSettings->setEnabled(enabled);
if (m_ui.enableSDLEnhancedMode)
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);
}
ControllerLEDSettingsDialog::ControllerLEDSettingsDialog(QWidget* parent, ControllerSettingsWindow* dialog)
@ -151,10 +161,6 @@ ControllerLEDSettingsDialog::ControllerLEDSettingsDialog(QWidget* parent, Contro
linkButton(m_ui.SDL2LED, 2);
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);
}

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>902</width>
<height>800</height>
<height>743</height>
</rect>
</property>
<layout class="QGridLayout" name="mainLayout" columnstretch="1,0">
@ -98,7 +98,7 @@
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="multitapMode" />
<widget class="QComboBox" name="multitapMode"/>
</item>
</layout>
</widget>
@ -109,13 +109,17 @@
<string>SDL Input Source</string>
</property>
<layout class="QGridLayout" name="sdlGridLayout">
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="label_2">
<item row="3" column="1">
<widget class="QCheckBox" name="enableSDLMFIDriver">
<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 name="wordWrap">
<bool>true</bool>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="enableSDLIOKitDriver">
<property name="text">
<string>Enable IOKit Driver</string>
</property>
</widget>
</item>
@ -126,12 +130,42 @@
</property>
</widget>
</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">
<widget class="QCheckBox" name="enableSDLEnhancedMode">
<property name="text">
<string>DualShock 4 / DualSense Enhanced Mode</string>
</property>
</widget>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QCheckBox" name="enableSDLEnhancedMode">
<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>DualShock 4 / DualSense Enhanced Mode</string>
<string>Enable DualSense Player LED</string>
</property>
</widget>
</item>
@ -147,20 +181,6 @@
</item>
</layout>
</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>
</widget>
</item>
@ -287,6 +307,24 @@
</item>
</layout>
</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">
<widget class="QLabel" name="label_6">
<property name="text">
@ -342,24 +380,6 @@
</item>
</layout>
</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>
</widget>
</item>
@ -371,7 +391,7 @@
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
<height>1</height>
</size>
</property>
</spacer>

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>501</width>
<height>128</height>
<height>108</height>
</rect>
</property>
<property name="windowTitle">
@ -38,18 +38,6 @@
</layout>
</widget>
</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">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
@ -62,41 +50,30 @@
</layout>
</widget>
</item>
<item row="3" column="0" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
<item row="0" column="2">
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>SDL-2 LED</string>
</property>
<property name="bottomMargin">
<number>0</number>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="ColorPickerButton" name="SDL2LED"/>
</item>
</layout>
</widget>
</item>
<item row="1" column="2" colspan="2">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<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>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
</property>
</widget>
</item>
</layout>
<property name="standardButtons">
<set>QDialogButtonBox::StandardButton::Close</set>
</property>
</widget>
</item>
</layout>
</widget>