258 |
|
|
259 |
// FIXME: the instrument file filters should be restricted, |
// FIXME: the instrument file filters should be restricted, |
260 |
// depending on the current engine. |
// depending on the current engine. |
261 |
|
const QString& sEngineName = m_ui.EngineNameComboBox->currentText().toUpper(); |
262 |
|
QStringList filters; |
263 |
|
if (sEngineName.contains("GIG")) |
264 |
|
filters << tr("GIG Instrument files") + " (*.gig *.dls)"; |
265 |
|
if (sEngineName.contains("SFZ")) |
266 |
|
filters << tr("SFZ Instrument files") + " (*.sfz)"; |
267 |
|
if (sEngineName.contains("SF2")) |
268 |
|
filters << tr("SF2 Instrument files") + " (*.sf2)"; |
269 |
|
const QString& filter = filters.join(";;"); |
270 |
|
|
271 |
QString sInstrumentFile = QFileDialog::getOpenFileName(this, |
QString sInstrumentFile = QFileDialog::getOpenFileName(this, |
272 |
QSAMPLER_TITLE ": " + tr("Instrument files"), // Caption. |
QSAMPLER_TITLE ": " + tr("Instrument files"), // Caption. |
273 |
pOptions->sInstrumentDir, // Start here. |
pOptions->sInstrumentDir, // Start here. |
274 |
tr("Instrument files") + " (*.gig *.dls)" // Filter (GIG and DLS files) |
filter // File filter. |
275 |
); |
); |
276 |
|
|
277 |
if (sInstrumentFile.isEmpty()) |
if (sInstrumentFile.isEmpty()) |