LMMS
Loading...
Searching...
No Matches
Oscilloscope.h
Go to the documentation of this file.
1/*
2 * Oscilloscope.h
3 *
4 * Copyright (c) 2005-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
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#ifndef LMMS_GUI_OSCILLOSCOPE_H
26#define LMMS_GUI_OSCILLOSCOPE_H
27
28#include <QWidget>
29#include <QPixmap>
30
31#include "LmmsTypes.h"
32
33namespace lmms
34{
35
36class SampleFrame;
37
38}
39
40namespace lmms::gui
41{
42
43
44class Oscilloscope : public QWidget
45{
46 Q_OBJECT
47public:
52
53 Oscilloscope( QWidget * _parent );
55
56 void setActive( bool _active );
57
58 QColor const & leftChannelColor() const;
60
61 QColor const & rightChannelColor() const;
63
66
67 QColor const & clippingColor() const;
69
70
71protected:
72 void paintEvent( QPaintEvent * _pe ) override;
73 void mousePressEvent( QMouseEvent * _me ) override;
74
75
76protected slots:
78
79private:
80 bool clips(float level) const;
81
82private:
83 QPixmap m_background;
84 QPointF * m_points;
85
88
93} ;
94
95
96} // namespace lmms::gui
97
98#endif // LMMS_GUI_OSCILLOSCOPE_H
#define READ(addr)
Definition Ay_Cpu.cpp:92
#define WRITE(addr, data)
Definition Ay_Cpu.cpp:93
#define override
Definition DistrhoDefines.h:73
Definition SampleFrame.h:41
void setClippingColor(QColor const &clippingColor)
Definition Oscilloscope.cpp:150
QColor clippingColor
Definition Oscilloscope.h:51
void setOtherChannelsColor(QColor const &otherChannelsColor)
Definition Oscilloscope.cpp:140
QColor rightChannelColor
Definition Oscilloscope.h:49
QPointF * m_points
Definition Oscilloscope.h:84
void setActive(bool _active)
Definition Oscilloscope.cpp:88
QColor otherChannelsColor
Definition Oscilloscope.h:50
void setRightChannelColor(QColor const &rightChannelColor)
Definition Oscilloscope.cpp:130
void paintEvent(QPaintEvent *_pe) override
Definition Oscilloscope.cpp:156
bool m_active
Definition Oscilloscope.h:87
void updateAudioBuffer(const lmms::SampleFrame *buffer)
Definition Oscilloscope.cpp:76
QColor m_rightChannelColor
Definition Oscilloscope.h:90
void setLeftChannelColor(QColor const &leftChannelColor)
Definition Oscilloscope.cpp:120
QColor m_otherChannelsColor
Definition Oscilloscope.h:91
SampleFrame * m_buffer
Definition Oscilloscope.h:86
void mousePressEvent(QMouseEvent *_me) override
Definition Oscilloscope.cpp:212
bool clips(float level) const
Definition Oscilloscope.cpp:220
QColor m_leftChannelColor
Definition Oscilloscope.h:89
Oscilloscope(QWidget *_parent)
Definition Oscilloscope.cpp:42
QPixmap m_background
Definition Oscilloscope.h:83
QColor m_clippingColor
Definition Oscilloscope.h:92
QColor leftChannelColor
Definition Oscilloscope.h:48
Definition AudioPortAudio.cpp:223
Definition AudioAlsa.cpp:35
#define const
Definition zconf.h:137