Add method to get joystick button name including a device prefix

This commit is contained in:
Roland Rossgotterer
2019-02-14 16:10:43 +01:00
committed by Mat Sutcliffe
parent e5c435f281
commit 68907258a5
4 changed files with 26 additions and 0 deletions

View File

@@ -89,5 +89,20 @@ namespace BlackMisc
}
return sl.join('+');
}
QString CHotkeyCombination::asStringWithDeviceNames() const
{
QStringList sl;
sl.reserve(m_keyboardKeys.size() + m_joystickButtons.size());
for (const auto &key : m_keyboardKeys)
{
sl << key.toQString();
}
for (const auto &button : m_joystickButtons)
{
sl << button.getButtonAsStringWithDeviceName();
}
return sl.join('+');
}
} // ns
} // ns