lmms
Cross-platform music production software
Toggle main menu visibility
Loading...
Searching...
No Matches
include
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
34
namespace
lmms
35
{
36
37
class
EnvelopeAndLfoParameters
;
38
39
namespace
gui
40
{
41
42
class
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
50
public:
51
enum class
ScalingMode
52
{
53
Dynamic,
54
Absolute,
55
Relative
56
};
57
58
public
:
59
EnvelopeGraph
(QWidget* parent);
60
61
protected
:
62
void
modelChanged
()
override
;
63
64
void
mousePressEvent
(QMouseEvent*)
override
;
65
void
contextMenuEvent
(QContextMenuEvent*)
override
;
66
void
paintEvent
(QPaintEvent*)
override
;
67
68
private
:
69
void
toggleAmountModel
();
70
71
private
:
72
QPixmap
m_envGraph
=
embed::getIconPixmap
(
"envelope_graph"
);
73
74
EnvelopeAndLfoParameters
*
m_params
=
nullptr
;
75
76
ScalingMode
m_scaling
=
ScalingMode::Dynamic
;
77
78
QColor
m_noAmountColor
;
79
QColor
m_fullAmountColor
;
80
QColor
m_markerFillColor
;
81
QColor
m_markerOutlineColor
;
82
};
83
84
}
// namespace gui
85
86
}
// namespace lmms
87
88
#endif
// LMMS_GUI_ENVELOPE_GRAPH_H
ModelView.h
lmms::EnvelopeAndLfoParameters
Definition
EnvelopeAndLfoParameters.h:47
lmms::gui::EnvelopeGraph::m_params
EnvelopeAndLfoParameters * m_params
Definition
EnvelopeGraph.h:74
lmms::gui::EnvelopeGraph::noAmountColor
QColor noAmountColor
Definition
EnvelopeGraph.h:45
lmms::gui::EnvelopeGraph::fullAmountColor
QColor fullAmountColor
Definition
EnvelopeGraph.h:46
lmms::gui::EnvelopeGraph::modelChanged
void modelChanged() override
Definition
EnvelopeGraph.cpp:55
lmms::gui::EnvelopeGraph::toggleAmountModel
void toggleAmountModel()
Definition
EnvelopeGraph.cpp:249
lmms::gui::EnvelopeGraph::m_fullAmountColor
QColor m_fullAmountColor
Definition
EnvelopeGraph.h:79
lmms::gui::EnvelopeGraph::contextMenuEvent
void contextMenuEvent(QContextMenuEvent *) override
Definition
EnvelopeGraph.cpp:65
lmms::gui::EnvelopeGraph::m_noAmountColor
QColor m_noAmountColor
Definition
EnvelopeGraph.h:78
lmms::gui::EnvelopeGraph::mousePressEvent
void mousePressEvent(QMouseEvent *) override
Definition
EnvelopeGraph.cpp:60
lmms::gui::EnvelopeGraph::ScalingMode
ScalingMode
Definition
EnvelopeGraph.h:52
lmms::gui::EnvelopeGraph::ScalingMode::Dynamic
@ Dynamic
Definition
EnvelopeGraph.h:53
lmms::gui::EnvelopeGraph::m_scaling
ScalingMode m_scaling
Definition
EnvelopeGraph.h:76
lmms::gui::EnvelopeGraph::m_markerFillColor
QColor m_markerFillColor
Definition
EnvelopeGraph.h:80
lmms::gui::EnvelopeGraph::paintEvent
void paintEvent(QPaintEvent *) override
Definition
EnvelopeGraph.cpp:104
lmms::gui::EnvelopeGraph::markerOutlineColor
QColor markerOutlineColor
Definition
EnvelopeGraph.h:48
lmms::gui::EnvelopeGraph::m_envGraph
QPixmap m_envGraph
Definition
EnvelopeGraph.h:72
lmms::gui::EnvelopeGraph::m_markerOutlineColor
QColor m_markerOutlineColor
Definition
EnvelopeGraph.h:81
lmms::gui::EnvelopeGraph::markerFillColor
QColor markerFillColor
Definition
EnvelopeGraph.h:47
lmms::gui::EnvelopeGraph::EnvelopeGraph
EnvelopeGraph(QWidget *parent)
Definition
EnvelopeGraph.cpp:44
lmms::gui::ModelView::ModelView
ModelView(Model *model, QWidget *widget)
Definition
ModelView.cpp:33
embed.h
lmms::embed::getIconPixmap
auto getIconPixmap(std::string_view name, int width, int height, const char *const *xpm) -> QPixmap
Return an image for the icon pixmap cache.
Definition
embed.cpp:107
lmms::gui
Definition
AudioPortAudio.cpp:209
lmms
Definition
RemotePluginBase.cpp:34
Generated on
for lmms by
1.18.0