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

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

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

revision 1499 by capela, Tue Nov 20 16:48:04 2007 UTC revision 1505 by capela, Wed Nov 21 18:37:40 2007 UTC
# Line 44  static inline long lroundf ( float x ) Line 44  static inline long lroundf ( float x )
44  }  }
45  #endif  #endif
46    
47  InstrumentForm::InstrumentForm(QWidget* parent) : QDialog(parent) {  InstrumentForm::InstrumentForm ( QWidget* pParent )
48            : QDialog(pParent)
49    {
50      ui.setupUi(this);      ui.setupUi(this);
51    
52          // Initialize locals.          // Initialize locals.
# Line 96  InstrumentForm::InstrumentForm(QWidget* Line 98  InstrumentForm::InstrumentForm(QWidget*
98                  SLOT(reject()));                  SLOT(reject()));
99  }  }
100    
101  InstrumentForm::~InstrumentForm() {  
102    InstrumentForm::~InstrumentForm (void)
103    {
104  }  }
105    
106    
107  // Channel dialog setup formal initializer.  // Channel dialog setup formal initializer.
108  void InstrumentForm::setup ( qsamplerInstrument *pInstrument )  void InstrumentForm::setup ( qsamplerInstrument *pInstrument )
109  {  {
# Line 189  void InstrumentForm::setup ( qsamplerIns Line 194  void InstrumentForm::setup ( qsamplerIns
194                          Qt::MatchExactly | Qt::MatchCaseSensitive) < 0) {                          Qt::MatchExactly | Qt::MatchCaseSensitive) < 0) {
195                  ui.EngineNameComboBox->addItem(sEngineName);                  ui.EngineNameComboBox->addItem(sEngineName);
196          }          }
197          ui.EngineNameComboBox->setItemText(          ui.EngineNameComboBox->setCurrentIndex(
198                  ui.EngineNameComboBox->currentIndex(),                  ui.EngineNameComboBox->findText(sEngineName,
199                  sEngineName);                          Qt::MatchExactly | Qt::MatchCaseSensitive));
200    
201          // Instrument filename and index...          // Instrument filename and index...
202          QString sInstrumentFile = m_pInstrument->instrumentFile();          QString sInstrumentFile = m_pInstrument->instrumentFile();
203          if (sInstrumentFile.isEmpty())          if (sInstrumentFile.isEmpty())
204                  sInstrumentFile = qsamplerChannel::noInstrumentName();                  sInstrumentFile = qsamplerChannel::noInstrumentName();
205          ui.InstrumentFileComboBox->setItemText(          ui.InstrumentFileComboBox->setEditText(sInstrumentFile);
                 ui.InstrumentFileComboBox->currentIndex(),  
                 sInstrumentFile);  
206          ui.InstrumentNrComboBox->clear();          ui.InstrumentNrComboBox->clear();
207          ui.InstrumentNrComboBox->insertItems(0,          ui.InstrumentNrComboBox->insertItems(0,
208                  qsamplerChannel::getInstrumentList(sInstrumentFile,                  qsamplerChannel::getInstrumentList(sInstrumentFile,
# Line 258  void InstrumentForm::openInstrumentFile Line 262  void InstrumentForm::openInstrumentFile
262          if (sInstrumentFile.isEmpty())          if (sInstrumentFile.isEmpty())
263                  return;                  return;
264    
265          ui.InstrumentFileComboBox->setItemText(          ui.InstrumentFileComboBox->setEditText(sInstrumentFile);
                 ui.InstrumentFileComboBox->currentIndex(),  
                 sInstrumentFile);  
   
266          updateInstrumentName();          updateInstrumentName();
267  }  }
268    

Legend:
Removed from v.1499  
changed lines
  Added in v.1505

  ViewVC Help
Powered by ViewVC