| 3523 | // reports this; older firmware and 6000-series radios stay hidden. |
| 3524 | |
| 3525 | QWidget* RadioSetupDialog::buildApdTab() |
| 3526 | { |
| 3527 | auto* page = new QWidget; |
| 3528 | auto* vbox = new QVBoxLayout(page); |
| 3529 | vbox->setSpacing(8); |
| 3530 | |
| 3531 | // Model header — matches other tabs (e.g. Filters, TX) |
| 3532 | { |
| 3533 | auto* hdr = new QHBoxLayout; |
| 3534 | hdr->addStretch(1); |
| 3535 | auto* modelLbl = new QLabel(m_model->model()); |
| 3536 | AetherSDR::ThemeManager::instance().applyStyleSheet(modelLbl, "QLabel { color: {{color.accent.bright}}; font-size: 20px; font-weight: bold; }"); |
| 3537 | hdr->addWidget(modelLbl); |
| 3538 | vbox->addLayout(hdr); |
| 3539 | } |
| 3540 | |
| 3541 | auto& tx = m_model->transmitModel(); |
| 3542 | |
| 3543 | // External Sampler group — 2-column grid: ANT1/XVTA on the top row, |
| 3544 | // ANT2/XVTB on the bottom row, then the Reset button on its own row. |
| 3545 | { |
| 3546 | auto* group = new QGroupBox("External Sampler (per TX ANT)"); |
| 3547 | group->setStyleSheet(kGroupStyle); |
| 3548 | auto* grid = new QGridLayout(group); |
| 3549 | grid->setSpacing(8); |
| 3550 | |
| 3551 | // Row, col-pair, antenna name → builds label + combo, hooks signals. |
| 3552 | auto buildRow = [&](int row, int colBase, const QString& ant) { |
| 3553 | auto* lbl = new QLabel(ant + ":"); |
| 3554 | lbl->setStyleSheet(kLabelStyle); |
| 3555 | grid->addWidget(lbl, row, colBase); |
| 3556 | |
| 3557 | auto* combo = new QComboBox; |
| 3558 | const auto s = tx.apdSampler(ant); |
| 3559 | combo->addItems(s.available); |
| 3560 | combo->setCurrentText(s.selected); |
| 3561 | AetherSDR::applyComboStyle(combo); |
| 3562 | grid->addWidget(combo, row, colBase + 1); |
| 3563 | |
| 3564 | m_apdSamplerCombos.insert(ant, combo); |
| 3565 | |
| 3566 | connect(combo, &QComboBox::currentTextChanged, this, |
| 3567 | [this, ant](const QString& port) { |
| 3568 | if (port.isEmpty()) return; |
| 3569 | m_model->transmitModel().setApdSamplerPort(ant, port); |
| 3570 | }); |
| 3571 | }; |
| 3572 | |
| 3573 | buildRow(0, 0, "ANT1"); |
| 3574 | buildRow(0, 2, "XVTA"); |
| 3575 | buildRow(1, 0, "ANT2"); |
| 3576 | buildRow(1, 2, "XVTB"); |
| 3577 | |
| 3578 | // Equalizer Reset button (row 2) — clears all per-antenna training. |
| 3579 | auto* resetLbl = new QLabel("Equalizer Reset:"); |
| 3580 | resetLbl->setStyleSheet(kLabelStyle); |
| 3581 | grid->addWidget(resetLbl, 2, 0); |
| 3582 |
nothing calls this directly
no test coverage detected