author | llornkcor <llornkcor> | 2003-01-19 23:35:26 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-01-19 23:35:26 (UTC) |
commit | 02090d2e63ad8398c0a8a9f1fb895a9c6e42514b (patch) (unidiff) | |
tree | ad318ac407d4963e3de2444b46663d403fe8ceee | |
parent | 512e600c777643230a032e89f7446b4099f54a86 (diff) | |
download | opie-02090d2e63ad8398c0a8a9f1fb895a9c6e42514b.zip opie-02090d2e63ad8398c0a8a9f1fb895a9c6e42514b.tar.gz opie-02090d2e63ad8398c0a8a9f1fb895a9c6e42514b.tar.bz2 |
add multiselection add to playlist
-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp index 19c8056..3c5734e 100644 --- a/core/multimedia/opieplayer/playlistwidget.cpp +++ b/core/multimedia/opieplayer/playlistwidget.cpp | |||
@@ -695,21 +695,35 @@ void PlayListWidget::addSelected() { | |||
695 | return; | 695 | return; |
696 | break; | 696 | break; |
697 | case 1: { //audio | 697 | case 1: { //audio |
698 | filename=audioView->currentItem()->text(3); | 698 | QListViewItemIterator it( audioView ); |
699 | for ( ; it.current(); ++it ) { | ||
700 | if ( it.current()->isSelected() ) { | ||
701 | filename = it.current()->text(3); | ||
702 | lnk.setName( QFileInfo(filename).baseName() ); //sets name | ||
703 | lnk.setFile( filename ); //sets file name | ||
704 | d->selectedFiles->addToSelection( lnk); | ||
705 | } | ||
706 | } | ||
707 | audioView->clearSelection(); | ||
699 | // d->selectedFiles->next(); | 708 | // d->selectedFiles->next(); |
700 | } | 709 | } |
701 | break; | 710 | break; |
702 | 711 | ||
703 | case 2: { // video | 712 | case 2: { // video |
704 | filename=videoView->currentItem()->text(3); | 713 | QListViewItemIterator it( videoView ); |
705 | // tabWidget->setCurrentPage(0); | 714 | for ( ; it.current(); ++it ) { |
715 | if ( it.current()->isSelected() ) { | ||
706 | 716 | ||
717 | filename = it.current()->text(3); | ||
718 | lnk.setName( QFileInfo(filename).baseName() ); //sets name | ||
719 | lnk.setFile( filename ); //sets file name | ||
720 | d->selectedFiles->addToSelection( lnk); | ||
721 | } | ||
722 | } | ||
723 | videoView->clearSelection(); | ||
707 | } | 724 | } |
708 | break; | 725 | break; |
709 | }; | 726 | }; |
710 | lnk.setName( fullBaseName ( QFileInfo(filename))); //sets name | ||
711 | lnk.setFile( filename ); //sets file name | ||
712 | d->selectedFiles->addToSelection( lnk); | ||
713 | tabWidget->setCurrentPage(0); | 727 | tabWidget->setCurrentPage(0); |
714 | writeCurrentM3u(); | 728 | writeCurrentM3u(); |
715 | 729 | ||