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

@@ -19,6 +19,11 @@ namespace BlackMisc
m_deviceName(deviceName), m_buttonIndex(index)
{}
QString CJoystickButton::getButtonAsStringWithDeviceName() const
{
return QString("%1 Button%2").arg(m_deviceName).arg(m_buttonIndex);
}
void CJoystickButton::setButtonIndex(int buttonIndex)
{
m_buttonIndex = buttonIndex;