lmms
Cross-platform music production software
Toggle main menu visibility
Loading...
Searching...
No Matches
include
MixerView.h
Go to the documentation of this file.
1
/*
2
* MixerView.h - effect-mixer-view for LMMS
3
*
4
* Copyright (c) 2008-2014 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_MIXER_VIEW_H
26
#define LMMS_GUI_MIXER_VIEW_H
27
28
#include <QWidget>
29
30
#include "
MixerChannelView.h
"
31
#include "
ModelView.h
"
32
#include "
SerializingObject.h
"
33
34
class
QDomDocument;
// IWYU pragma: keep
35
class
QDomElement;
// IWYU pragma: keep
36
class
QHBoxLayout;
37
class
QStackedLayout;
38
class
QScrollArea;
39
40
namespace
lmms
41
{
42
class
Mixer
;
43
}
44
45
namespace
lmms::gui
46
{
47
48
class
LMMS_EXPORT
MixerView
49
:
public
QWidget
50
,
public
ModelView
51
,
public
SerializingObjectHook
52
{
53
Q_OBJECT
54
public
:
55
MixerView
(
Mixer
* mixer);
56
void
keyPressEvent
(QKeyEvent* e)
override
;
57
58
void
saveSettings
(QDomDocument& doc, QDomElement& domElement)
override
;
59
void
loadSettings
(
const
QDomElement& domElement)
override
;
60
61
inline
MixerChannelView
*
currentMixerChannel
()
62
{
63
return
m_currentMixerChannel
;
64
}
65
66
inline
MixerChannelView
*
channelView
(
int
index)
67
{
68
return
m_mixerChannelViews
[index];
69
}
70
71
72
void
setCurrentMixerChannel(
MixerChannelView
* channel);
73
void
setCurrentMixerChannel(
int
channel);
74
75
void
clear();
76
77
78
// display the send button and knob correctly
79
void
updateMixerChannel(
int
index);
80
81
// notify the view that a mixer channel was deleted
82
void
deleteChannel(
int
index);
83
84
// delete all unused channels
85
void
deleteUnusedChannels();
86
87
// move the channel to the left or right
88
void
moveChannelLeft(
int
index);
89
void
moveChannelRight(
int
index);
90
91
void
renameChannel(
int
index);
92
93
// make sure the display syncs up with the mixer.
94
// useful for loading projects
95
void
refreshDisplay();
96
97
public
slots:
98
int
addNewChannel();
99
100
private
slots:
101
void
updateFaders();
102
// TODO This should be improved. Currently the solo and mute models are connected via
103
// the MixerChannelView's constructor with the MixerView. It would already be an improvement
104
// if the MixerView connected itself to each new MixerChannel that it creates/handles.
105
void
toggledSolo();
106
void
toggledMute();
107
108
private
:
109
Mixer
* getMixer()
const
;
110
void
updateAllMixerChannels();
111
void
connectToSoloAndMute(
int
channelIndex);
112
void
disconnectFromSoloAndMute(
int
channelIndex);
113
114
private
:
115
QVector<MixerChannelView*>
m_mixerChannelViews
;
116
117
MixerChannelView
*
m_currentMixerChannel
;
118
119
QScrollArea*
channelArea
;
120
QHBoxLayout*
chLayout
;
121
QWidget*
m_channelAreaWidget
;
122
QStackedLayout*
m_racksLayout
;
123
QWidget*
m_racksWidget
;
124
Mixer
*
m_mixer
;
125
126
void
updateMaxChannelSelector
();
127
128
friend
class
MixerChannelView
;
129
} ;
130
131
132
}
// namespace lmms::gui
133
134
#endif
// LMMS_GUI_MIXER_VIEW_H
MixerChannelView.h
ModelView.h
SerializingObject.h
lmms::Mixer
Definition
Mixer.h:139
lmms::SerializingObjectHook::SerializingObjectHook
SerializingObjectHook()
Definition
SerializingObject.h:79
lmms::gui::MixerChannelView
Definition
MixerChannelView.h:51
lmms::gui::MixerView::keyPressEvent
void keyPressEvent(QKeyEvent *e) override
Definition
MixerView.cpp:469
lmms::gui::MixerView::m_racksLayout
QStackedLayout * m_racksLayout
Definition
MixerView.h:122
lmms::gui::MixerView::loadSettings
void loadSettings(const QDomElement &domElement) override
Definition
MixerView.cpp:274
lmms::gui::MixerView::saveSettings
void saveSettings(QDomDocument &doc, QDomElement &domElement) override
Definition
MixerView.cpp:266
lmms::gui::MixerView::m_mixerChannelViews
QVector< MixerChannelView * > m_mixerChannelViews
Definition
MixerView.h:115
lmms::gui::MixerView::MixerView
MixerView(Mixer *mixer)
Definition
MixerView.cpp:58
lmms::gui::MixerView::m_mixer
Mixer * m_mixer
Definition
MixerView.h:124
lmms::gui::MixerView::updateMaxChannelSelector
void updateMaxChannelSelector()
Definition
MixerView.cpp:240
lmms::gui::MixerView::channelView
MixerChannelView * channelView(int index)
Definition
MixerView.h:66
lmms::gui::MixerView::m_currentMixerChannel
MixerChannelView * m_currentMixerChannel
Definition
MixerView.h:117
lmms::gui::MixerView::m_channelAreaWidget
QWidget * m_channelAreaWidget
Definition
MixerView.h:121
lmms::gui::MixerView::channelArea
QScrollArea * channelArea
Definition
MixerView.h:119
lmms::gui::MixerView::chLayout
QHBoxLayout * chLayout
Definition
MixerView.h:120
lmms::gui::MixerView::m_racksWidget
QWidget * m_racksWidget
Definition
MixerView.h:123
lmms::gui::MixerView::currentMixerChannel
MixerChannelView * currentMixerChannel()
Definition
MixerView.h:61
lmms::gui::MixerView::MixerChannelView
friend class MixerChannelView
Definition
MixerView.h:128
lmms::gui::ModelView::ModelView
ModelView(Model *model, QWidget *widget)
Definition
ModelView.cpp:33
lmms::gui
Definition
AudioPortAudio.cpp:209
lmms
Definition
RemotePluginBase.cpp:34
Generated on
for lmms by
1.18.0