2 |
// |
// |
3 |
// ui.h extension file, included from the uic-generated form implementation. |
// ui.h extension file, included from the uic-generated form implementation. |
4 |
/**************************************************************************** |
/**************************************************************************** |
5 |
Copyright (C) 2004, rncbc aka Rui Nuno Capela. All rights reserved. |
Copyright (C) 2004-2005, rncbc aka Rui Nuno Capela. All rights reserved. |
6 |
|
|
7 |
This program is free software; you can redistribute it and/or |
This program is free software; you can redistribute it and/or |
8 |
modify it under the terms of the GNU General Public License |
modify it under the terms of the GNU General Public License |
122 |
if (sInstrumentFile.isEmpty()) |
if (sInstrumentFile.isEmpty()) |
123 |
sInstrumentFile = tr("(No instrument)"); |
sInstrumentFile = tr("(No instrument)"); |
124 |
InstrumentFileComboBox->setCurrentText(sInstrumentFile); |
InstrumentFileComboBox->setCurrentText(sInstrumentFile); |
125 |
InstrumentNrSpinBox->setValue(pChannel->instrumentNr()); |
InstrumentNrComboBox->clear(); |
126 |
|
InstrumentNrComboBox->insertStringList(qsamplerChannel::getInstrumentList(sInstrumentFile)); |
127 |
|
InstrumentNrComboBox->setCurrentItem(pChannel->instrumentNr()); |
128 |
// MIDI input driver... |
// MIDI input driver... |
129 |
QString sMidiDriver = pChannel->midiDriver(); |
QString sMidiDriver = pChannel->midiDriver(); |
130 |
if (sMidiDriver.isEmpty() || bNew) |
if (sMidiDriver.isEmpty() || bNew) |
189 |
if (!m_pChannel->loadEngine(EngineNameComboBox->currentText())) |
if (!m_pChannel->loadEngine(EngineNameComboBox->currentText())) |
190 |
iErrors++; |
iErrors++; |
191 |
// Instrument file and index... |
// Instrument file and index... |
192 |
if (!m_pChannel->loadInstrument(InstrumentFileComboBox->currentText(), InstrumentNrSpinBox->value())) |
if (!m_pChannel->loadInstrument(InstrumentFileComboBox->currentText(), InstrumentNrComboBox->currentItem())) |
193 |
iErrors++; |
iErrors++; |
194 |
// Show error messages? |
// Show error messages? |
195 |
if (iErrors > 0) |
if (iErrors > 0) |
260 |
// Refresh the actual instrument name. |
// Refresh the actual instrument name. |
261 |
void qsamplerChannelForm::updateInstrumentName (void) |
void qsamplerChannelForm::updateInstrumentName (void) |
262 |
{ |
{ |
263 |
// FIXME: A better idea would be to use libgig |
qsamplerOptions *pOptions = m_pChannel->options(); |
264 |
// to retrieve the REAL instrument name. |
if (pOptions == NULL) |
265 |
InstrumentNameTextLabel->setText(QFileInfo(InstrumentFileComboBox->currentText()).fileName() |
return; |
266 |
+ " [" + QString::number(InstrumentNrSpinBox->value()) + "]"); |
|
267 |
|
// Finally this better idea would be to use libgig |
268 |
|
// to retrieve the REAL instrument names. |
269 |
|
InstrumentNrComboBox->clear(); |
270 |
|
InstrumentNrComboBox->insertStringList( |
271 |
|
qsamplerChannel::getInstrumentList(InstrumentFileComboBox->currentText()) |
272 |
|
); |
273 |
|
|
274 |
optionsChanged(); |
optionsChanged(); |
275 |
} |
} |