diff options
Diffstat (limited to 'src/widget/wvumeter.cpp')
-rw-r--r-- | src/widget/wvumeter.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/widget/wvumeter.cpp b/src/widget/wvumeter.cpp index 92e0156872..9c19b6f2d4 100644 --- a/src/widget/wvumeter.cpp +++ b/src/widget/wvumeter.cpp @@ -23,8 +23,8 @@ #include <QtDebug> #include <QPixmap> -#include "widget/wpixmapstore.h" #include "util/timer.h" +#include "widget/wpixmapstore.h" #include "util/math.h" #define DEFAULT_FALLTIME 20 @@ -48,8 +48,7 @@ WVuMeter::WVuMeter(QWidget* parent) m_timer.start(); } -WVuMeter::~WVuMeter() { -} +WVuMeter::~WVuMeter() = default; void WVuMeter::setup(QDomNode node, const SkinContext& context) { // Set pixmaps @@ -72,20 +71,24 @@ void WVuMeter::setup(QDomNode node, const SkinContext& context) { context.selectScaleMode(vuNode, Paintable::FIXED)); m_iPeakHoldSize = context.selectInt(node, "PeakHoldSize"); - if (m_iPeakHoldSize < 0 || m_iPeakHoldSize > 100) + if (m_iPeakHoldSize < 0 || m_iPeakHoldSize > 100) { m_iPeakHoldSize = DEFAULT_HOLDSIZE; + } m_iPeakFallStep = context.selectInt(node, "PeakFallStep"); - if (m_iPeakFallStep < 1 || m_iPeakFallStep > 1000) + if (m_iPeakFallStep < 1 || m_iPeakFallStep > 1000) { m_iPeakFallStep = DEFAULT_FALLSTEP; + } m_iPeakHoldTime = context.selectInt(node, "PeakHoldTime"); - if (m_iPeakHoldTime < 1 || m_iPeakHoldTime > 3000) + if (m_iPeakHoldTime < 1 || m_iPeakHoldTime > 3000) { m_iPeakHoldTime = DEFAULT_HOLDTIME; + } m_iPeakFallTime = context.selectInt(node, "PeakFallTime"); - if (m_iPeakFallTime < 1 || m_iPeakFallTime > 1000) + if (m_iPeakFallTime < 1 || m_iPeakFallTime > 1000) { m_iPeakFallTime = DEFAULT_FALLTIME; + } } void WVuMeter::setPixmapBackground(PixmapSource source, Paintable::DrawMode mode) { @@ -159,7 +162,7 @@ void WVuMeter::maybeUpdate() { } } -void WVuMeter::paintEvent(QPaintEvent *) { +void WVuMeter::paintEvent(QPaintEvent * /*unused*/) { ScopedTimer t("WVuMeter::paintEvent"); QStyleOption option; |