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