1 |
// qsamplerChannelStrip.cpp |
// qsamplerChannelStrip.cpp |
2 |
// |
// |
3 |
/**************************************************************************** |
/**************************************************************************** |
4 |
Copyright (C) 2004-2010, rncbc aka Rui Nuno Capela. All rights reserved. |
Copyright (C) 2004-2012, rncbc aka Rui Nuno Capela. All rights reserved. |
5 |
Copyright (C) 2007, 2008 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 |
29 |
|
|
30 |
#include <QMessageBox> |
#include <QMessageBox> |
31 |
#include <QDragEnterEvent> |
#include <QDragEnterEvent> |
32 |
|
#include <QFileInfo> |
33 |
#include <QTimer> |
#include <QTimer> |
34 |
#include <QUrl> |
#include <QUrl> |
35 |
|
|
36 |
|
#if QT_VERSION >= 0x050000 |
37 |
|
#include <QMimeData> |
38 |
|
#endif |
39 |
|
|
40 |
// Channel status/usage usage limit control. |
// Channel status/usage usage limit control. |
41 |
#define QSAMPLER_ERROR_LIMIT 3 |
#define QSAMPLER_ERROR_LIMIT 3 |
79 |
m_iErrorCount = 0; |
m_iErrorCount = 0; |
80 |
|
|
81 |
if (++g_iMidiActivityRefCount == 1) { |
if (++g_iMidiActivityRefCount == 1) { |
82 |
g_pMidiActivityLedOn = new QPixmap(":/icons/ledon1.png"); |
g_pMidiActivityLedOn = new QPixmap(":/images/ledon1.png"); |
83 |
g_pMidiActivityLedOff = new QPixmap(":/icons/ledoff1.png"); |
g_pMidiActivityLedOff = new QPixmap(":/images/ledoff1.png"); |
84 |
} |
} |
85 |
|
|
86 |
m_ui.MidiActivityLabel->setPixmap(*g_pMidiActivityLedOff); |
m_ui.MidiActivityLabel->setPixmap(*g_pMidiActivityLedOff); |
161 |
while (iter.hasNext()) { |
while (iter.hasNext()) { |
162 |
const QString& sFilename = iter.next().toLocalFile(); |
const QString& sFilename = iter.next().toLocalFile(); |
163 |
if (!sFilename.isEmpty()) { |
if (!sFilename.isEmpty()) { |
164 |
bAccept = Channel::isInstrumentFile(sFilename); |
// bAccept = Channel::isDlsInstrumentFile(sFilename); |
165 |
|
bAccept = QFileInfo(sFilename).exists(); |
166 |
break; |
break; |
167 |
} |
} |
168 |
} |
} |
253 |
m_ui.MidiPortChannelTextLabel->setPalette(pal); |
m_ui.MidiPortChannelTextLabel->setPalette(pal); |
254 |
pal.setColor(QPalette::Foreground, Qt::green); |
pal.setColor(QPalette::Foreground, Qt::green); |
255 |
if (bDisplayEffect) { |
if (bDisplayEffect) { |
256 |
QPixmap pm(":/icons/displaybg1.png"); |
QPixmap pm(":/images/displaybg1.png"); |
257 |
pal.setBrush(QPalette::Background, QBrush(pm)); |
pal.setBrush(QPalette::Background, QBrush(pm)); |
258 |
} else { |
} else { |
259 |
pal.setColor(QPalette::Background, Qt::black); |
pal.setColor(QPalette::Background, Qt::black); |
494 |
// Mute/Solo button state coloring... |
// Mute/Solo button state coloring... |
495 |
bool bMute = m_pChannel->channelMute(); |
bool bMute = m_pChannel->channelMute(); |
496 |
const QColor& rgbButton = pal.color(QPalette::Button); |
const QColor& rgbButton = pal.color(QPalette::Button); |
497 |
|
const QColor& rgbButtonText = pal.color(QPalette::ButtonText); |
498 |
pal.setColor(QPalette::Foreground, rgbFore); |
pal.setColor(QPalette::Foreground, rgbFore); |
499 |
pal.setColor(QPalette::Button, bMute ? Qt::yellow : rgbButton); |
pal.setColor(QPalette::Button, bMute ? Qt::yellow : rgbButton); |
500 |
|
pal.setColor(QPalette::ButtonText, bMute ? Qt::darkYellow : rgbButtonText); |
501 |
m_ui.ChannelMutePushButton->setPalette(pal); |
m_ui.ChannelMutePushButton->setPalette(pal); |
502 |
m_ui.ChannelMutePushButton->setDown(bMute); |
m_ui.ChannelMutePushButton->setDown(bMute); |
503 |
bool bSolo = m_pChannel->channelSolo(); |
bool bSolo = m_pChannel->channelSolo(); |
504 |
pal.setColor(QPalette::Button, bSolo ? Qt::cyan : rgbButton); |
pal.setColor(QPalette::Button, bSolo ? Qt::cyan : rgbButton); |
505 |
|
pal.setColor(QPalette::ButtonText, bSolo ? Qt::darkCyan : rgbButtonText); |
506 |
m_ui.ChannelSoloPushButton->setPalette(pal); |
m_ui.ChannelSoloPushButton->setPalette(pal); |
507 |
m_ui.ChannelSoloPushButton->setDown(bSolo); |
m_ui.ChannelSoloPushButton->setDown(bSolo); |
508 |
#else |
#else |