2 |
// |
// |
3 |
/**************************************************************************** |
/**************************************************************************** |
4 |
Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. |
Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. |
5 |
Copyright (C) 2007, Christian Schoenebeck |
Copyright (C) 2007, 2008 Christian Schoenebeck |
6 |
|
|
7 |
This program is free software; you can redistribute it and/or |
This program is free software; you can redistribute it and/or |
8 |
modify it under the terms of the GNU General Public License |
modify it under the terms of the GNU General Public License |
26 |
#include "ui_qsamplerChannelStrip.h" |
#include "ui_qsamplerChannelStrip.h" |
27 |
|
|
28 |
#include "qsamplerChannel.h" |
#include "qsamplerChannel.h" |
29 |
|
#include <QTimer> |
30 |
|
|
31 |
class QDragEnterEvent; |
class QDragEnterEvent; |
32 |
|
|
33 |
|
|
34 |
namespace QSampler { |
namespace QSampler { |
35 |
|
|
36 |
|
//------------------------------------------------------------------------- |
37 |
|
// QSampler::ChannelStrip -- Channel strip form interface. |
38 |
|
// |
39 |
|
|
40 |
class ChannelStrip : public QWidget |
class ChannelStrip : public QWidget |
41 |
{ |
{ |
42 |
Q_OBJECT |
Q_OBJECT |
43 |
|
|
44 |
public: |
public: |
45 |
|
|
46 |
ChannelStrip(QWidget* pParent = NULL, Qt::WindowFlags wflags = 0); |
ChannelStrip(QWidget* pParent = NULL, Qt::WindowFlags wflags = 0); |
47 |
~ChannelStrip(); |
~ChannelStrip(); |
48 |
|
|
49 |
|
void setup(Channel *pChannel); |
50 |
|
|
51 |
void setup(qsamplerChannel* pChannel); |
Channel *channel() const; |
52 |
|
|
53 |
qsamplerChannel *channel() const; |
void setDisplayFont(const QFont& font); |
54 |
|
QFont displayFont() const; |
55 |
|
|
56 |
void setDisplayFont(const QFont& font); |
void setDisplayEffect(bool bDisplayEffect); |
|
QFont displayFont() const; |
|
57 |
|
|
58 |
void setDisplayEffect(bool bDisplayEffect); |
void setMaxVolume(int iMaxVolume); |
59 |
|
|
60 |
void setMaxVolume(int iMaxVolume); |
bool updateInstrumentName(bool bForce); |
61 |
|
bool updateChannelVolume(); |
62 |
|
bool updateChannelInfo(); |
63 |
|
bool updateChannelUsage(); |
64 |
|
|
65 |
bool updateInstrumentName(bool bForce); |
void resetErrorCount(); |
|
bool updateChannelVolume(); |
|
|
bool updateChannelInfo(); |
|
|
bool updateChannelUsage(); |
|
66 |
|
|
67 |
void resetErrorCount(); |
// Channel strip activation/selection. |
68 |
|
void setSelected(bool bSelected); |
69 |
|
bool isSelected() const; |
70 |
|
|
71 |
signals: |
signals: |
72 |
|
|
73 |
void channelChanged(ChannelStrip*); |
void channelChanged(ChannelStrip*); |
74 |
|
|
75 |
public slots: |
public slots: |
76 |
|
|
77 |
bool channelSetup(); |
bool channelSetup(); |
78 |
bool channelMute(bool bMute); |
bool channelMute(bool bMute); |
79 |
bool channelSolo(bool bSolo); |
bool channelSolo(bool bSolo); |
80 |
void channelEdit(); |
void channelEdit(); |
81 |
bool channelReset(); |
bool channelFxEdit(); |
82 |
void volumeChanged(int iVolume); |
bool channelReset(); |
83 |
|
void volumeChanged(int iVolume); |
84 |
|
void midiArrived(); |
85 |
|
|
86 |
protected: |
protected: |
87 |
|
|
88 |
void dragEnterEvent(QDragEnterEvent* pDragEnterEvent); |
void dragEnterEvent(QDragEnterEvent* pDragEnterEvent); |
89 |
void dropEvent(QDropEvent* pDropEvent); |
void dropEvent(QDropEvent* pDropEvent); |
90 |
void contextMenuEvent(QContextMenuEvent* pEvent); |
void contextMenuEvent(QContextMenuEvent* pEvent); |
91 |
|
|
92 |
|
protected slots: |
93 |
|
|
94 |
|
void midiDataCeased(); |
95 |
|
|
96 |
private: |
private: |
97 |
|
|
98 |
Ui::qsamplerChannelStrip m_ui; |
Ui::qsamplerChannelStrip m_ui; |
99 |
|
|
100 |
|
Channel* m_pChannel; |
101 |
|
int m_iDirtyChange; |
102 |
|
int m_iErrorCount; |
103 |
|
QTimer* pMidiActivityTimer; |
104 |
|
|
105 |
qsamplerChannel* m_pChannel; |
// Channel strip activation/selection. |
106 |
int m_iDirtyChange; |
static ChannelStrip *g_pSelectedStrip; |
|
int m_iErrorCount; |
|
107 |
}; |
}; |
108 |
|
|
109 |
} // namespace QSampler |
} // namespace QSampler |