| 3110 | } |
| 3111 | |
| 3112 | void MainWindow::wireVfoWidget(VfoWidget* w, SliceModel* s) |
| 3113 | { |
| 3114 | const int sliceId = s->sliceId(); |
| 3115 | |
| 3116 | // Bidirectional SQL sync — the VfoWidget mirrors the RxApplet's 3-way |
| 3117 | // SQL state (Off / Manual / Auto), the manual-level cache, and the |
| 3118 | // Auto dB margin. RxApplet is the source of truth; VfoWidget pipes |
| 3119 | // its own button + slider events through RxApplet so persistence, |
| 3120 | // algorithm enable/disable, and the manual cache stay in one place. |
| 3121 | if (m_appletPanel && m_appletPanel->rxApplet()) |
| 3122 | w->setRxApplet(m_appletPanel->rxApplet()); |
| 3123 | w->setKiwiSdrManager(m_kiwiSdrManager); |
| 3124 | |
| 3125 | // Note: w->setSlice(s) is called at the end of this method (line ~1895) |
| 3126 | |
| 3127 | // Per-slice signals — these are specific to the slice this widget represents |
| 3128 | connect(w, &VfoWidget::kiwiRxAntennaSelected, |
| 3129 | this, &MainWindow::setKiwiSdrVirtualAntennaForSlice); |
| 3130 | connect(w, &VfoWidget::flexRxAntennaSelected, |
| 3131 | this, &MainWindow::clearKiwiSdrVirtualAntennaForSlice); |
| 3132 | connect(s, &SliceModel::frequencyChanged, this, [this, s](double) { |
| 3133 | updateKiwiSdrVirtualTrackingForSlice(s); |
| 3134 | }); |
| 3135 | connect(s, &SliceModel::modeChanged, this, [this, s](const QString&) { |
| 3136 | updateKiwiSdrVirtualTrackingForSlice(s); |
| 3137 | }); |
| 3138 | connect(s, &SliceModel::filterChanged, this, [this, s](int, int) { |
| 3139 | updateKiwiSdrVirtualTrackingForSlice(s); |
| 3140 | }); |
| 3141 | connect(s, &SliceModel::panIdChanged, this, [this, s](const QString&) { |
| 3142 | updateKiwiSdrVirtualTrackingForSlice(s); |
| 3143 | }); |
| 3144 | connect(s, &SliceModel::audioGainChanged, this, [this, s](float) { |
| 3145 | updateKiwiSdrVirtualAudioControlsForSlice(s); |
| 3146 | }); |
| 3147 | connect(s, &SliceModel::audioMuteChanged, this, [this, s](bool) { |
| 3148 | updateKiwiSdrVirtualAudioControlsForSlice(s); |
| 3149 | syncFlexRxPanToAudioEngine(); |
| 3150 | }); |
| 3151 | connect(s, &SliceModel::audioPanChanged, this, [this, s](int) { |
| 3152 | updateKiwiSdrVirtualAudioControlsForSlice(s); |
| 3153 | }); |
| 3154 | connect(s, &SliceModel::agcModeChanged, this, [this, s](const QString&) { |
| 3155 | updateKiwiSdrVirtualReceiverControlsForSlice(s); |
| 3156 | }); |
| 3157 | connect(s, &SliceModel::agcThresholdChanged, this, [this, s](int) { |
| 3158 | updateKiwiSdrVirtualReceiverControlsForSlice(s); |
| 3159 | }); |
| 3160 | connect(s, &SliceModel::agcOffLevelChanged, this, [this, s](int) { |
| 3161 | updateKiwiSdrVirtualReceiverControlsForSlice(s); |
| 3162 | }); |
| 3163 | connect(s, &SliceModel::externalReceiveAgcModeChanged, |
| 3164 | this, [this, s](const QString&) { |
| 3165 | updateKiwiSdrVirtualReceiverControlsForSlice(s); |
| 3166 | }); |
| 3167 | connect(s, &SliceModel::externalReceiveAgcThresholdChanged, |
| 3168 | this, [this, s](int) { |
| 3169 | updateKiwiSdrVirtualReceiverControlsForSlice(s); |
nothing calls this directly
no test coverage detected