The AudioMonitor class.
More...
#include <audiomonitor.h>
|
QLinearGradient | gradient |
| Internal gradient object from red to yellow to green. More...
|
|
QVector< double > | values |
| Internal value storage. More...
|
|
QTimer | clear_timer |
| Internal timer to clear the audio monitor after a certain amount of time. More...
|
|
The AudioMonitor class.
Used to show a visual representation of audio currently playing
AudioMonitor::AudioMonitor |
( |
QWidget * |
parent = nullptr | ) |
|
|
explicit |
AudioMonitor Constructor.
- Parameters
-
parent | QWidget parent object. |
void AudioMonitor::clear |
( |
| ) |
|
|
privateslot |
Slot to clear the audio monitor.
void AudioMonitor::paintEvent |
( |
QPaintEvent * |
| ) |
|
|
protected |
Internal paint event.
Paints the
void AudioMonitor::resizeEvent |
( |
QResizeEvent * |
e | ) |
|
|
protected |
Internal resize event handler.
Triggers a repaint when the widget is resized.
void AudioMonitor::set_value |
( |
const QVector< double > & |
values | ) |
|
Set the current audio value.
The main interface for updating the audio monitor. Using this function will redraw the monitor with the values specified.
- Parameters
-
values | An array of doubles between 0.0 and 1.0 to display the amplitude. 0.0 is no audio, 1.0 is full volume. Each array entry is a channel and the audio monitor will automatically adjust to the channel count in the array. |
QTimer AudioMonitor::clear_timer |
|
private |
Internal timer to clear the audio monitor after a certain amount of time.
If it doesn't receive any values within a certain amount of time, it's assumed audio is no longer playing and the monitor is cleared.
QLinearGradient AudioMonitor::gradient |
|
private |
Internal gradient object from red to yellow to green.
QVector<double> AudioMonitor::values |
|
private |
The documentation for this class was generated from the following files: