Esempio n. 1
0
void InputDevice::setButtonName(int index, QString tempName)
{
    QHashIterator<int, SetJoystick*> iter(joystick_sets);
    while (iter.hasNext())
    {
        SetJoystick *tempSet = iter.next().value();
        disconnect(tempSet, SIGNAL(setButtonNameChange(int)), this, SLOT(updateSetButtonNames(int)));
        JoyButton *button = tempSet->getJoyButton(index);
        if (button)
        {
            button->setButtonName(tempName);
        }
        connect(tempSet, SIGNAL(setButtonNameChange(int)), this, SLOT(updateSetButtonNames(int)));
    }
}