/[svn]/qsampler/trunk/src/qsamplerChannelStrip.h
ViewVC logotype

Contents of /qsampler/trunk/src/qsamplerChannelStrip.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1691 - (show annotations) (download) (as text)
Thu Feb 14 22:31:26 2008 UTC (16 years, 1 month ago) by schoenebeck
File MIME type: text/x-c++hdr
File size: 2768 byte(s)
* implemented MIDI indicator LED on channel strips

1 // qsamplerChannelStrip.h
2 //
3 /****************************************************************************
4 Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved.
5 Copyright (C) 2007, 2008 Christian Schoenebeck
6
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2
10 of the License, or (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License along
18 with this program; if not, write to the Free Software Foundation, Inc.,
19 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20
21 *****************************************************************************/
22
23 #ifndef __qsamplerChannelStrip_h
24 #define __qsamplerChannelStrip_h
25
26 #include "ui_qsamplerChannelStrip.h"
27
28 #include "qsamplerChannel.h"
29 #include <QTimer>
30
31 class QDragEnterEvent;
32
33
34 namespace QSampler {
35
36 //-------------------------------------------------------------------------
37 // QSampler::ChannelStrip -- Channel strip form interface.
38 //
39
40 class ChannelStrip : public QWidget
41 {
42 Q_OBJECT
43
44 public:
45
46 ChannelStrip(QWidget* pParent = NULL, Qt::WindowFlags wflags = 0);
47 ~ChannelStrip();
48
49 void setup(Channel *pChannel);
50
51 Channel *channel() const;
52
53 void setDisplayFont(const QFont& font);
54 QFont displayFont() const;
55
56 void setDisplayEffect(bool bDisplayEffect);
57
58 void setMaxVolume(int iMaxVolume);
59
60 bool updateInstrumentName(bool bForce);
61 bool updateChannelVolume();
62 bool updateChannelInfo();
63 bool updateChannelUsage();
64
65 void resetErrorCount();
66
67 // Channel strip activation/selection.
68 void setSelected(bool bSelected);
69 bool isSelected() const;
70
71 signals:
72
73 void channelChanged(ChannelStrip*);
74
75 public slots:
76
77 bool channelSetup();
78 bool channelMute(bool bMute);
79 bool channelSolo(bool bSolo);
80 void channelEdit();
81 bool channelFxEdit();
82 bool channelReset();
83 void volumeChanged(int iVolume);
84 void midiArrived();
85
86 protected:
87
88 void dragEnterEvent(QDragEnterEvent* pDragEnterEvent);
89 void dropEvent(QDropEvent* pDropEvent);
90 void contextMenuEvent(QContextMenuEvent* pEvent);
91
92 protected slots:
93
94 void midiDataCeased();
95
96 private:
97
98 Ui::qsamplerChannelStrip m_ui;
99
100 Channel* m_pChannel;
101 int m_iDirtyChange;
102 int m_iErrorCount;
103 QTimer* pMidiActivityTimer;
104
105 // Channel strip activation/selection.
106 static ChannelStrip *g_pSelectedStrip;
107 };
108
109 } // namespace QSampler
110
111 #endif // __qsamplerChannelStrip_h
112
113
114 // end of qsamplerChannelStrip.h

  ViewVC Help
Powered by ViewVC