MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / StripWaveformPanel

Method StripWaveformPanel

src/gui/StripWaveformPanel.cpp:25–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25StripWaveformPanel::StripWaveformPanel(AudioEngine* engine, QWidget* parent)
26 : QWidget(parent)
27 , m_audio(engine)
28{
29 const QString title = QString::fromUtf8("Aetherial Waveform \xe2\x80\x94 TX");
30 setWindowTitle(title);
31 setStyleSheet(kWindowStyle);
32
33 auto* root = new QVBoxLayout(this);
34 root->setContentsMargins(8, 0, 8, 0);
35 root->setSpacing(6);
36
37 auto* titleBar = new EditorFramelessTitleBar;
38 titleBar->setTitleText(title);
39 m_titleBar = titleBar;
40 // Embedded inside the strip — no need for the min/max/close trio
41 // (the strip's own chrome carries those) and the dark fill bar
42 // reads as a heavy header in this row. Drop both so the panel
43 // wears just the title text on the panel's own background.
44 titleBar->setControlsVisible(false);
45 titleBar->setStyleSheet("background: transparent;");
46
47 // View-mode cycle button lives on the title-bar row. Single press
48 // advances Scope → Envelope → History → Scope. Default starts on
49 // Envelope (m_modeIdx = 1) since CE-SSB is fundamentally about
50 // envelope behaviour.
51 m_modeBtn = new QPushButton(this);
52 m_modeBtn->setFixedSize(78, 18);
53 AetherSDR::ThemeManager::instance().applyStyleSheet(m_modeBtn, "QPushButton {"
54 " background: {{color.background.1}}; border: 1px solid {{color.background.1}};"
55 " border-radius: 3px; color: #c8a070;"
56 " font-size: 10px; font-weight: bold; padding: 1px 6px;"
57 "}"
58 "QPushButton:hover { background: #3a2818; color: {{color.accent.warning}};"
59 " border: 1px solid {{color.accent.warning}}; }");
60 m_modeBtn->setToolTip("Cycle waveform view: Scope → Envelope → History");
61 connect(m_modeBtn, &QPushButton::clicked,
62 this, &StripWaveformPanel::cycleViewMode);
63
64 // Time-window slider (1–20 s) + readout, also on the title row.
65 // Adjusts how much wall-clock audio fits across the plot.
66 m_windowSlider = new QSlider(Qt::Horizontal, this);
67 m_windowSlider->setRange(1, 20);
68 m_windowSlider->setSingleStep(1);
69 m_windowSlider->setPageStep(1); // mouse wheel notch = ±1 sec
70 m_windowSlider->setFixedWidth(120);
71 m_windowSlider->setFixedHeight(14);
72 applyPrimarySliderStyle(m_windowSlider, QStringLiteral("color.accent.warning"));
73 m_windowSlider->setToolTip(
74 tr("Waveform time window — how many seconds of audio fit across "
75 "the plot. Range 1–20 s."));
76 connect(m_windowSlider, &QSlider::valueChanged,
77 this, &StripWaveformPanel::applyWindowSec);
78
79 m_windowLbl = new QLabel(this);
80 m_windowLbl->setFixedWidth(28);
81 m_windowLbl->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
82 AetherSDR::ThemeManager::instance().applyStyleSheet(m_windowLbl, "QLabel { background: transparent; color: {{color.text.secondary}};"

Callers

nothing calls this directly

Calls 10

applyPrimarySliderStyleFunction · 0.85
setControlsVisibleMethod · 0.80
applyStyleSheetMethod · 0.80
setTitleTextMethod · 0.45
setRangeMethod · 0.45
valueMethod · 0.45
setValueMethod · 0.45
setRefreshRateHzMethod · 0.45
setTransmittingMethod · 0.45
appendScopeSamplesMethod · 0.45

Tested by

no test coverage detected