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

Method wheelEvent

src/gui/ClientEqOutputFader.cpp:335–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333}
334
335void ClientEqOutputFader::wheelEvent(QWheelEvent* ev)
336{
337 // 0.5 dB per notch (12 notches for a full deg of the wheel).
338 const int notches = ev->angleDelta().y() / 120;
339 if (notches == 0) { QWidget::wheelEvent(ev); return; }
340 const float db = std::clamp(linearToDb(m_gain) + 0.5f * notches,
341 kGainMinDb, kGainMaxDb);
342 m_gain = dbToLinear(db);
343 refreshValueLabel();
344 emit gainChanged(m_gain);
345 update();
346 ev->accept();
347}
348
349} // namespace AetherSDR

Callers

nothing calls this directly

Calls 3

wheelEventFunction · 0.85
dbToLinearFunction · 0.85
linearToDbFunction · 0.70

Tested by

no test coverage detected