1 // TODO: This isn't really an LRA meter right now (it ignores the range).
12 class LRAMeter : public QWidget
17 LRAMeter(QWidget *parent);
19 void set_levels(float level_lufs, float range_low_lufs, float range_high_lufs) {
20 std::unique_lock<std::mutex> lock(level_mutex);
21 this->level_lufs = level_lufs;
22 this->range_low_lufs = range_low_lufs;
23 this->range_high_lufs = range_high_lufs;
24 QMetaObject::invokeMethod(this, "update", Qt::AutoConnection);
28 void resizeEvent(QResizeEvent *event) override;
29 void paintEvent(QPaintEvent *event) override;
31 std::mutex level_mutex;
32 float level_lufs = -HUGE_VAL;
33 float range_low_lufs = -HUGE_VAL;
34 float range_high_lufs = -HUGE_VAL;
36 QPixmap on_pixmap, off_pixmap;