DolphinQt/Mapping: Add setting to enable waiting for alternate mappings

using the OR-operator.
This commit is contained in:
Jordan Woyak
2025-01-29 02:02:46 -06:00
parent cd3993708f
commit 6e7e808b66
7 changed files with 93 additions and 46 deletions

View File

@ -111,11 +111,15 @@ void MappingWindow::CreateDevicesLayout()
const auto refresh_action = new QAction(tr("Refresh"), options);
connect(refresh_action, &QAction::triggered, this, &MappingWindow::RefreshDevices);
m_all_devices_action = new QAction(tr("Create mappings for other devices"), options);
m_all_devices_action->setCheckable(true);
m_other_device_mappings = new QAction(tr("Create Mappings for Other Devices"), options);
m_other_device_mappings->setCheckable(true);
m_wait_for_alternate_mappings = new QAction(tr("Wait for Alternate Input Mappings"), options);
m_wait_for_alternate_mappings->setCheckable(true);
options->addAction(refresh_action);
options->addAction(m_all_devices_action);
options->addAction(m_other_device_mappings);
options->addAction(m_wait_for_alternate_mappings);
options->setDefaultAction(refresh_action);
m_devices_combo->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
@ -354,9 +358,14 @@ void MappingWindow::OnSelectDevice(int)
m_controller->UpdateReferences(g_controller_interface);
}
bool MappingWindow::IsMappingAllDevices() const
bool MappingWindow::IsCreateOtherDeviceMappingsEnabled() const
{
return m_all_devices_action->isChecked();
return m_other_device_mappings->isChecked();
}
bool MappingWindow::IsWaitForAlternateMappingsEnabled() const
{
return m_wait_for_alternate_mappings->isChecked();
}
void MappingWindow::RefreshDevices()