LMMS
Loading...
Searching...
No Matches
PeakIndicator.h
Go to the documentation of this file.
1/*
2 * PeakIndicator.h - Peak indicator widget
3 *
4 * Copyright (c) 2024- Michael Gregorius
5 *
6 * This file is part of LMMS - https://lmms.io
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public
19 * License along with this program (see COPYING); if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301 USA.
22 *
23 */
24
25
26#ifndef LMMS_GUI_PEAKINDICATOR_H
27#define LMMS_GUI_PEAKINDICATOR_H
28
29#include "lmms_export.h"
30
31#include <QLabel>
32
33
34namespace lmms::gui
35{
36
37class LMMS_EXPORT PeakIndicator : public QLabel
38{
39 Q_OBJECT
40public:
41 PeakIndicator(QWidget* parent);
42
44
45public slots:
46 void updatePeak(float peak);
47
48protected:
49 void mousePressEvent(QMouseEvent* e) override;
50
51private:
52 void updatePeakDisplay();
53
54private:
55 float m_peak;
56} ;
57
58} // namespace lmms::gui
59
60#endif // LMMS_GUI_PEAKINDICATOR_H
float m_peak
Definition PeakIndicator.h:55
void updatePeak(float peak)
Definition PeakIndicator.cpp:50
void updatePeakDisplay()
Definition PeakIndicator.cpp:67
void resetPeakToMinusInf()
Definition PeakIndicator.cpp:44
void mousePressEvent(QMouseEvent *e) override
Definition PeakIndicator.cpp:59
PeakIndicator(QWidget *parent)
Definition PeakIndicator.cpp:35
* e
Definition inflate.c:1404
static uintptr_t parent
Definition pugl.h:1644
Definition AudioPortAudio.cpp:223