| 417 | } |
| 418 | |
| 419 | void StripEqPanel::showForPath(ClientEqApplet::Path path) |
| 420 | { |
| 421 | m_path = path; |
| 422 | if (!m_audio || !m_canvas) return; |
| 423 | |
| 424 | ClientEq* eq = (path == ClientEqApplet::Path::Rx) |
| 425 | ? m_audio->clientEqRx() : m_audio->clientEqTx(); |
| 426 | m_canvas->setEq(eq); |
| 427 | if (m_iconRow) m_iconRow->setEq(eq); |
| 428 | if (m_paramRow) m_paramRow->setEq(eq); |
| 429 | if (m_outFader && eq) m_outFader->setGainLinear(eq->masterGain()); |
| 430 | if (m_familyCombo && eq) { |
| 431 | QSignalBlocker b(m_familyCombo); |
| 432 | m_familyCombo->setCurrentIndex(static_cast<int>(eq->filterFamily())); |
| 433 | } |
| 434 | syncBypassFromEq(); |
| 435 | // Clear selection on path swap — the previously-selected index |
| 436 | // almost certainly doesn't correspond to the other path's bands. |
| 437 | syncSelection(-1); |
| 438 | const QString title = path == ClientEqApplet::Path::Rx |
| 439 | ? QStringLiteral("Aetherial Parametric EQ — RX") |
| 440 | : QStringLiteral("Aetherial Parametric EQ — TX"); |
| 441 | // m_titleBar is always an EditorFramelessTitleBar* — kept as |
| 442 | // QWidget* in the header so the inline class stays cpp-only. |
| 443 | if (m_titleBar) |
| 444 | static_cast<EditorFramelessTitleBar*>(m_titleBar)->setTitleText(title); |
| 445 | setWindowTitle(title); |
| 446 | |
| 447 | // Re-apply the cached cutoffs for whichever path we're switching to, |
| 448 | // so RX/TX swaps restore the correct dashed guides without waiting |
| 449 | // for the next slice/filter event. |
| 450 | if (m_canvas) { |
| 451 | if (path == ClientEqApplet::Path::Rx) |
| 452 | m_canvas->setFilterCutoffs(m_rxFilterLowCutHz, m_rxFilterHighCutHz); |
| 453 | else |
| 454 | m_canvas->setFilterCutoffs(m_txFilterLowCutHz, m_txFilterHighCutHz); |
| 455 | } |
| 456 | |
| 457 | if (!isVisible()) { |
| 458 | show(); |
| 459 | } |
| 460 | raise(); |
| 461 | activateWindow(); |
| 462 | } |
| 463 | |
| 464 | void StripEqPanel::setTxFilterCutoffs(int lowHz, int highHz) |
| 465 | { |
no test coverage detected