SDRAngel
4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
|
#include <levelmeter.h>
Public Slots | |
void | reset () |
void | levelChanged (qreal rmsLevel, qreal peakLevel, int numSamples) |
Public Member Functions | |
LevelMeter (QWidget *parent=0) | |
virtual | ~LevelMeter () |
void | paintEvent (QPaintEvent *event) |
void | resizeEvent (QResizeEvent *event) |
void | setAverageSmoothing (uint32_t smoothingFactor) |
Protected Slots | |
void | redrawTimerExpired () |
Protected Member Functions | |
virtual void | render (QPainter *painter)=0 |
virtual void | resized ()=0 |
int | shiftx (int val, int width) |
Protected Attributes | |
qreal | m_avgLevel |
qreal | m_peakLevel |
qreal | m_decayedPeakLevel |
QTime | m_peakLevelChanged |
qreal | m_peakDecayRate |
qreal | m_peakHoldLevel |
QTime | m_peakHoldLevelChanged |
uint32_t | m_avgSmoothing |
QTimer * | m_redrawTimer |
QColor | m_avgColor |
QColor | m_peakColor |
QColor | m_decayedPeakColor |
ScaleEngine | m_scaleEngine |
QPixmap * | m_backgroundPixmap |
Widget which displays a vertical audio level meter, indicating the RMS and peak levels of the window of audio samples most recently analyzed by the Engine.
Definition at line 62 of file levelmeter.h.
LevelMeter::LevelMeter | ( | QWidget * | parent = 0 | ) |
Definition at line 60 of file levelmeter.cpp.
References m_redrawTimer, RedrawInterval, and redrawTimerExpired().
|
virtual |
|
slot |
Definition at line 95 of file levelmeter.cpp.
References m_avgLevel, m_avgSmoothing, m_decayedPeakLevel, m_peakHoldLevel, m_peakHoldLevelChanged, m_peakLevel, and m_peakLevelChanged.
void LevelMeter::paintEvent | ( | QPaintEvent * | event | ) |
Definition at line 132 of file levelmeter.cpp.
References render().
|
protectedslot |
Definition at line 115 of file levelmeter.cpp.
References m_decayedPeakLevel, m_peakDecayRate, m_peakHoldLevel, m_peakHoldLevelChanged, m_peakLevel, m_peakLevelChanged, and PeakHoldLevelDuration.
Referenced by LevelMeter().
|
protectedpure virtual |
Implemented in LevelMeterSignalDB, and LevelMeterVU.
Referenced by paintEvent().
|
slot |
|
protectedpure virtual |
Implemented in LevelMeterSignalDB, and LevelMeterVU.
Referenced by resizeEvent().
void LevelMeter::resizeEvent | ( | QResizeEvent * | event | ) |
Definition at line 140 of file levelmeter.cpp.
References resized().
void LevelMeter::setAverageSmoothing | ( | uint32_t | smoothingFactor | ) |
|
inlineprotected |
Shift the x coordinate so it does not fall right on 0 or width-1
Definition at line 142 of file levelmeter.h.
Referenced by LevelMeterVU::resized(), and LevelMeterSignalDB::resized().
|
protected |
Definition at line 131 of file levelmeter.h.
Referenced by LevelMeterVU::render().
|
protected |
Height of RMS level bar. Range 0.0 - 1.0.
Definition at line 87 of file levelmeter.h.
Referenced by levelChanged(), LevelMeterVU::render(), LevelMeterSignalDB::render(), and reset().
|
protected |
Average smoothing factor (between 1: fast and 256: slow)
Definition at line 127 of file levelmeter.h.
Referenced by levelChanged(), and setAverageSmoothing().
|
protected |
Definition at line 136 of file levelmeter.h.
Referenced by LevelMeterVU::render(), LevelMeterSignalDB::render(), LevelMeterVU::resized(), LevelMeterSignalDB::resized(), and ~LevelMeter().
|
protected |
Definition at line 133 of file levelmeter.h.
Referenced by LevelMeterVU::render().
|
protected |
Height of peak level bar. This is calculated by decaying m_peakLevel depending on the elapsed time since m_peakLevelChanged, and the value of m_decayRate.
Definition at line 100 of file levelmeter.h.
Referenced by levelChanged(), redrawTimerExpired(), LevelMeterVU::render(), and LevelMeterSignalDB::render().
|
protected |
Definition at line 132 of file levelmeter.h.
Referenced by LevelMeterVU::render().
|
protected |
Rate at which peak level bar decays. Expressed in level units / millisecond.
Definition at line 111 of file levelmeter.h.
Referenced by redrawTimerExpired().
|
protected |
High watermark of peak level. Range 0.0 - 1.0.
Definition at line 117 of file levelmeter.h.
Referenced by levelChanged(), redrawTimerExpired(), LevelMeterVU::render(), and LevelMeterSignalDB::render().
|
protected |
Time at which m_peakHoldLevel was last changed.
Definition at line 122 of file levelmeter.h.
Referenced by levelChanged(), and redrawTimerExpired().
|
protected |
Most recent peak level. Range 0.0 - 1.0.
Definition at line 93 of file levelmeter.h.
Referenced by levelChanged(), redrawTimerExpired(), and reset().
|
protected |
Time at which m_peakLevel was last changed.
Definition at line 105 of file levelmeter.h.
Referenced by levelChanged(), and redrawTimerExpired().
|
protected |
Definition at line 129 of file levelmeter.h.
Referenced by LevelMeter().
|
protected |
Definition at line 135 of file levelmeter.h.
Referenced by LevelMeterSignalDB::LevelMeterSignalDB(), LevelMeterVU::LevelMeterVU(), LevelMeterVU::resized(), LevelMeterSignalDB::resized(), and LevelMeterSignalDB::setRange().