47 #ifndef SDRBASE_GUI_LEVELMETER_H_ 48 #define SDRBASE_GUI_LEVELMETER_H_ 70 void paintEvent(QPaintEvent *event);
71 void resizeEvent(QResizeEvent * event);
73 void setAverageSmoothing(
uint32_t smoothingFactor);
77 void levelChanged(qreal rmsLevel, qreal peakLevel,
int numSamples);
80 void redrawTimerExpired();
138 virtual void render(QPainter *painter) = 0;
139 virtual void resized() = 0;
144 return val == 0 ? 1 : val == width-1 ? width-2 : val;
154 virtual void render(QPainter *painter);
173 void setRange(
int min,
int max);
175 static const QColor m_avgColor[4];
176 static const QColor m_decayedPeakColor[4];
177 static const QColor m_peakColor[4];
180 virtual void render(QPainter *painter);
QPixmap * m_backgroundPixmap
virtual void render(QPainter *painter)=0
ScaleEngine m_scaleEngine
QTime m_peakHoldLevelChanged
void setColorTheme(ColorTheme colorTheme)
int shiftx(int val, int width)
QColor m_decayedPeakColor
T max(const T &x, const T &y)
T min(const T &x, const T &y)