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

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

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

revision 300 by capela, Wed Nov 17 15:55:02 2004 UTC revision 306 by capela, Fri Nov 19 16:54:53 2004 UTC
# Line 22  Line 22 
22  #include "qsamplerChannel.h"  #include "qsamplerChannel.h"
23    
24  #include "qsamplerMainForm.h"  #include "qsamplerMainForm.h"
25    #include "qsamplerChannelForm.h"
26    
27  #include "config.h"  #include "config.h"
28    
# Line 402  bool qsamplerChannel::resetChannel (void Line 403  bool qsamplerChannel::resetChannel (void
403  }  }
404    
405    
406    // Channel setup dialog form.
407    bool qsamplerChannel::channelSetup ( QWidget *pParent )
408    {
409        bool bResult = false;
410    
411        qsamplerChannelForm *pChannelForm = new qsamplerChannelForm(pParent);
412        if (pChannelForm) {
413            pChannelForm->setup(this);
414            bResult = pChannelForm->exec();
415            delete pChannelForm;
416        }
417    
418        return bResult;
419    }
420    
421    
422  // Redirected messages output methods.  // Redirected messages output methods.
423  void qsamplerChannel::appendMessages( const QString& s )  void qsamplerChannel::appendMessages( const QString& s )
424  {  {
425      m_pMainForm->appendMessages(s);      if (m_pMainForm) m_pMainForm->appendMessages(s);
426  }  }
427    
428  void qsamplerChannel::appendMessagesColor( const QString& s, const QString& c )  void qsamplerChannel::appendMessagesColor( const QString& s, const QString& c )
429  {  {
430      m_pMainForm->appendMessagesColor(s, c);      if (m_pMainForm) m_pMainForm->appendMessagesColor(s, c);
431  }  }
432    
433  void qsamplerChannel::appendMessagesText( const QString& s )  void qsamplerChannel::appendMessagesText( const QString& s )
434  {  {
435      m_pMainForm->appendMessagesText(s);      if (m_pMainForm) m_pMainForm->appendMessagesText(s);
436  }  }
437    
438  void qsamplerChannel::appendMessagesError( const QString& s )  void qsamplerChannel::appendMessagesError( const QString& s )
439  {  {
440      m_pMainForm->appendMessagesError(s);      if (m_pMainForm) m_pMainForm->appendMessagesError(s);
441  }  }
442    
443  void qsamplerChannel::appendMessagesClient( const QString& s )  void qsamplerChannel::appendMessagesClient( const QString& s )
444  {  {
445      m_pMainForm->appendMessagesClient(s);      if (m_pMainForm) m_pMainForm->appendMessagesClient(s);
446    }
447    
448    
449    // Context menu event handler.
450    void qsamplerChannel::contextMenuEvent( QContextMenuEvent *pEvent )
451    {
452        if (m_pMainForm) m_pMainForm->contextMenuEvent(pEvent);
453  }  }
454    
455    
# Line 442  QStringList qsamplerChannel::getInstrume Line 466  QStringList qsamplerChannel::getInstrume
466          gig::File  *pGig  = new gig::File(pRiff);          gig::File  *pGig  = new gig::File(pRiff);
467          gig::Instrument *pInstrument = pGig->GetFirstInstrument();          gig::Instrument *pInstrument = pGig->GetFirstInstrument();
468          while (pInstrument) {          while (pInstrument) {
469              sInstrumentName = (pInstrument->pInfo)->Name;              instlist.append((pInstrument->pInfo)->Name.c_str());
             instlist.append(sInstrumentName);  
470              pInstrument = pGig->GetNextInstrument();              pInstrument = pGig->GetNextInstrument();
471          }          }
472          delete pGig;          delete pGig;
# Line 454  QStringList qsamplerChannel::getInstrume Line 477  QStringList qsamplerChannel::getInstrume
477  #endif  #endif
478      }      }
479      else instlist.append(sInstrumentName);      else instlist.append(sInstrumentName);
480        
481      return instlist;      return instlist;
482  }  }
483    
# Line 473  QString qsamplerChannel::getInstrumentNa Line 496  QString qsamplerChannel::getInstrumentNa
496          gig::Instrument *pInstrument = pGig->GetFirstInstrument();          gig::Instrument *pInstrument = pGig->GetFirstInstrument();
497          while (pInstrument) {          while (pInstrument) {
498              if (iIndex == iInstrumentNr) {              if (iIndex == iInstrumentNr) {
499                  sInstrumentName = (pInstrument->pInfo)->Name;                  sInstrumentName = (pInstrument->pInfo)->Name.c_str();
500                  break;                  break;
501              }              }
502              iIndex++;              iIndex++;

Legend:
Removed from v.300  
changed lines
  Added in v.306

  ViewVC Help
Powered by ViewVC