LMMS
Loading...
Searching...
No Matches
EnvelopeGraph.h
Go to the documentation of this file.
1/*
2 * EnvelopeGraph.h - Displays envelope 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_ENVELOPE_GRAPH_H
27#define LMMS_GUI_ENVELOPE_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 EnvelopeGraph : 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 Q_PROPERTY(QColor markerFillColor MEMBER m_markerFillColor)
48 Q_PROPERTY(QColor markerOutlineColor MEMBER m_markerOutlineColor)
49
50public:
57
58public:
59 EnvelopeGraph(QWidget* parent);
60
61protected:
62 void modelChanged() override;
63
64 void mousePressEvent(QMouseEvent*) override;
65 void contextMenuEvent(QContextMenuEvent*) override;
66 void paintEvent(QPaintEvent*) override;
67
68private:
69 void toggleAmountModel();
70
71private:
72 QPixmap m_envGraph = embed::getIconPixmap("envelope_graph");
73
75
77
82};
83
84} // namespace gui
85
86} // namespace lmms
87
88#endif // LMMS_GUI_ENVELOPE_GRAPH_H
Definition EnvelopeAndLfoParameters.h:47
EnvelopeAndLfoParameters * m_params
Definition EnvelopeGraph.h:74
QColor noAmountColor
Definition EnvelopeGraph.h:45
QColor fullAmountColor
Definition EnvelopeGraph.h:46
void modelChanged() override
Definition EnvelopeGraph.cpp:55
void toggleAmountModel()
Definition EnvelopeGraph.cpp:249
QColor m_fullAmountColor
Definition EnvelopeGraph.h:79
void contextMenuEvent(QContextMenuEvent *) override
Definition EnvelopeGraph.cpp:65
QColor m_noAmountColor
Definition EnvelopeGraph.h:78
void mousePressEvent(QMouseEvent *) override
Definition EnvelopeGraph.cpp:60
ScalingMode
Definition EnvelopeGraph.h:52
@ Relative
Definition EnvelopeGraph.h:55
@ Dynamic
Definition EnvelopeGraph.h:53
@ Absolute
Definition EnvelopeGraph.h:54
ScalingMode m_scaling
Definition EnvelopeGraph.h:76
QColor m_markerFillColor
Definition EnvelopeGraph.h:80
void paintEvent(QPaintEvent *) override
Definition EnvelopeGraph.cpp:104
QColor markerOutlineColor
Definition EnvelopeGraph.h:48
QPixmap m_envGraph
Definition EnvelopeGraph.h:72
QColor m_markerOutlineColor
Definition EnvelopeGraph.h:81
QColor markerFillColor
Definition EnvelopeGraph.h:47
EnvelopeGraph(QWidget *parent)
Definition EnvelopeGraph.cpp:44
ModelView(Model *model, QWidget *widget)
Definition ModelView.cpp:33
static uintptr_t parent
Definition pugl.h:1644
auto getIconPixmap(std::string_view name, int width, int height, const char *const *xpm) -> QPixmap
Definition embed.cpp:107
Definition AudioPortAudio.cpp:223
Definition AudioAlsa.cpp:35