/[svn]/qsampler/trunk/src/qsamplerChannelStrip.ui.h
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerChannelStrip.ui.h

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

revision 409 by capela, Thu Feb 24 12:10:54 2005 UTC revision 751 by capela, Fri Aug 19 17:10:16 2005 UTC
# Line 117  void qsamplerChannelStrip::setup ( qsamp Line 117  void qsamplerChannelStrip::setup ( qsamp
117    
118      // Set the new one...      // Set the new one...
119      m_pChannel = pChannel;      m_pChannel = pChannel;
120        
121      // Stabilize this around.      // Stabilize this around.
122      updateChannelInfo();      updateChannelInfo();
123    
# Line 171  void qsamplerChannelStrip::setDisplayBac Line 171  void qsamplerChannelStrip::setDisplayBac
171              pLabel->setPaletteBackgroundPixmap(pm);              pLabel->setPaletteBackgroundPixmap(pm);
172          delete pList;          delete pList;
173      }      }
174        
175      // And this standalone too.      // And this standalone too.
176      StreamVoiceCountTextLabel->setPaletteBackgroundPixmap(pm);      StreamVoiceCountTextLabel->setPaletteBackgroundPixmap(pm);
177  }  }
# Line 195  bool qsamplerChannelStrip::channelSetup Line 195  bool qsamplerChannelStrip::channelSetup
195                                    
196          // Invoke the channel setup dialog.          // Invoke the channel setup dialog.
197          bool bResult = m_pChannel->channelSetup(this);          bool bResult = m_pChannel->channelSetup(this);
198          // Notify that thie channel has changed.          // Notify that this channel has changed.
199            if (bResult)
200                    emit channelChanged(this);
201    
202            return bResult;
203    }
204    
205    
206    // Channel mute slot.
207    bool qsamplerChannelStrip::channelMute ( bool bMute )
208    {
209            if (m_pChannel == NULL)
210                    return false;
211    
212            // Invoke the channel mute method.
213            bool bResult = m_pChannel->setChannelMute(bMute);
214            // Notify that this channel has changed.
215            if (bResult)
216                    emit channelChanged(this);
217    
218            return bResult;
219    }
220    
221    
222    // Channel solo slot.
223    bool qsamplerChannelStrip::channelSolo ( bool bSolo )
224    {
225            if (m_pChannel == NULL)
226                    return false;
227    
228            // Invoke the channel solo method.
229            bool bResult = m_pChannel->setChannelSolo(bSolo);
230            // Notify that this channel has changed.
231          if (bResult)          if (bResult)
232                  emit channelChanged(this);                  emit channelChanged(this);
233    
# Line 211  bool qsamplerChannelStrip::channelReset Line 243  bool qsamplerChannelStrip::channelReset
243    
244          // Invoke the channel reset method.          // Invoke the channel reset method.
245          bool bResult = m_pChannel->channelReset();          bool bResult = m_pChannel->channelReset();
246          // Notify that thie channel has changed.          // Notify that this channel has changed.
247          if (bResult)          if (bResult)
248                  emit channelChanged(this);                  emit channelChanged(this);
249    
# Line 225  bool qsamplerChannelStrip::updateInstrum Line 257  bool qsamplerChannelStrip::updateInstrum
257          if (m_pChannel == NULL)          if (m_pChannel == NULL)
258                  return false;                  return false;
259    
260          // Do we refersh the actual name?          // Do we refresh the actual name?
261          if (bForce)          if (bForce)
262                  m_pChannel->updateInstrumentName();                  m_pChannel->updateInstrumentName();
263    
264          // Instrument name...          // Instrument name...
265          if (m_pChannel->instrumentName().isEmpty())          if (m_pChannel->instrumentName().isEmpty()) {
266                  InstrumentNameTextLabel->setText(' ' + qsamplerChannel::noInstrumentName());                  if (m_pChannel->instrumentStatus() >= 0)
267          else                          InstrumentNameTextLabel->setText(' ' + qsamplerChannel::loadingInstrument());
268                    else
269                            InstrumentNameTextLabel->setText(' ' + qsamplerChannel::noInstrumentName());
270            } else
271                  InstrumentNameTextLabel->setText(' ' + m_pChannel->instrumentName());                  InstrumentNameTextLabel->setText(' ' + m_pChannel->instrumentName());
272    
273          return true;              return true;    
# Line 278  bool qsamplerChannelStrip::updateChannel Line 313  bool qsamplerChannelStrip::updateChannel
313  {  {
314      if (m_pChannel == NULL)      if (m_pChannel == NULL)
315          return false;          return false;
316            
317          // Check for error limit/recycle...          // Check for error limit/recycle...
318          if (m_iErrorCount > QSAMPLER_ERROR_LIMIT)          if (m_iErrorCount > QSAMPLER_ERROR_LIMIT)
319                  return true;                  return true;
# Line 323  bool qsamplerChannelStrip::updateChannel Line 358  bool qsamplerChannelStrip::updateChannel
358      InstrumentStatusTextLabel->setText(QString::number(iInstrumentStatus) + '%');      InstrumentStatusTextLabel->setText(QString::number(iInstrumentStatus) + '%');
359      m_iErrorCount = 0;      m_iErrorCount = 0;
360    
361    #ifdef CONFIG_MUTE_SOLO
362        // Mute/Solo button state coloring...
363        const QColor& rgbNormal = ChannelSetupPushButton->paletteBackgroundColor();
364        bool bMute = m_pChannel->channelMute();
365        ChannelMutePushButton->setPaletteBackgroundColor(bMute ? Qt::red : rgbNormal);
366        ChannelMutePushButton->setDown(bMute);
367        bool bSolo = m_pChannel->channelSolo();
368        ChannelSoloPushButton->setPaletteBackgroundColor(bSolo ? Qt::yellow : rgbNormal);
369        ChannelSoloPushButton->setDown(bSolo);
370    #else
371            ChannelMutePushButton->setEnabled(false);
372            ChannelSoloPushButton->setEnabled(false);
373    #endif
374    
375      // And update the both GUI volume elements;      // And update the both GUI volume elements;
376      // return success if, and only if, intrument is fully loaded...      // return success if, and only if, intrument is fully loaded...
377      return updateChannelVolume() && (iInstrumentStatus == 100);      return updateChannelVolume() && (iInstrumentStatus == 100);
# Line 340  bool qsamplerChannelStrip::updateChannel Line 389  bool qsamplerChannelStrip::updateChannel
389          // This only makes sense on fully loaded channels...          // This only makes sense on fully loaded channels...
390          if (m_pChannel->instrumentStatus() < 100)          if (m_pChannel->instrumentStatus() < 100)
391              return false;              return false;
392                
393      // Get current channel voice count.      // Get current channel voice count.
394      int iVoiceCount  = ::lscp_get_channel_voice_count(m_pChannel->client(), m_pChannel->channelID());      int iVoiceCount  = ::lscp_get_channel_voice_count(m_pChannel->client(), m_pChannel->channelID());
395      // Get current stream count.      // Get current stream count.
# Line 353  bool qsamplerChannelStrip::updateChannel Line 402  bool qsamplerChannelStrip::updateChannel
402      // Update the GUI elements...      // Update the GUI elements...
403      StreamUsageProgressBar->setProgress(iStreamUsage);      StreamUsageProgressBar->setProgress(iStreamUsage);
404      StreamVoiceCountTextLabel->setText(QString("%1 / %2").arg(iStreamCount).arg(iVoiceCount));      StreamVoiceCountTextLabel->setText(QString("%1 / %2").arg(iStreamCount).arg(iVoiceCount));
405        
406      // We're clean.      // We're clean.
407      return true;      return true;
408  }  }
# Line 387  void qsamplerChannelStrip::contextMenuEv Line 436  void qsamplerChannelStrip::contextMenuEv
436  {  {
437      if (m_pChannel == NULL)      if (m_pChannel == NULL)
438          return;          return;
439            
440      // We'll just show up the main form's edit menu (thru qsamplerChannel).      // We'll just show up the main form's edit menu (thru qsamplerChannel).
441      m_pChannel->contextMenuEvent(pEvent);      m_pChannel->contextMenuEvent(pEvent);
442  }  }
443    
444    
445    // Error count hackish accessors.
446    void qsamplerChannelStrip::resetErrorCount (void)
447    {
448            m_iErrorCount = 0;
449    }
450    
451    
452  // end of qsamplerChannelStrip.ui.h  // end of qsamplerChannelStrip.ui.h

Legend:
Removed from v.409  
changed lines
  Added in v.751

  ViewVC Help
Powered by ViewVC