LMMS
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:
82 void toggleInstrumentWindow( bool _on );
83 void toggleMidiCCRack();
86
87 void midiInSelected();
88 void midiOutSelected();
89 void midiConfigChanged();
90
91 void assignMixerLine( int channelIndex );
92 void createMixerLine();
93
94 void handleConfigChange(QString cls, QString attr, QString value);
95
96private:
97 static QPixmap determinePixmap(InstrumentTrack* instrumentTrack);
98
99private:
101
102 // widgets in track-settings-widget
108
109 QMenu * m_midiMenu;
110
113
114 std::unique_ptr<MidiCCRackView> m_midiCCRackView;
115
116 QPoint m_lastPos;
117
119 {
120 return m_activityIndicator;
121 }
122
124} ;
125
126
127} // namespace lmms::gui
128
129#endif // LMMS_GUI_INSTRUMENT_TRACK_VIEW_H
Definition InstrumentTrack.h:62
Definition FadeButton.h:38
static QPixmap determinePixmap(InstrumentTrack *instrumentTrack)
Definition InstrumentTrackView.cpp:402
std::unique_ptr< MidiCCRackView > m_midiCCRackView
Definition InstrumentTrackView.h:114
InstrumentTrackWindow * m_window
Definition InstrumentTrackView.h:100
void toggleMidiCCRack()
Definition InstrumentTrackView.cpp:187
friend class InstrumentTrackWindow
Definition InstrumentTrackView.h:123
void dragEnterEvent(QDragEnterEvent *_dee) override
Definition InstrumentTrackView.cpp:282
void midiConfigChanged()
Definition InstrumentTrackView.cpp:358
QMenu * midiMenu()
Definition InstrumentTrackView.h:66
InstrumentTrackWindow * getInstrumentTrackWindow()
Definition InstrumentTrackView.cpp:255
void handleConfigChange(QString cls, QString attr, QString value)
Definition InstrumentTrackView.cpp:265
void assignMixerLine(int channelIndex)
Assign a specific mixer Channel for this track.
Definition InstrumentTrackView.cpp:246
QAction * m_midiOutputAction
Definition InstrumentTrackView.h:112
QMenu * createMixerMenu(QString title, QString newMixerLabel) override
Create a menu for assigning/creating channels for this track.
Definition InstrumentTrackView.cpp:368
void createMixerLine()
Create and assign a new mixer Channel for this track.
Definition InstrumentTrackView.cpp:231
QMenu * m_midiMenu
Definition InstrumentTrackView.h:109
const InstrumentTrack * model() const
Definition InstrumentTrackView.h:59
MixerChannelLcdSpinBox * m_mixerChannelNumber
Definition InstrumentTrackView.h:104
InstrumentTrackView(InstrumentTrack *_it, TrackContainerView *tc)
Definition InstrumentTrackView.cpp:61
void toggleInstrumentWindow(bool _on)
Definition InstrumentTrackView.cpp:303
Knob * m_volumeKnob
Definition InstrumentTrackView.h:105
void activityIndicatorReleased()
Definition InstrumentTrackView.cpp:327
FadeButton * getActivityIndicator() override
Definition InstrumentTrackView.h:118
void dropEvent(QDropEvent *_de) override
Definition InstrumentTrackView.cpp:294
QAction * m_midiInputAction
Definition InstrumentTrackView.h:111
QPoint m_lastPos
Definition InstrumentTrackView.h:116
static InstrumentTrackWindow * topLevelInstrumentTrackWindow()
Definition InstrumentTrackView.cpp:210
FadeButton * m_activityIndicator
Definition InstrumentTrackView.h:107
void activityIndicatorPressed()
Definition InstrumentTrackView.cpp:319
void midiOutSelected()
Definition InstrumentTrackView.cpp:347
void modelChanged() override
Definition InstrumentTrackView.cpp:275
~InstrumentTrackView() override
Definition InstrumentTrackView.cpp:175
Knob * m_panningKnob
Definition InstrumentTrackView.h:106
void midiInSelected()
Definition InstrumentTrackView.cpp:336
InstrumentTrack * model()
Definition InstrumentTrackView.h:54
TrackLabelButton * m_tlb
Definition InstrumentTrackView.h:103
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:168
TrackView(Track *_track, TrackContainerView *tcv)
Create a new track View.
Definition TrackView.cpp:61
static PuglViewHint int value
Definition pugl.h:1708
static const char * title
Definition pugl.h:1747
Definition AudioPortAudio.cpp:223