| 5514 | } |
| 5515 | |
| 5516 | void RadioSetupDialog::refreshFlexControlButtonActions() |
| 5517 | { |
| 5518 | auto& settings = AppSettings::instance(); |
| 5519 | for (auto it = m_flexControlActionCombos.begin(); |
| 5520 | it != m_flexControlActionCombos.end(); ++it) { |
| 5521 | auto* combo = it.value(); |
| 5522 | if (!combo) |
| 5523 | continue; |
| 5524 | const QString fallback = m_flexControlActionDefaults.value(it.key(), QStringLiteral("None")); |
| 5525 | const QString saved = settings.value(it.key(), fallback).toString(); |
| 5526 | const int idx = combo->findText(saved); |
| 5527 | if (idx < 0) |
| 5528 | continue; |
| 5529 | const QSignalBlocker blocker(combo); |
| 5530 | combo->setCurrentIndex(idx); |
| 5531 | } |
| 5532 | if (m_flexControlInvertCheck) { |
| 5533 | const bool inverted = |
| 5534 | settings.value("FlexControlInvertDir", "False").toString() == "True"; |
| 5535 | const QSignalBlocker blocker(m_flexControlInvertCheck); |
| 5536 | m_flexControlInvertCheck->setChecked(inverted); |
| 5537 | } |
| 5538 | } |
| 5539 | |
| 5540 | void RadioSetupDialog::setFlexControlConnectionStatus(bool connected, const QString& port) |
| 5541 | { |
no test coverage detected