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

Method AetherialAudioStrip

src/gui/AetherialAudioStrip.cpp:66–689  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66AetherialAudioStrip::AetherialAudioStrip(AudioEngine* engine, QWidget* parent)
67 : QWidget(parent, Qt::Window)
68 , m_audio(engine)
69 , m_presets(new ChannelStripPresets(engine, this))
70{
71 connect(m_presets, &ChannelStripPresets::presetsChanged, this, [this]() {
72 rebuildPresetCombo(m_currentPresetName);
73 });
74 const QString title = QString::fromUtf8("Aetherial Audio \xe2\x80\x94 Channel Strip");
75 setWindowTitle(title);
76 AetherSDR::ThemeManager::instance().applyStyleSheet(this, "QWidget { background: {{color.background.0}}; color: {{color.text.primary}}; }"
77 "QFrame#stripGroupBox { border: 1px solid {{color.background.1}};"
78 " border-radius: 4px; background: transparent; }");
79 // Width is hard — the chain row + 50 px tiles need the full
80 // 1140 px to read. Height drops to 900 so the strip fits on a
81 // 1080p display (1080 minus taskbar/title chrome ≈ 1000); the
82 // panel grid below the chain row scrolls vertically when the
83 // window is shorter than the natural content height.
84 setMinimumSize(1140, 900);
85 // The strip's natural content is ~1620 px tall and assumes a 4K
86 // (or larger) display. On 1080p / 1440p, opening at 1620 puts the
87 // bottom edge offscreen with the resize grip unreachable. Cap to
88 // 960 on anything below ~4K so the bottom stays grabbable; users
89 // can grow the window manually after open.
90 int initialHeight = 1620;
91 if (auto* screen = QGuiApplication::primaryScreen()) {
92 if (screen->availableGeometry().height() < 2000)
93 initialHeight = 960;
94 }
95 resize(1140, initialHeight);
96
97 // Track mouse without buttons pressed so the resize cursor updates
98 // while hovering the bare margin around the embedded grid.
99 setMouseTracking(true);
100
101 // Outer layout has zero margins so the title bar can run edge-to-edge
102 // across the whole window (matching the applet ContainerTitleBar).
103 // The 6 px resize hit zone + 2 px breathing room lives on a nested
104 // content layout below the title bar.
105 auto* root = new QVBoxLayout(this);
106 root->setContentsMargins(0, 0, 0, 0);
107 root->setSpacing(0);
108
109 // Custom title bar styled to match the applet ContainerTitleBar:
110 // 18 px tall, blue-gradient background, 10 px bold title, trio of
111 // window-control buttons at the right. Built inline rather than
112 // via EditorFramelessTitleBar because that widget is hard-wired to
113 // the editor look (20 px flat). The strip wants the chrome family
114 // it shares with the docked applet panels.
115 {
116 m_titleBar = new QWidget(this);
117 m_titleBar->setFixedHeight(18);
118 m_titleBar->setAttribute(Qt::WA_StyledBackground, true);
119 AetherSDR::ThemeManager::instance().applyStyleSheet(m_titleBar, "QWidget { background: qlineargradient(x1:0,y1:0,x2:0,y2:1,"
120 "stop:0 #5a7494, stop:0.5 #384e68, stop:1 {{color.background.1}}); "
121 "border-bottom: 1px solid #0a1a28; }");
122 m_titleBar->installEventFilter(this);
123

Callers

nothing calls this directly

Calls 15

applyStyleSheetMethod · 0.80
isRxBypassedMethod · 0.80
isTxBypassedMethod · 0.80
updateMethod · 0.80
hasPresetMethod · 0.80
setDialogModeMethod · 0.80
containsMethod · 0.80
setControlsVisibleMethod · 0.80
setValueMethod · 0.45
setAudioEngineMethod · 0.45
toStringMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected