| 1900 | } |
| 1901 | |
| 1902 | void FlexControlDialog::updateModeReadout() |
| 1903 | { |
| 1904 | if (!m_modeLabel) |
| 1905 | return; |
| 1906 | const QString wheelAction = activeKnobActionId(); |
| 1907 | QString text = labelForActionId(wheelAction); |
| 1908 | QString tooltip = QStringLiteral("The wheel currently controls %1.").arg(text); |
| 1909 | QString pushHint = QStringLiteral("Push tap runs configured action."); |
| 1910 | if (m_activeAux >= 0) { |
| 1911 | const QString auxLabel = labelForActionId(auxActionId(m_activeAux)); |
| 1912 | if (auxActionControlsWheel(m_activeAux)) { |
| 1913 | text = QStringLiteral("Aux%1: %2").arg(m_activeAux + 1).arg(auxLabel); |
| 1914 | tooltip = QStringLiteral("Aux%1 selected; the wheel controls %2.") |
| 1915 | .arg(m_activeAux + 1) |
| 1916 | .arg(auxLabel); |
| 1917 | pushHint = QStringLiteral("Push tap returns wheel to Tune Slice."); |
| 1918 | } else { |
| 1919 | text = QStringLiteral("%1 (Aux%2: %3)") |
| 1920 | .arg(text) |
| 1921 | .arg(m_activeAux + 1) |
| 1922 | .arg(auxLabel); |
| 1923 | tooltip = QStringLiteral("Aux%1 action is %2; the wheel still controls %3.") |
| 1924 | .arg(m_activeAux + 1) |
| 1925 | .arg(auxLabel) |
| 1926 | .arg(labelForActionId(wheelAction)); |
| 1927 | } |
| 1928 | } |
| 1929 | m_modeLabel->setText(text); |
| 1930 | m_modeLabel->setToolTip(tooltip); |
| 1931 | if (m_pushHintLabel) |
| 1932 | m_pushHintLabel->setText(pushHint); |
| 1933 | } |
| 1934 | |
| 1935 | QString FlexControlDialog::auxActionId(int index) const |
| 1936 | { |
nothing calls this directly
no test coverage detected