Guest User

Untitled

a guest
May 24th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. void FooMainWindow::addFiles ()
  2. {
  3. qDebug() << "FooMainWindow::addFiles";
  4. QStringList files = QFileDialog::getOpenFileNames(this, tr("Select Music Files"), QDesktopServices::storageLocation(QDesktopServices::MusicLocation));
  5.  
  6. if (files.isEmpty())
  7. return;
  8.  
  9. //QList<QUrl> urls;
  10.  
  11. FooTrackList *tracklist = FooPlaylistManager::instance()->currentPlaylist();
  12. foreach (QString string, files)
  13. {
  14. FooTrack track(QUrl(string));
  15. tracklist->append(track);
  16. }
  17.  
  18. /*FooPlaylistWidget * wid = static_cast<FooPlaylistWidget *> (fooTabWidget->currentWidget());
  19. if (!wid)
  20. return;
  21.  
  22. wid->addFiles(-1, urls, false);*/
  23. }
Add Comment
Please, Sign In to add comment