LMMS
Loading...
Searching...
No Matches
LfoGraph.h
Go to the documentation of this file.
1/*
2 * LfoGraph.h - Displays LFO graphs
3 *
4 * Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
5 * Copyright (c) 2024- Michael Gregorius
6 *
7 * This file is part of LMMS - https://lmms.io
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public
20 * License along with this program (see COPYING); if not, write to the
21 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301 USA.
23 *
24 */
25
26#ifndef LMMS_GUI_LFO_GRAPH_H
27#define LMMS_GUI_LFO_GRAPH_H
28
29#include <QWidget>
30
31#include "ModelView.h"
32#include "embed.h"
33
34namespace lmms
35{
36
38
39namespace gui
40{
41
42class LfoGraph : public QWidget, public ModelView
43{
44 Q_OBJECT
45 Q_PROPERTY(QColor noAmountColor MEMBER m_noAmountColor)
46 Q_PROPERTY(QColor fullAmountColor MEMBER m_fullAmountColor)
47
48public:
49 LfoGraph(QWidget* parent);
50
51protected:
52 void mousePressEvent(QMouseEvent* me) override;
53 void paintEvent(QPaintEvent* pe) override;
54
55private:
57 void toggleAmountModel();
58
59private:
60 QPixmap m_lfoGraph = embed::getIconPixmap("lfo_graph");
61
62 float m_randomGraph {0.};
65};
66
67} // namespace gui
68
69} // namespace lmms
70
71#endif // LMMS_GUI_LFO_GRAPH_H
#define override
Definition DistrhoDefines.h:73
Definition EnvelopeAndLfoParameters.h:47
LfoGraph(QWidget *parent)
Definition LfoGraph.cpp:45
QColor m_noAmountColor
Definition LfoGraph.h:63
float m_randomGraph
Definition LfoGraph.h:62
QColor m_fullAmountColor
Definition LfoGraph.h:64
QColor fullAmountColor
Definition LfoGraph.h:46
QColor noAmountColor
Definition LfoGraph.h:45
void paintEvent(QPaintEvent *pe) override
Definition LfoGraph.cpp:62
void mousePressEvent(QMouseEvent *me) override
Definition LfoGraph.cpp:54
void drawInfoText(const EnvelopeAndLfoParameters &)
Definition LfoGraph.cpp:157
QPixmap m_lfoGraph
Definition LfoGraph.h:60
void toggleAmountModel()
Definition LfoGraph.cpp:186
ModelView(Model *model, QWidget *widget)
Definition ModelView.cpp:33
static uintptr_t parent
Definition pugl.h:1644
Definition embed.cpp:36
Definition AudioPortAudio.cpp:223
Definition AudioAlsa.cpp:35
#define const
Definition zconf.h:137