31 |
#include <QDragEnterEvent> |
#include <QDragEnterEvent> |
32 |
#include <QUrl> |
#include <QUrl> |
33 |
|
|
34 |
|
#define MIDI_OFF_COLOR Qt::darkGreen |
35 |
|
#define MIDI_ON_COLOR Qt::green |
36 |
|
|
37 |
// Channel status/usage usage limit control. |
// Channel status/usage usage limit control. |
38 |
#define QSAMPLER_ERROR_LIMIT 3 |
#define QSAMPLER_ERROR_LIMIT 3 |
39 |
|
|
95 |
SIGNAL(clicked()), |
SIGNAL(clicked()), |
96 |
SLOT(channelFxEdit())); |
SLOT(channelFxEdit())); |
97 |
|
|
98 |
|
pMidiActivityTimer = new QTimer(this); |
99 |
|
pMidiActivityTimer->setSingleShot(true); |
100 |
|
QObject::connect( |
101 |
|
pMidiActivityTimer, SIGNAL(timeout()), |
102 |
|
this, SLOT(midiDataCeased()) |
103 |
|
); |
104 |
|
|
105 |
|
#if CONFIG_LSCP_CHANNEL_MIDI |
106 |
|
m_ui.MidiActivityLabel->setPalette(MIDI_OFF_COLOR); |
107 |
|
m_ui.MidiActivityLabel->setAutoFillBackground(true); |
108 |
|
#else |
109 |
|
m_ui.MidiActivityLabel->setText("X"); |
110 |
|
m_ui.MidiActivityLabel->setToolTip("MIDI Activity Disabled"); |
111 |
|
#endif |
112 |
|
|
113 |
setSelected(false); |
setSelected(false); |
114 |
} |
} |
115 |
|
|
549 |
} |
} |
550 |
} |
} |
551 |
|
|
552 |
|
void ChannelStrip::midiArrived() { |
553 |
|
m_ui.MidiActivityLabel->setPalette(MIDI_ON_COLOR); |
554 |
|
pMidiActivityTimer->start(50); |
555 |
|
} |
556 |
|
|
557 |
// Context menu event handler. |
// Context menu event handler. |
558 |
void ChannelStrip::contextMenuEvent( QContextMenuEvent *pEvent ) |
void ChannelStrip::contextMenuEvent( QContextMenuEvent *pEvent ) |
564 |
m_pChannel->contextMenuEvent(pEvent); |
m_pChannel->contextMenuEvent(pEvent); |
565 |
} |
} |
566 |
|
|
567 |
|
void ChannelStrip::midiDataCeased() { |
568 |
|
m_ui.MidiActivityLabel->setPalette(MIDI_OFF_COLOR); |
569 |
|
} |
570 |
|
|
571 |
// Error count hackish accessors. |
// Error count hackish accessors. |
572 |
void ChannelStrip::resetErrorCount (void) |
void ChannelStrip::resetErrorCount (void) |