void ZerberusGui::moveSoundfontInTheList(int currentIdx, int targetIdx) { QStringList sfonts = zerberus()->soundFonts(); sfonts.swap(currentIdx, targetIdx); zerberus()->removeSoundFonts(zerberus()->soundFonts()); loadSoundFontsAsync(sfonts); files->setCurrentRow(targetIdx); emit sfChanged(); }
void ZerberusGui::soundFontUpClicked() { int row = files->currentRow(); if (row <= 0) return; QStringList sfonts = zerberus()->soundFonts(); sfonts.swap(row, row-1); zerberus()->removeSoundFonts(zerberus()->soundFonts()); loadSoundFontsAsync(sfonts); files->setCurrentRow(row-1); emit sfChanged(); }
void ZerberusGui::loadSoundFontsAsync(QStringList sfonts) { QFuture<bool> future = QtConcurrent::run(zerberus(), &Zerberus::loadSoundFonts, sfonts); _futureWatcher.setFuture(future); _progressTimer->start(1000); _progressDialog->exec(); synthesizerChanged(); }