1 |
capela |
1464 |
// qsamplerChannelStrip.h |
2 |
|
|
// |
3 |
|
|
/**************************************************************************** |
4 |
|
|
Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. |
5 |
schoenebeck |
1667 |
Copyright (C) 2007, 2008 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 |
1558 |
//------------------------------------------------------------------------- |
36 |
|
|
// QSampler::ChannelStrip -- Channel strip form interface. |
37 |
|
|
// |
38 |
|
|
|
39 |
capela |
1509 |
class ChannelStrip : public QWidget |
40 |
|
|
{ |
41 |
|
|
Q_OBJECT |
42 |
|
|
|
43 |
schoenebeck |
1461 |
public: |
44 |
capela |
1509 |
|
45 |
capela |
1510 |
ChannelStrip(QWidget* pParent = NULL, Qt::WindowFlags wflags = 0); |
46 |
|
|
~ChannelStrip(); |
47 |
schoenebeck |
1461 |
|
48 |
capela |
1558 |
void setup(Channel *pChannel); |
49 |
capela |
1509 |
|
50 |
capela |
1558 |
Channel *channel() const; |
51 |
capela |
1509 |
|
52 |
capela |
1510 |
void setDisplayFont(const QFont& font); |
53 |
|
|
QFont displayFont() const; |
54 |
capela |
1509 |
|
55 |
capela |
1510 |
void setDisplayEffect(bool bDisplayEffect); |
56 |
capela |
1509 |
|
57 |
capela |
1510 |
void setMaxVolume(int iMaxVolume); |
58 |
capela |
1509 |
|
59 |
capela |
1510 |
bool updateInstrumentName(bool bForce); |
60 |
|
|
bool updateChannelVolume(); |
61 |
|
|
bool updateChannelInfo(); |
62 |
|
|
bool updateChannelUsage(); |
63 |
capela |
1509 |
|
64 |
capela |
1510 |
void resetErrorCount(); |
65 |
schoenebeck |
1461 |
|
66 |
capela |
1514 |
// Channel strip activation/selection. |
67 |
|
|
void setSelected(bool bSelected); |
68 |
|
|
bool isSelected() const; |
69 |
|
|
|
70 |
schoenebeck |
1461 |
signals: |
71 |
capela |
1509 |
|
72 |
capela |
1510 |
void channelChanged(ChannelStrip*); |
73 |
schoenebeck |
1461 |
|
74 |
|
|
public slots: |
75 |
capela |
1509 |
|
76 |
capela |
1510 |
bool channelSetup(); |
77 |
|
|
bool channelMute(bool bMute); |
78 |
|
|
bool channelSolo(bool bSolo); |
79 |
|
|
void channelEdit(); |
80 |
schoenebeck |
1667 |
bool channelFxEdit(); |
81 |
capela |
1510 |
bool channelReset(); |
82 |
|
|
void volumeChanged(int iVolume); |
83 |
schoenebeck |
1461 |
|
84 |
|
|
protected: |
85 |
capela |
1509 |
|
86 |
capela |
1510 |
void dragEnterEvent(QDragEnterEvent* pDragEnterEvent); |
87 |
|
|
void dropEvent(QDropEvent* pDropEvent); |
88 |
|
|
void contextMenuEvent(QContextMenuEvent* pEvent); |
89 |
schoenebeck |
1461 |
|
90 |
|
|
private: |
91 |
|
|
|
92 |
capela |
1510 |
Ui::qsamplerChannelStrip m_ui; |
93 |
capela |
1509 |
|
94 |
capela |
1558 |
Channel* m_pChannel; |
95 |
capela |
1510 |
int m_iDirtyChange; |
96 |
|
|
int m_iErrorCount; |
97 |
capela |
1514 |
|
98 |
|
|
// Channel strip activation/selection. |
99 |
|
|
static ChannelStrip *g_pSelectedStrip; |
100 |
schoenebeck |
1461 |
}; |
101 |
|
|
|
102 |
|
|
} // namespace QSampler |
103 |
|
|
|
104 |
capela |
1464 |
#endif // __qsamplerChannelStrip_h |
105 |
|
|
|
106 |
|
|
|
107 |
|
|
// end of qsamplerChannelStrip.h |