/[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 1668 by schoenebeck, Tue Feb 5 15:42:33 2008 UTC revision 1691 by schoenebeck, Thu Feb 14 22:31:26 2008 UTC
# Line 31  Line 31 
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    
# Line 92  ChannelStrip::ChannelStrip ( QWidget* pP Line 95  ChannelStrip::ChannelStrip ( QWidget* pP
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    
# Line 531  void ChannelStrip::volumeChanged ( int i Line 549  void ChannelStrip::volumeChanged ( int i
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 )
# Line 542  void ChannelStrip::contextMenuEvent( QCo Line 564  void ChannelStrip::contextMenuEvent( QCo
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)

Legend:
Removed from v.1668  
changed lines
  Added in v.1691

  ViewVC Help
Powered by ViewVC