251 |
void ChannelStrip::setDisplayEffect ( bool bDisplayEffect ) |
void ChannelStrip::setDisplayEffect ( bool bDisplayEffect ) |
252 |
{ |
{ |
253 |
QPalette pal; |
QPalette pal; |
254 |
pal.setColor(QPalette::Foreground, Qt::yellow); |
pal.setColor(QPalette::WindowText, Qt::yellow); |
255 |
pal.setColor(QPalette::ButtonText, Qt::yellow); |
pal.setColor(QPalette::ButtonText, Qt::yellow); |
256 |
m_ui.EngineNameTextLabel->setPalette(pal); |
m_ui.EngineNameTextLabel->setPalette(pal); |
257 |
m_ui.MidiPortChannelTextLabel->setPalette(pal); |
m_ui.MidiPortChannelTextLabel->setPalette(pal); |
258 |
pal.setColor(QPalette::Foreground, Qt::green); |
pal.setColor(QPalette::WindowText, Qt::green); |
259 |
pal.setColor(QPalette::ButtonText, Qt::green); |
pal.setColor(QPalette::ButtonText, Qt::green); |
260 |
if (bDisplayEffect) { |
if (bDisplayEffect) { |
261 |
QPixmap pm(":/images/displaybg1.png"); |
QPixmap pm(":/images/displaybg1.png"); |
262 |
pal.setBrush(QPalette::Background, QBrush(pm)); |
pal.setBrush(QPalette::Window, QBrush(pm)); |
263 |
} else { |
} else { |
264 |
pal.setColor(QPalette::Background, Qt::black); |
pal.setColor(QPalette::Window, Qt::black); |
265 |
} |
} |
266 |
m_ui.ChannelInfoFrame->setPalette(pal); |
m_ui.ChannelInfoFrame->setPalette(pal); |
267 |
m_ui.InstrumentNamePushButton->setPalette(pal); |
m_ui.InstrumentNamePushButton->setPalette(pal); |
525 |
|
|
526 |
// Common palette... |
// Common palette... |
527 |
QPalette pal; |
QPalette pal; |
528 |
const QColor& rgbFore = pal.color(QPalette::Foreground); |
const QColor& rgbFore = pal.color(QPalette::WindowText); |
529 |
|
|
530 |
// Instrument status... |
// Instrument status... |
531 |
const int iInstrumentStatus = m_pChannel->instrumentStatus(); |
const int iInstrumentStatus = m_pChannel->instrumentStatus(); |
532 |
if (iInstrumentStatus < 0) { |
if (iInstrumentStatus < 0) { |
533 |
pal.setColor(QPalette::Foreground, Qt::red); |
pal.setColor(QPalette::WindowText, Qt::red); |
534 |
m_ui.InstrumentStatusTextLabel->setPalette(pal); |
m_ui.InstrumentStatusTextLabel->setPalette(pal); |
535 |
m_ui.InstrumentStatusTextLabel->setText( |
m_ui.InstrumentStatusTextLabel->setText( |
536 |
tr("ERR%1").arg(iInstrumentStatus)); |
tr("ERR%1").arg(iInstrumentStatus)); |
539 |
} |
} |
540 |
|
|
541 |
// All seems normal... |
// All seems normal... |
542 |
pal.setColor(QPalette::Foreground, |
pal.setColor(QPalette::WindowText, |
543 |
iInstrumentStatus < 100 ? Qt::yellow : Qt::green); |
iInstrumentStatus < 100 ? Qt::yellow : Qt::green); |
544 |
m_ui.InstrumentStatusTextLabel->setPalette(pal); |
m_ui.InstrumentStatusTextLabel->setPalette(pal); |
545 |
m_ui.InstrumentStatusTextLabel->setText( |
m_ui.InstrumentStatusTextLabel->setText( |
551 |
const bool bMute = m_pChannel->channelMute(); |
const bool bMute = m_pChannel->channelMute(); |
552 |
const QColor& rgbButton = pal.color(QPalette::Button); |
const QColor& rgbButton = pal.color(QPalette::Button); |
553 |
const QColor& rgbButtonText = pal.color(QPalette::ButtonText); |
const QColor& rgbButtonText = pal.color(QPalette::ButtonText); |
554 |
pal.setColor(QPalette::Foreground, rgbFore); |
pal.setColor(QPalette::WindowText, rgbFore); |
555 |
pal.setColor(QPalette::Button, bMute ? Qt::yellow : rgbButton); |
pal.setColor(QPalette::Button, bMute ? Qt::yellow : rgbButton); |
556 |
pal.setColor(QPalette::ButtonText, bMute ? Qt::darkYellow : rgbButtonText); |
pal.setColor(QPalette::ButtonText, bMute ? Qt::darkYellow : rgbButtonText); |
557 |
m_ui.ChannelMutePushButton->setPalette(pal); |
m_ui.ChannelMutePushButton->setPalette(pal); |
679 |
QPalette pal; |
QPalette pal; |
680 |
if (bSelected) { |
if (bSelected) { |
681 |
const QColor& color = pal.midlight().color(); |
const QColor& color = pal.midlight().color(); |
682 |
pal.setColor(QPalette::Background, color.darker(150)); |
pal.setColor(QPalette::Window, color.darker(150)); |
683 |
pal.setColor(QPalette::Foreground, color.lighter(150)); |
pal.setColor(QPalette::WindowText, color.lighter(150)); |
684 |
} |
} |
685 |
|
|
686 |
QWidget *pParentWidget = QWidget::parentWidget(); |
QWidget *pParentWidget = QWidget::parentWidget(); |