1 #ifndef CORRELATION_METER_H
2 #define CORRELATION_METER_H
14 class CorrelationMeter : public QWidget
19 CorrelationMeter(QWidget *parent);
21 void set_correlation(float correlation) {
22 std::lock_guard<std::mutex> lock(correlation_mutex);
23 this->correlation = correlation;
24 QMetaObject::invokeMethod(this, "update", Qt::AutoConnection);
28 void resizeEvent(QResizeEvent *event) override;
29 void paintEvent(QPaintEvent *event) override;
31 std::mutex correlation_mutex;
32 float correlation = 0.0f;
34 QPixmap on_pixmap, off_pixmap;