void FluidGui::soundFontDeleteClicked() { int row = soundFonts->currentRow(); if (row >= 0) { QString s(soundFonts->item(row)->text()); fluid()->removeSoundFont(s); delete soundFonts->takeItem(row); } updateUpDownButtons(); }
void FluidGui::soundFontAddClicked() { QFileInfoList l = FluidS::Fluid::sfFiles(); SfListDialog ld; foreach (const QFileInfo& fi, l) ld.add(fi.fileName(), fi.absoluteFilePath()); if (!ld.exec()) return; QString sfName = ld.name(); QString sfPath = ld.path(); int n = soundFonts->count(); QStringList sl; for (int i = 0; i < n; ++i) { QListWidgetItem* item = soundFonts->item(i); sl.append(item->text()); } if (sl.contains(sfPath)) { QMessageBox::warning(this, tr("MuseScore"), QString(tr("Soundfont %1 already loaded")).arg(sfPath)); } else { bool loaded = fluid()->addSoundFont(sfPath); if (!loaded) { QMessageBox::warning(this, tr("MuseScore"), QString(tr("cannot load soundfont %1")).arg(sfPath)); } else { soundFonts->insertItem(0, sfName); emit sfChanged(); emit valueChanged(); } } updateUpDownButtons(); }
void SpatialDomainWidget::setActiveClass(const QString& ClassName) { m_ActiveClass = ClassName; if (m_ActiveClass.isEmpty()) {// ui->GlobalMapView->fitViewToItems(); ui->StructureTabWidget->setVisible(false); ui->DataTabWidget->setVisible(false); } else { ui->StructureTabWidget->setVisible(true); ui->DataTabWidget->setVisible(true); ui->AddUnitButton->setText(tr("Add unit in %1 class").arg(ClassName)); } refreshClassStructure(); refreshClassData(); updateUpDownButtons(); mp_MapScene->setActiveLayer(ClassName); }