/[svn]/qsampler/trunk/src/qsamplerChannelStrip.cpp
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerChannelStrip.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2036 by capela, Wed Jan 6 09:52:32 2010 UTC revision 2108 by capela, Thu Jul 15 08:03:32 2010 UTC
# Line 29  Line 29 
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    
# Line 75  ChannelStrip::ChannelStrip ( QWidget* pP Line 76  ChannelStrip::ChannelStrip ( QWidget* pP
76          m_iErrorCount  = 0;          m_iErrorCount  = 0;
77    
78          if (++g_iMidiActivityRefCount == 1) {          if (++g_iMidiActivityRefCount == 1) {
79                  g_pMidiActivityLedOn  = new QPixmap(":/icons/ledon1.png");                  g_pMidiActivityLedOn  = new QPixmap(":/images/ledon1.png");
80                  g_pMidiActivityLedOff = new QPixmap(":/icons/ledoff1.png");                  g_pMidiActivityLedOff = new QPixmap(":/images/ledoff1.png");
81          }          }
82    
83          m_ui.MidiActivityLabel->setPixmap(*g_pMidiActivityLedOff);          m_ui.MidiActivityLabel->setPixmap(*g_pMidiActivityLedOff);
# Line 157  void ChannelStrip::dragEnterEvent ( QDra Line 158  void ChannelStrip::dragEnterEvent ( QDra
158                          while (iter.hasNext()) {                          while (iter.hasNext()) {
159                                  const QString& sFilename = iter.next().toLocalFile();                                  const QString& sFilename = iter.next().toLocalFile();
160                                  if (!sFilename.isEmpty()) {                                  if (!sFilename.isEmpty()) {
161                                          bAccept = Channel::isInstrumentFile(sFilename);                                  //      bAccept = Channel::isDlsInstrumentFile(sFilename);
162                                            bAccept = QFileInfo(sFilename).exists();
163                                          break;                                          break;
164                                  }                                  }
165                          }                          }
# Line 248  void ChannelStrip::setDisplayEffect ( bo Line 250  void ChannelStrip::setDisplayEffect ( bo
250          m_ui.MidiPortChannelTextLabel->setPalette(pal);          m_ui.MidiPortChannelTextLabel->setPalette(pal);
251          pal.setColor(QPalette::Foreground, Qt::green);          pal.setColor(QPalette::Foreground, Qt::green);
252          if (bDisplayEffect) {          if (bDisplayEffect) {
253                  QPixmap pm(":/icons/displaybg1.png");                  QPixmap pm(":/images/displaybg1.png");
254                  pal.setBrush(QPalette::Background, QBrush(pm));                  pal.setBrush(QPalette::Background, QBrush(pm));
255          } else {          } else {
256                  pal.setColor(QPalette::Background, Qt::black);                  pal.setColor(QPalette::Background, Qt::black);
# Line 489  bool ChannelStrip::updateChannelInfo (vo Line 491  bool ChannelStrip::updateChannelInfo (vo
491          // Mute/Solo button state coloring...          // Mute/Solo button state coloring...
492          bool bMute = m_pChannel->channelMute();          bool bMute = m_pChannel->channelMute();
493          const QColor& rgbButton = pal.color(QPalette::Button);          const QColor& rgbButton = pal.color(QPalette::Button);
494            const QColor& rgbButtonText = pal.color(QPalette::ButtonText);
495          pal.setColor(QPalette::Foreground, rgbFore);          pal.setColor(QPalette::Foreground, rgbFore);
496          pal.setColor(QPalette::Button, bMute ? Qt::yellow : rgbButton);          pal.setColor(QPalette::Button, bMute ? Qt::yellow : rgbButton);
497            pal.setColor(QPalette::ButtonText, bMute ? Qt::darkYellow : rgbButtonText);
498          m_ui.ChannelMutePushButton->setPalette(pal);          m_ui.ChannelMutePushButton->setPalette(pal);
499          m_ui.ChannelMutePushButton->setDown(bMute);          m_ui.ChannelMutePushButton->setDown(bMute);
500          bool bSolo = m_pChannel->channelSolo();          bool bSolo = m_pChannel->channelSolo();
501          pal.setColor(QPalette::Button, bSolo ? Qt::cyan : rgbButton);            pal.setColor(QPalette::Button, bSolo ? Qt::cyan : rgbButton);  
502            pal.setColor(QPalette::ButtonText, bSolo ? Qt::darkCyan : rgbButtonText);
503          m_ui.ChannelSoloPushButton->setPalette(pal);          m_ui.ChannelSoloPushButton->setPalette(pal);
504          m_ui.ChannelSoloPushButton->setDown(bSolo);          m_ui.ChannelSoloPushButton->setDown(bSolo);
505  #else  #else
# Line 581  void ChannelStrip::contextMenuEvent( QCo Line 586  void ChannelStrip::contextMenuEvent( QCo
586  void ChannelStrip::midiActivityLedOn (void)  void ChannelStrip::midiActivityLedOn (void)
587  {  {
588          m_ui.MidiActivityLabel->setPixmap(*g_pMidiActivityLedOn);          m_ui.MidiActivityLabel->setPixmap(*g_pMidiActivityLedOn);
589          m_pMidiActivityTimer->start(50);          m_pMidiActivityTimer->start(100);
590  }  }
591    
592    

Legend:
Removed from v.2036  
changed lines
  Added in v.2108

  ViewVC Help
Powered by ViewVC