/[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 2646 by capela, Wed Jun 18 08:39:54 2014 UTC revision 3518 by capela, Sun Jun 30 16:58:30 2019 UTC
# Line 1  Line 1 
1  // qsamplerChannel.cpp  // qsamplerChannel.cpp
2  //  //
3  /****************************************************************************  /****************************************************************************
4     Copyright (C) 2004-2014, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2004-2019, rncbc aka Rui Nuno Capela. All rights reserved.
5     Copyright (C) 2007, 2008 Christian Schoenebeck     Copyright (C) 2007, 2008 Christian Schoenebeck
6    
7     This program is free software; you can redistribute it and/or     This program is free software; you can redistribute it and/or
# Line 32  Line 32 
32    
33  #ifdef CONFIG_LIBGIG  #ifdef CONFIG_LIBGIG
34  #include "gig.h"  #include "gig.h"
35  #ifdef CONFIG_LIBGIG_SF_H  #ifdef CONFIG_LIBGIG_SF2
36  #include "SF.h"  #include "SF.h"
37  #endif  #endif
38  #endif  #endif
# Line 237  bool Channel::setInstrument ( const QStr Line 237  bool Channel::setInstrument ( const QStr
237          m_sInstrumentFile = sInstrumentFile;          m_sInstrumentFile = sInstrumentFile;
238          m_iInstrumentNr = iInstrumentNr;          m_iInstrumentNr = iInstrumentNr;
239  #ifdef CONFIG_INSTRUMENT_NAME  #ifdef CONFIG_INSTRUMENT_NAME
240          m_sInstrumentName = QString::null;  // We'll get it, maybe later, on channel_info...          m_sInstrumentName.clear();  // We'll get it, maybe later, on channel_info...
241  #else  #else
242          m_sInstrumentName = getInstrumentName(sInstrumentFile, iInstrumentNr, true);          m_sInstrumentName = getInstrumentName(sInstrumentFile, iInstrumentNr, true);
243  #endif  #endif
# Line 632  bool Channel::updateChannelInfo (void) Line 632  bool Channel::updateChannelInfo (void)
632  #endif  #endif
633          // Some sanity checks.          // Some sanity checks.
634          if (m_sEngineName == "NONE" || m_sEngineName.isEmpty())          if (m_sEngineName == "NONE" || m_sEngineName.isEmpty())
635                  m_sEngineName = QString::null;                  m_sEngineName.clear();
636          if (m_sInstrumentFile == "NONE" || m_sInstrumentFile.isEmpty()) {          if (m_sInstrumentFile == "NONE" || m_sInstrumentFile.isEmpty()) {
637                  m_sInstrumentFile = QString::null;                  m_sInstrumentFile.clear();
638                  m_sInstrumentName = QString::null;                  m_sInstrumentName.clear();
639          }          }
640    
641          // Time for device info grabbing...          // Time for device info grabbing...
# Line 760  bool Channel::channelSetup ( QWidget *pP Line 760  bool Channel::channelSetup ( QWidget *pP
760    
761    
762  // Redirected messages output methods.  // Redirected messages output methods.
763  void Channel::appendMessages( const QString& s ) const  void Channel::appendMessages ( const QString& sText ) const
764  {  {
765          MainForm *pMainForm = MainForm::getInstance();          MainForm *pMainForm = MainForm::getInstance();
766          if (pMainForm)          if (pMainForm)
767                  pMainForm->appendMessages(channelName() + ' ' + s);                  pMainForm->appendMessages(channelName() + ' ' + sText);
768  }  }
769    
770  void Channel::appendMessagesColor( const QString& s,  void Channel::appendMessagesColor (
771          const QString& c ) const          const QString& sText, const QString& sColor ) const
772  {  {
773          MainForm *pMainForm = MainForm::getInstance();          MainForm *pMainForm = MainForm::getInstance();
774          if (pMainForm)          if (pMainForm)
775                  pMainForm->appendMessagesColor(channelName() + ' ' + s, c);                  pMainForm->appendMessagesColor(channelName() + ' ' + sText, sColor);
776  }  }
777    
778  void Channel::appendMessagesText( const QString& s ) const  void Channel::appendMessagesText ( const QString& sText ) const
779  {  {
780          MainForm *pMainForm = MainForm::getInstance();          MainForm *pMainForm = MainForm::getInstance();
781          if (pMainForm)          if (pMainForm)
782                  pMainForm->appendMessagesText(channelName() + ' ' + s);                  pMainForm->appendMessagesText(channelName() + ' ' + sText);
783  }  }
784    
785  void Channel::appendMessagesError( const QString& s ) const  void Channel::appendMessagesError ( const QString& sText ) const
786  {  {
787          MainForm *pMainForm = MainForm::getInstance();          MainForm *pMainForm = MainForm::getInstance();
788          if (pMainForm)          if (pMainForm)
789                  pMainForm->appendMessagesError(channelName() + "\n\n" + s);                  pMainForm->appendMessagesError(channelName() + "\n\n" + sText);
790  }  }
791    
792  void Channel::appendMessagesClient( const QString& s ) const  void Channel::appendMessagesClient ( const QString& sText ) const
793  {  {
794          MainForm *pMainForm = MainForm::getInstance();          MainForm *pMainForm = MainForm::getInstance();
795          if (pMainForm)          if (pMainForm)
796                  pMainForm->appendMessagesClient(channelName() + ' ' + s);                  pMainForm->appendMessagesClient(channelName() + ' ' + sText);
797  }  }
798    
799    
800  // Context menu event handler.  // Context menu event handler.
801  void Channel::contextMenuEvent( QContextMenuEvent *pEvent )  void Channel::contextMenuEvent ( QContextMenuEvent *pEvent )
802  {  {
803          MainForm *pMainForm = MainForm::getInstance();          MainForm *pMainForm = MainForm::getInstance();
804          if (pMainForm)          if (pMainForm)
# Line 1110  QWidget* ChannelRoutingDelegate::createE Line 1110  QWidget* ChannelRoutingDelegate::createE
1110          pComboBox->addItems(item.options);          pComboBox->addItems(item.options);
1111          pComboBox->setCurrentIndex(item.selection);          pComboBox->setCurrentIndex(item.selection);
1112          pComboBox->setEnabled(true);          pComboBox->setEnabled(true);
1113            pComboBox->setEditable(true);
1114          pComboBox->setGeometry(option.rect);          pComboBox->setGeometry(option.rect);
1115          return pComboBox;          return pComboBox;
1116  }  }

Legend:
Removed from v.2646  
changed lines
  Added in v.3518

  ViewVC Help
Powered by ViewVC