19 #ifndef AUDIOMETERWIDGET_H
20 #define AUDIOMETERWIDGET_H
24 #include <QStringList>
25 #include <QLinearGradient>
30 class AudioMeterWidget :
public QWidget
34 AudioMeterWidget(QWidget *parent = 0);
35 void setDbLabels(
const QVector<int>& labels);
36 void setChannelLabels(
const QStringList& labels);
37 void setChannelLabelUnits(
const QString& units);
38 void setOrientation(Qt::Orientation orientation);
41 void showAudio(
const QVector<double>& dbLevels);
44 void paintEvent(QPaintEvent*) Q_DECL_OVERRIDE;
45 void resizeEvent(QResizeEvent*) Q_DECL_OVERRIDE;
46 void mouseMoveEvent(QMouseEvent*) Q_DECL_OVERRIDE;
50 void drawDbLabels(QPainter&);
51 void drawChanLabels(QPainter&);
52 void drawBars(QPainter&);
53 void drawPeaks(QPainter&);
57 Qt::Orientation m_orient;
58 QVector<double> m_levels;
59 QVector<double> m_peaks;
60 QVector<int> m_dbLabels;
61 QStringList m_chanLabels;
62 QLinearGradient m_gradient;
64 QString m_chanLabelUnits;