LMMS
Loading...
Searching...
No Matches
InstrumentTrackWindow.h
Go to the documentation of this file.
1/*
2 * InstrumentTrackWindow.h - declaration of InstrumentTrackWindow 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_WINDOW_H
26#define LMMS_GUI_INSTRUMENT_TRACK_WINDOW_H
27
28#include <QWidget>
29
30#include "InstrumentTrack.h"
31#include "ModelView.h"
32#include "SerializingObject.h"
33
34class QLabel;
35class QLineEdit;
36class QMdiSubWindow;
37
38namespace lmms
39{
40
41namespace gui
42{
43
45class EffectRackView;
53class Knob;
54class LcdSpinBox;
55class LeftRightNav;
56class PianoView;
57class PluginView;
58class TabWidget;
59
60
61class InstrumentTrackWindow : public QWidget, public ModelView,
63{
64 Q_OBJECT
65public:
67 ~InstrumentTrackWindow() override;
68
69 void resizeEvent(QResizeEvent* event) override;
70
71
72 // parent for all internal tab-widgets
74 {
75 return m_tabWidget;
76 }
77
82
83 const InstrumentTrack * model() const
84 {
86 }
87
89
94
95
97 {
98 return m_pianoView;
99 }
100
101 static void dragEnterEventGeneric( QDragEnterEvent * _dee );
102
103 void dragEnterEvent( QDragEnterEvent * _dee ) override;
104 void dropEvent( QDropEvent * _de ) override;
105
106
107public slots:
108 void textChanged( const QString & _new_name );
109 void toggleVisibility( bool _on );
110 void updateName();
112
113
114protected:
115 // capture close-events for toggling instrument-track-button
116 void closeEvent( QCloseEvent * _ce ) override;
117 void focusInEvent( QFocusEvent * _fe ) override;
118
119 void saveSettings( QDomDocument & _doc, QDomElement & _this ) override;
120 void loadSettings( const QDomElement & _this ) override;
121
122
123protected slots:
125 void viewNextInstrument();
126 void viewPrevInstrument();
127
128private:
129 void modelChanged() override;
133 void adjustTabSize(QWidget *w);
134
135 QMdiSubWindow* findSubWindowInParents();
136 void updateSubWindow();
137
140
141 // widgets on the top of an instrument-track-window
142 QLineEdit * m_nameLineEdit;
149 QLabel * m_pitchLabel;
153
154
155
156 // tab-widget with all children
162 QWidget* m_instrumentFunctionsView; // container of note stacking and arpeggio
166
167
168 // test-piano at the bottom of every instrument-settings-window
170
171 friend class InstrumentView;
173} ;
174
175
176} // namespace gui
177
178} // namespace lmms
179
180#endif // LMMS_GUI_INSTRUMENT_TRACK_WINDOW_H
Definition InstrumentTrack.h:62
SerializingObjectHook()
Definition SerializingObject.h:79
Definition AutomatableButton.h:39
Definition EffectRackView.h:44
Definition InstrumentFunctionViews.h:72
Definition InstrumentFunctionViews.h:49
Definition InstrumentMidiIOView.h:49
Definition InstrumentSoundShapingView.h:47
Definition InstrumentTrackView.h:46
Knob * m_volumeKnob
Definition InstrumentTrackWindow.h:144
void adjustTabSize(QWidget *w)
Definition InstrumentTrackWindow.cpp:722
void toggleVisibility(bool _on)
Definition InstrumentTrackWindow.cpp:521
TabWidget * tabWidgetParent()
Definition InstrumentTrackWindow.h:73
InstrumentTrackView * m_itv
Definition InstrumentTrackWindow.h:139
friend class InstrumentView
Definition InstrumentTrackWindow.h:171
QLineEdit * m_nameLineEdit
Definition InstrumentTrackWindow.h:142
QLabel * m_pitchLabel
Definition InstrumentTrackWindow.h:149
Knob * m_pitchKnob
Definition InstrumentTrackWindow.h:146
InstrumentTrack * m_track
Definition InstrumentTrackWindow.h:138
AutomatableButton * m_muteBtn
Definition InstrumentTrackWindow.h:147
void viewPrevInstrument()
Definition InstrumentTrackWindow.cpp:717
void resizeEvent(QResizeEvent *event) override
Definition InstrumentTrackWindow.cpp:299
QWidget * m_instrumentFunctionsView
Definition InstrumentTrackWindow.h:162
QMdiSubWindow * findSubWindowInParents()
Definition InstrumentTrackWindow.cpp:731
AutomatableButton * m_soloBtn
Definition InstrumentTrackWindow.h:148
void setInstrumentTrackView(InstrumentTrackView *_tv)
Definition InstrumentTrackWindow.cpp:325
~InstrumentTrackWindow() override
Definition InstrumentTrackWindow.cpp:311
void saveSettingsBtnClicked()
Definition InstrumentTrackWindow.cpp:406
TabWidget * m_tabWidget
Definition InstrumentTrackWindow.h:157
QLabel * m_pitchRangeLabel
Definition InstrumentTrackWindow.h:151
InstrumentTrackView * instrumentTrackView()
Definition InstrumentTrackWindow.h:90
PluginView * m_instrumentView
Definition InstrumentTrackWindow.h:158
void updateSubWindow()
Definition InstrumentTrackWindow.cpp:752
LcdSpinBox * m_pitchRangeSpinBox
Definition InstrumentTrackWindow.h:150
void viewNextInstrument()
Definition InstrumentTrackWindow.cpp:713
void modelChanged() override
Definition InstrumentTrackWindow.cpp:339
void dragEnterEvent(QDragEnterEvent *_dee) override
Definition InstrumentTrackWindow.cpp:566
PianoView * pianoView()
Definition InstrumentTrackWindow.h:96
InstrumentTuningView * m_tuningView
Definition InstrumentTrackWindow.h:165
InstrumentFunctionNoteStackingView * m_noteStackingView
Definition InstrumentTrackWindow.h:160
void closeEvent(QCloseEvent *_ce) override
Definition InstrumentTrackWindow.cpp:539
EffectRackView * m_effectView
Definition InstrumentTrackWindow.h:164
void dropEvent(QDropEvent *_de) override
Definition InstrumentTrackWindow.cpp:574
void textChanged(const QString &_new_name)
Definition InstrumentTrackWindow.cpp:512
void loadSettings(const QDomElement &_this) override
Definition InstrumentTrackWindow.cpp:627
LeftRightNav * m_leftRightNav
Definition InstrumentTrackWindow.h:143
Knob * m_panningKnob
Definition InstrumentTrackWindow.h:145
void saveSettings(QDomDocument &_doc, QDomElement &_this) override
Definition InstrumentTrackWindow.cpp:618
InstrumentSoundShapingView * m_ssView
Definition InstrumentTrackWindow.h:159
PianoView * m_pianoView
Definition InstrumentTrackWindow.h:169
InstrumentFunctionArpeggioView * m_arpeggioView
Definition InstrumentTrackWindow.h:161
const InstrumentTrack * model() const
Definition InstrumentTrackWindow.h:83
void focusInEvent(QFocusEvent *_fe) override
Definition InstrumentTrackWindow.cpp:548
void updateName()
Definition InstrumentTrackWindow.cpp:448
friend class InstrumentTrackView
Definition InstrumentTrackWindow.h:172
void updateInstrumentView()
Definition InstrumentTrackWindow.cpp:462
void viewInstrumentInDirection(int d)
Definition InstrumentTrackWindow.cpp:637
InstrumentMidiIOView * m_midiView
Definition InstrumentTrackWindow.h:163
MixerChannelLcdSpinBox * m_mixerChannelNumber
Definition InstrumentTrackWindow.h:152
InstrumentTrackWindow(InstrumentTrackView *_tv)
Definition InstrumentTrackWindow.cpp:81
InstrumentTrack * model()
Definition InstrumentTrackWindow.h:78
static void dragEnterEventGeneric(QDragEnterEvent *_dee)
Definition InstrumentTrackWindow.cpp:558
Definition InstrumentTuningView.h:48
Definition Knob.h:47
Definition LcdSpinBox.h:35
Definition LeftRightNav.h:35
Definition MixerChannelLcdSpinBox.h:38
ModelView(Model *model, QWidget *widget)
Definition ModelView.cpp:33
T * castModel()
Definition ModelView.h:54
Definition PianoView.h:44
Definition PluginView.h:36
Definition TabWidget.h:38
UINT_D64 w
Definition inflate.c:942
unsigned d
Definition inflate.c:940
Definition AudioPortAudio.cpp:223
Definition AudioAlsa.cpp:35