Exemplo n.º 1
0
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();
      }
Exemplo n.º 2
0
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();
      }
Exemplo n.º 3
0
void ZerberusGui::loadSoundFontsAsync(QStringList sfonts)
      {
      QFuture<bool> future = QtConcurrent::run(zerberus(), &Zerberus::loadSoundFonts, sfonts);
      _futureWatcher.setFuture(future);
      _progressTimer->start(1000);
      _progressDialog->exec();

      synthesizerChanged();
      }