lmms
Cross-platform music production software
Loading...
Searching...
No Matches
InstrumentTrackView.h
Go to the documentation of this file.
1/*
2 * InstrumentTrackView.h - declaration of InstrumentTrackView class
3 *
4 * Copyright (c) 2004-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_INSTRUMENT_TRACK_VIEW_H
26#define LMMS_GUI_INSTRUMENT_TRACK_VIEW_H
27
28#include "TrackView.h"
29
30#include "InstrumentTrack.h"
31
32
33namespace lmms::gui
34{
35
36
38class Knob;
39class MidiCCRackView;
43
44
46{
47 Q_OBJECT
48public:
50 ~InstrumentTrackView() override;
51
53
58
59 const InstrumentTrack * model() const
60 {
62 }
63
65
66 QMenu * midiMenu()
67 {
68 return m_midiMenu;
69 }
70
71 // Create a menu for assigning/creating channels for this track
72 QMenu * createMixerMenu( QString title, QString newMixerLabel ) override;
73
74
75protected:
76 void modelChanged() override;
77 void dragEnterEvent( QDragEnterEvent * _dee ) override;
78 void dropEvent( QDropEvent * _de ) override;
79
80
81private slots:
83 void toggleInstrumentWindow( bool _on );
84 void toggleMidiCCRack();
87
88 void midiInSelected();
89 void midiOutSelected();
90 void midiConfigChanged();
91
93 void assignMixerLine(int channelIndex);
94
96 void createMixerLine();
97
98 void handleConfigChange(QString cls, QString attr, QString value);
99
100 void corruptStateUpdate();
101
102private:
103 static QPixmap determinePixmap(InstrumentTrack* instrumentTrack);
104
105private:
107
108 // widgets in track-settings-widget
114
115 QMenu * m_midiMenu;
116
119
120 std::unique_ptr<MidiCCRackView> m_midiCCRackView;
121
122 QPoint m_lastPos;
123
125 {
126 return m_activityIndicator;
127 }
128
130} ;
131
132
133} // namespace lmms::gui
134
135#endif // LMMS_GUI_INSTRUMENT_TRACK_VIEW_H
Definition InstrumentTrack.h:62
Definition FadeButton.h:38
static QPixmap determinePixmap(InstrumentTrack *instrumentTrack)
Definition InstrumentTrackView.cpp:407
std::unique_ptr< MidiCCRackView > m_midiCCRackView
Definition InstrumentTrackView.h:120
InstrumentTrackWindow * m_window
Definition InstrumentTrackView.h:106
void toggleMidiCCRack()
Definition InstrumentTrackView.cpp:185
friend class InstrumentTrackWindow
Definition InstrumentTrackView.h:129
void dragEnterEvent(QDragEnterEvent *_dee) override
Definition InstrumentTrackView.cpp:278
void onInstrumentChanged()
Definition InstrumentTrackView.cpp:299
void midiConfigChanged()
Definition InstrumentTrackView.cpp:363
QMenu * midiMenu()
Definition InstrumentTrackView.h:66
InstrumentTrackWindow * getInstrumentTrackWindow()
Definition InstrumentTrackView.cpp:251
void handleConfigChange(QString cls, QString attr, QString value)
Definition InstrumentTrackView.cpp:261
void assignMixerLine(int channelIndex)
Assign a specific mixer Channel for this track.
Definition InstrumentTrackView.cpp:242
QAction * m_midiOutputAction
Definition InstrumentTrackView.h:118
QMenu * createMixerMenu(QString title, QString newMixerLabel) override
Create a menu for assigning/creating channels for this track.
Definition InstrumentTrackView.cpp:373
void createMixerLine()
Create and assign a new mixer Channel for this track.
Definition InstrumentTrackView.cpp:228
QMenu * m_midiMenu
Definition InstrumentTrackView.h:115
const InstrumentTrack * model() const
Definition InstrumentTrackView.h:59
MixerChannelLcdSpinBox * m_mixerChannelNumber
Definition InstrumentTrackView.h:110
InstrumentTrackView(InstrumentTrack *_it, TrackContainerView *tc)
Definition InstrumentTrackView.cpp:61
void toggleInstrumentWindow(bool _on)
Definition InstrumentTrackView.cpp:308
Knob * m_volumeKnob
Definition InstrumentTrackView.h:111
void activityIndicatorReleased()
Definition InstrumentTrackView.cpp:332
FadeButton * getActivityIndicator() override
Definition InstrumentTrackView.h:124
void dropEvent(QDropEvent *_de) override
Definition InstrumentTrackView.cpp:290
QAction * m_midiInputAction
Definition InstrumentTrackView.h:117
void corruptStateUpdate()
Definition InstrumentTrackView.cpp:429
QPoint m_lastPos
Definition InstrumentTrackView.h:122
static InstrumentTrackWindow * topLevelInstrumentTrackWindow()
Definition InstrumentTrackView.cpp:208
FadeButton * m_activityIndicator
Definition InstrumentTrackView.h:113
void activityIndicatorPressed()
Definition InstrumentTrackView.cpp:324
void midiOutSelected()
Definition InstrumentTrackView.cpp:352
void modelChanged() override
Definition InstrumentTrackView.cpp:271
Knob * m_panningKnob
Definition InstrumentTrackView.h:112
void midiInSelected()
Definition InstrumentTrackView.cpp:341
InstrumentTrack * model()
Definition InstrumentTrackView.h:54
TrackLabelButton * m_tlb
Definition InstrumentTrackView.h:109
Definition InstrumentTrackWindow.h:63
Definition Knob.h:47
Definition MidiCCRackView.h:45
Definition MixerChannelLcdSpinBox.h:38
T * castModel()
Definition ModelView.h:54
Definition TrackContainerView.h:71
Definition TrackLabelButton.h:41
friend class TrackLabelButton
Definition TrackView.h:224
TrackView(Track *track, TrackContainerView *tcv)
Create a new track View.
Definition TrackView.cpp:52
Definition AudioPortAudio.cpp:209