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 |
capela |
1509 |
class ChannelStrip : public QWidget |
36 |
|
|
{ |
37 |
|
|
Q_OBJECT |
38 |
|
|
|
39 |
schoenebeck |
1461 |
public: |
40 |
capela |
1509 |
|
41 |
|
|
ChannelStrip(QWidget* pParent = NULL, Qt::WindowFlags wflags = 0); |
42 |
schoenebeck |
1461 |
~ChannelStrip(); |
43 |
|
|
|
44 |
|
|
void setup(qsamplerChannel* pChannel); |
45 |
capela |
1509 |
|
46 |
|
|
qsamplerChannel *channel() const; |
47 |
|
|
|
48 |
schoenebeck |
1461 |
void setDisplayFont(const QFont& font); |
49 |
capela |
1509 |
QFont displayFont() const; |
50 |
|
|
|
51 |
schoenebeck |
1461 |
void setDisplayEffect(bool bDisplayEffect); |
52 |
capela |
1509 |
|
53 |
schoenebeck |
1461 |
void setMaxVolume(int iMaxVolume); |
54 |
capela |
1509 |
|
55 |
schoenebeck |
1461 |
bool updateInstrumentName(bool bForce); |
56 |
|
|
bool updateChannelVolume(); |
57 |
|
|
bool updateChannelInfo(); |
58 |
|
|
bool updateChannelUsage(); |
59 |
capela |
1509 |
|
60 |
schoenebeck |
1461 |
void resetErrorCount(); |
61 |
|
|
|
62 |
|
|
signals: |
63 |
capela |
1509 |
|
64 |
schoenebeck |
1461 |
void channelChanged(ChannelStrip*); |
65 |
|
|
|
66 |
|
|
public slots: |
67 |
capela |
1509 |
|
68 |
schoenebeck |
1461 |
bool channelSetup(); |
69 |
|
|
bool channelMute(bool bMute); |
70 |
|
|
bool channelSolo(bool bSolo); |
71 |
|
|
void channelEdit(); |
72 |
|
|
bool channelReset(); |
73 |
|
|
void volumeChanged(int iVolume); |
74 |
|
|
|
75 |
|
|
protected: |
76 |
capela |
1509 |
|
77 |
schoenebeck |
1461 |
void dragEnterEvent(QDragEnterEvent* pDragEnterEvent); |
78 |
|
|
void dropEvent(QDropEvent* pDropEvent); |
79 |
|
|
void contextMenuEvent(QContextMenuEvent* pEvent); |
80 |
|
|
|
81 |
|
|
private: |
82 |
|
|
|
83 |
capela |
1509 |
Ui::qsamplerChannelStrip m_ui; |
84 |
|
|
|
85 |
schoenebeck |
1461 |
qsamplerChannel* m_pChannel; |
86 |
|
|
int m_iDirtyChange; |
87 |
|
|
int m_iErrorCount; |
88 |
|
|
}; |
89 |
|
|
|
90 |
|
|
} // namespace QSampler |
91 |
|
|
|
92 |
capela |
1464 |
#endif // __qsamplerChannelStrip_h |
93 |
|
|
|
94 |
|
|
|
95 |
|
|
// end of qsamplerChannelStrip.h |