| 333 | } |
| 334 | |
| 335 | void 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 |
nothing calls this directly
no test coverage detected