| 2669 | } |
| 2670 | |
| 2671 | bool JoyControlStick::isRelativeSpring() |
| 2672 | { |
| 2673 | bool relative = false; |
| 2674 | |
| 2675 | QHash<JoyStickDirections, JoyControlStickButton *> temphash = getApplicableButtons(); |
| 2676 | auto iter = temphash.cbegin(); |
| 2677 | |
| 2678 | if (iter == temphash.cend()) |
| 2679 | return relative; |
| 2680 | |
| 2681 | JoyControlStickButton *button = iter.value(); |
| 2682 | relative = button->isRelativeSpring(); |
| 2683 | |
| 2684 | while (++iter != temphash.cend()) |
| 2685 | { |
| 2686 | button = iter.value(); |
| 2687 | bool temp = button->isRelativeSpring(); |
| 2688 | |
| 2689 | if (temp != relative) |
| 2690 | { |
| 2691 | relative = false; |
| 2692 | break; |
| 2693 | } |
| 2694 | } |
| 2695 | |
| 2696 | return relative; |
| 2697 | } |
| 2698 | |
| 2699 | /** |
| 2700 | * @brief Copy slots from all stick buttons and properties from a stick |
nothing calls this directly
no outgoing calls
no test coverage detected