32 |
|
|
33 |
namespace QSampler { |
namespace QSampler { |
34 |
|
|
35 |
|
//------------------------------------------------------------------------- |
36 |
|
// QSampler::ChannelStrip -- Channel strip form interface. |
37 |
|
// |
38 |
|
|
39 |
class ChannelStrip : public QWidget |
class ChannelStrip : public QWidget |
40 |
{ |
{ |
41 |
Q_OBJECT |
Q_OBJECT |
42 |
|
|
43 |
public: |
public: |
44 |
|
|
45 |
ChannelStrip(QWidget* pParent = NULL, Qt::WindowFlags wflags = 0); |
ChannelStrip(QWidget* pParent = NULL, Qt::WindowFlags wflags = 0); |
46 |
~ChannelStrip(); |
~ChannelStrip(); |
47 |
|
|
48 |
|
void setup(Channel *pChannel); |
49 |
|
|
50 |
void setup(qsamplerChannel* pChannel); |
Channel *channel() const; |
51 |
|
|
52 |
qsamplerChannel *channel() const; |
void setDisplayFont(const QFont& font); |
53 |
|
QFont displayFont() const; |
54 |
|
|
55 |
void setDisplayFont(const QFont& font); |
void setDisplayEffect(bool bDisplayEffect); |
|
QFont displayFont() const; |
|
56 |
|
|
57 |
void setDisplayEffect(bool bDisplayEffect); |
void setMaxVolume(int iMaxVolume); |
58 |
|
|
59 |
void setMaxVolume(int iMaxVolume); |
bool updateInstrumentName(bool bForce); |
60 |
|
bool updateChannelVolume(); |
61 |
|
bool updateChannelInfo(); |
62 |
|
bool updateChannelUsage(); |
63 |
|
|
64 |
bool updateInstrumentName(bool bForce); |
void resetErrorCount(); |
|
bool updateChannelVolume(); |
|
|
bool updateChannelInfo(); |
|
|
bool updateChannelUsage(); |
|
65 |
|
|
66 |
void resetErrorCount(); |
// Channel strip activation/selection. |
67 |
|
void setSelected(bool bSelected); |
68 |
|
bool isSelected() const; |
69 |
|
|
70 |
signals: |
signals: |
71 |
|
|
72 |
void channelChanged(ChannelStrip*); |
void channelChanged(ChannelStrip*); |
73 |
|
|
74 |
public slots: |
public slots: |
75 |
|
|
76 |
bool channelSetup(); |
bool channelSetup(); |
77 |
bool channelMute(bool bMute); |
bool channelMute(bool bMute); |
78 |
bool channelSolo(bool bSolo); |
bool channelSolo(bool bSolo); |
79 |
void channelEdit(); |
void channelEdit(); |
80 |
bool channelReset(); |
bool channelReset(); |
81 |
void volumeChanged(int iVolume); |
void volumeChanged(int iVolume); |
82 |
|
|
83 |
protected: |
protected: |
84 |
|
|
85 |
void dragEnterEvent(QDragEnterEvent* pDragEnterEvent); |
void dragEnterEvent(QDragEnterEvent* pDragEnterEvent); |
86 |
void dropEvent(QDropEvent* pDropEvent); |
void dropEvent(QDropEvent* pDropEvent); |
87 |
void contextMenuEvent(QContextMenuEvent* pEvent); |
void contextMenuEvent(QContextMenuEvent* pEvent); |
88 |
|
|
89 |
private: |
private: |
90 |
|
|
91 |
Ui::qsamplerChannelStrip m_ui; |
Ui::qsamplerChannelStrip m_ui; |
92 |
|
|
93 |
|
Channel* m_pChannel; |
94 |
|
int m_iDirtyChange; |
95 |
|
int m_iErrorCount; |
96 |
|
|
97 |
qsamplerChannel* m_pChannel; |
// Channel strip activation/selection. |
98 |
int m_iDirtyChange; |
static ChannelStrip *g_pSelectedStrip; |
|
int m_iErrorCount; |
|
99 |
}; |
}; |
100 |
|
|
101 |
} // namespace QSampler |
} // namespace QSampler |