1 |
capela |
1464 |
// qsamplerChannelStrip.h |
2 |
|
|
// |
3 |
|
|
/**************************************************************************** |
4 |
|
|
Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. |
5 |
|
|
Copyright (C) 2007, Christian Schoenebeck |
6 |
schoenebeck |
1461 |
|
7 |
capela |
1464 |
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 |
schoenebeck |
1461 |
#include "ui_qsamplerChannelStrip.h" |
27 |
|
|
|
28 |
|
|
#include "qsamplerChannel.h" |
29 |
|
|
|
30 |
capela |
1499 |
class QDragEnterEvent; |
31 |
schoenebeck |
1461 |
|
32 |
capela |
1499 |
|
33 |
schoenebeck |
1461 |
namespace QSampler { |
34 |
|
|
|
35 |
|
|
class ChannelStrip : public QWidget { |
36 |
|
|
Q_OBJECT |
37 |
|
|
public: |
38 |
|
|
ChannelStrip(QWidget* parent = 0, Qt::WFlags f = 0); |
39 |
|
|
~ChannelStrip(); |
40 |
|
|
|
41 |
|
|
void setup(qsamplerChannel* pChannel); |
42 |
|
|
qsamplerChannel* channel(); |
43 |
|
|
QFont displayFont(); |
44 |
|
|
void setDisplayFont(const QFont& font); |
45 |
|
|
void setDisplayEffect(bool bDisplayEffect); |
46 |
|
|
void setMaxVolume(int iMaxVolume); |
47 |
|
|
bool updateInstrumentName(bool bForce); |
48 |
|
|
bool updateChannelVolume(); |
49 |
|
|
bool updateChannelInfo(); |
50 |
|
|
bool updateChannelUsage(); |
51 |
|
|
void resetErrorCount(); |
52 |
|
|
|
53 |
|
|
signals: |
54 |
|
|
void channelChanged(ChannelStrip*); |
55 |
|
|
|
56 |
|
|
public slots: |
57 |
|
|
bool channelSetup(); |
58 |
|
|
bool channelMute(bool bMute); |
59 |
|
|
bool channelSolo(bool bSolo); |
60 |
|
|
void channelEdit(); |
61 |
|
|
bool channelReset(); |
62 |
|
|
void volumeChanged(int iVolume); |
63 |
|
|
|
64 |
|
|
protected: |
65 |
|
|
void dragEnterEvent(QDragEnterEvent* pDragEnterEvent); |
66 |
|
|
void dropEvent(QDropEvent* pDropEvent); |
67 |
|
|
void contextMenuEvent(QContextMenuEvent* pEvent); |
68 |
|
|
|
69 |
|
|
private: |
70 |
|
|
Ui::qsamplerChannelStrip ui; |
71 |
|
|
|
72 |
|
|
qsamplerChannel* m_pChannel; |
73 |
|
|
int m_iDirtyChange; |
74 |
|
|
int m_iErrorCount; |
75 |
|
|
}; |
76 |
|
|
|
77 |
|
|
} // namespace QSampler |
78 |
|
|
|
79 |
capela |
1464 |
#endif // __qsamplerChannelStrip_h |
80 |
|
|
|
81 |
|
|
|
82 |
|
|
// end of qsamplerChannelStrip.h |