Ejemplo n.º 1
0
/**
 * @brief Generate a string that represents slots that will be activated or
 *     slots that are currently active if a button is pressed
 * @return String of currently applicable slots for a button
 */
QString JoyControlStickButton::getActiveZoneSummary()
{
    QList<JoyButtonSlot*> tempList;
    JoyControlStickModifierButton *tempButton = stick->getModifierButton();
    if (tempButton && tempButton->getButtonState() && getButtonState())
    {
        QList<JoyButtonSlot*> activeModifierSlots = tempButton->getActiveZoneList();
        tempList.append(activeModifierSlots);
    }

    tempList.append(getActiveZoneList());
    QString temp = buildActiveZoneSummary(tempList);
    return temp;
}
Ejemplo n.º 2
0
QString JoyControlStickButton::getCalculatedActiveZoneSummary()
{
    JoyControlStickModifierButton *tempButton = stick->getModifierButton();
    QString temp;
    QStringList stringlist;

    if (tempButton && tempButton->getButtonState() &&
        tempButton->hasActiveSlots() && getButtonState())
    {
        stringlist.append(tempButton->getCalculatedActiveZoneSummary());
    }

    stringlist.append(JoyButton::getCalculatedActiveZoneSummary());
    temp = stringlist.join(", ");

    return temp;
}