summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2003-01-19 23:35:26 (UTC)
committer llornkcor <llornkcor>2003-01-19 23:35:26 (UTC)
commit02090d2e63ad8398c0a8a9f1fb895a9c6e42514b (patch) (side-by-side diff)
treead318ac407d4963e3de2444b46663d403fe8ceee
parent512e600c777643230a032e89f7446b4099f54a86 (diff)
downloadopie-02090d2e63ad8398c0a8a9f1fb895a9c6e42514b.zip
opie-02090d2e63ad8398c0a8a9f1fb895a9c6e42514b.tar.gz
opie-02090d2e63ad8398c0a8a9f1fb895a9c6e42514b.tar.bz2
add multiselection add to playlist
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp30
1 files changed, 22 insertions, 8 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
@@ -692,27 +692,41 @@ void PlayListWidget::addSelected() {
switch (tabWidget->currentPageIndex()) {
case 0: //playlist
return;
break;
case 1: { //audio
- filename=audioView->currentItem()->text(3);
- // d->selectedFiles->next();
+ QListViewItemIterator it( audioView );
+ for ( ; it.current(); ++it ) {
+ if ( it.current()->isSelected() ) {
+ filename = it.current()->text(3);
+ lnk.setName( QFileInfo(filename).baseName() ); //sets name
+ lnk.setFile( filename ); //sets file name
+ d->selectedFiles->addToSelection( lnk);
+ }
+ }
+ audioView->clearSelection();
+ // d->selectedFiles->next();
}
break;
case 2: { // video
- filename=videoView->currentItem()->text(3);
- // tabWidget->setCurrentPage(0);
-
+ QListViewItemIterator it( videoView );
+ for ( ; it.current(); ++it ) {
+ if ( it.current()->isSelected() ) {
+
+ filename = it.current()->text(3);
+ lnk.setName( QFileInfo(filename).baseName() ); //sets name
+ lnk.setFile( filename ); //sets file name
+ d->selectedFiles->addToSelection( lnk);
+ }
+ }
+ videoView->clearSelection();
}
break;
};
- lnk.setName( fullBaseName ( QFileInfo(filename))); //sets name
- lnk.setFile( filename ); //sets file name
- d->selectedFiles->addToSelection( lnk);
tabWidget->setCurrentPage(0);
writeCurrentM3u();
}
void PlayListWidget::removeSelected() {