author | llornkcor <llornkcor> | 2002-03-20 02:07:17 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-03-20 02:07:17 (UTC) |
commit | ea1f3581a3452f735bb0cf5703b9bf1b20316b71 (patch) (unidiff) | |
tree | ad31a417eee542534b42ed229d70cae834414e9d | |
parent | 25653ee75580cdd24a16e82abe7271c9402429c7 (diff) | |
download | opie-ea1f3581a3452f735bb0cf5703b9bf1b20316b71.zip opie-ea1f3581a3452f735bb0cf5703b9bf1b20316b71.tar.gz opie-ea1f3581a3452f735bb0cf5703b9bf1b20316b71.tar.bz2 |
added slight workaround for audio/video playig continuing in playlist
-rw-r--r-- | core/multimedia/opieplayer/playlistselection.cpp | 6 | ||||
-rw-r--r-- | core/multimedia/opieplayer/playlistselection.h | 1 | ||||
-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 8 |
3 files changed, 11 insertions, 4 deletions
diff --git a/core/multimedia/opieplayer/playlistselection.cpp b/core/multimedia/opieplayer/playlistselection.cpp index 756e3b4..6259b3f 100644 --- a/core/multimedia/opieplayer/playlistselection.cpp +++ b/core/multimedia/opieplayer/playlistselection.cpp | |||
@@ -144,9 +144,8 @@ bool PlayListSelection::prev() { | |||
144 | ensureItemVisible( selectedItem() ); | 144 | ensureItemVisible( selectedItem() ); |
145 | return TRUE; | 145 | return TRUE; |
146 | } | 146 | } |
147 | 147 | ||
148 | |||
149 | bool PlayListSelection::next() { | 148 | bool PlayListSelection::next() { |
150 | QListViewItem *item = selectedItem(); | 149 | QListViewItem *item = selectedItem(); |
151 | if ( item && item->itemBelow() ) | 150 | if ( item && item->itemBelow() ) |
152 | setSelected( item->itemBelow(), TRUE ); | 151 | setSelected( item->itemBelow(), TRUE ); |
@@ -180,4 +179,9 @@ bool PlayListSelection::last() { | |||
180 | ensureItemVisible( selectedItem() ); | 179 | ensureItemVisible( selectedItem() ); |
181 | return TRUE; | 180 | return TRUE; |
182 | } | 181 | } |
183 | 182 | ||
183 | void PlayListSelection::unSelect() | ||
184 | { | ||
185 | QListViewItem *item = selectedItem(); | ||
186 | setSelected( currentItem(), FALSE); | ||
187 | } \ No newline at end of file | ||
diff --git a/core/multimedia/opieplayer/playlistselection.h b/core/multimedia/opieplayer/playlistselection.h index b0d249c..ba37271 100644 --- a/core/multimedia/opieplayer/playlistselection.h +++ b/core/multimedia/opieplayer/playlistselection.h | |||
@@ -36,8 +36,9 @@ public slots: | |||
36 | void addToSelection( const DocLnk & ); // Add a media file to the playlist | 36 | void addToSelection( const DocLnk & ); // Add a media file to the playlist |
37 | void removeSelected(); // Remove a media file from the playlist | 37 | void removeSelected(); // Remove a media file from the playlist |
38 | void moveSelectedUp(); // Move the media file up the playlist so it is played earlier | 38 | void moveSelectedUp(); // Move the media file up the playlist so it is played earlier |
39 | void moveSelectedDown(); // Move the media file down the playlist so it is played later | 39 | void moveSelectedDown(); // Move the media file down the playlist so it is played later |
40 | void unSelect(); | ||
40 | bool prev(); | 41 | bool prev(); |
41 | bool next(); | 42 | bool next(); |
42 | bool first(); | 43 | bool first(); |
43 | bool last(); | 44 | bool last(); |
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp index cf665c8..db6533a 100644 --- a/core/multimedia/opieplayer/playlistwidget.cpp +++ b/core/multimedia/opieplayer/playlistwidget.cpp | |||
@@ -170,9 +170,9 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
170 | QVBox *vbox4 = new QVBox( vbox5 ); vbox4->setBackgroundMode( PaletteButton ); | 170 | QVBox *vbox4 = new QVBox( vbox5 ); vbox4->setBackgroundMode( PaletteButton ); |
171 | 171 | ||
172 | QHBox *hbox6 = new QHBox( vbox4 ); hbox6->setBackgroundMode( PaletteButton ); | 172 | QHBox *hbox6 = new QHBox( vbox4 ); hbox6->setBackgroundMode( PaletteButton ); |
173 | 173 | ||
174 | tabWidget = new QTabWidget( hbox6, "tabWidget" ); | 174 | tabWidget = new QTabWidget( hbox6, "tabWidget" ); |
175 | tabWidget->setTabShape(QTabWidget::Triangular); | 175 | tabWidget->setTabShape(QTabWidget::Triangular); |
176 | 176 | ||
177 | QWidget *pTab; | 177 | QWidget *pTab; |
178 | pTab = new QWidget( tabWidget, "pTab" ); | 178 | pTab = new QWidget( tabWidget, "pTab" ); |
@@ -481,9 +481,9 @@ const DocLnk *PlayListWidget::current() { // this is fugly | |||
481 | // Global::findDocuments(&files, "video/*;audio/*"); | 481 | // Global::findDocuments(&files, "video/*;audio/*"); |
482 | // QListIterator<DocLnk> dit( files.children() ); | 482 | // QListIterator<DocLnk> dit( files.children() ); |
483 | // for ( ; dit.current(); ++dit ) { | 483 | // for ( ; dit.current(); ++dit ) { |
484 | // if(dit.current()->linkFile() == setDocFileRef) { | 484 | // if(dit.current()->linkFile() == setDocFileRef) { |
485 | // qDebug(setDocFileRef); | 485 | // qDebug(setDocFileRef); |
486 | // return dit; | 486 | // return dit; |
487 | // } | 487 | // } |
488 | // } | 488 | // } |
489 | // } else | 489 | // } else |
@@ -492,9 +492,9 @@ const DocLnk *PlayListWidget::current() { // this is fugly | |||
492 | // case 0: //playlist | 492 | // case 0: //playlist |
493 | // { | 493 | // { |
494 | qDebug("playlist"); | 494 | qDebug("playlist"); |
495 | if ( mediaPlayerState->playlist() ) { | 495 | if ( mediaPlayerState->playlist() ) { |
496 | return d->selectedFiles->current(); | 496 | return d->selectedFiles->current(); |
497 | } | 497 | } |
498 | else if ( d->setDocumentUsed && d->current ) { | 498 | else if ( d->setDocumentUsed && d->current ) { |
499 | return d->current; | 499 | return d->current; |
500 | } else { | 500 | } else { |
@@ -812,8 +812,9 @@ void PlayListWidget::btnPlay(bool b) { | |||
812 | mediaPlayerState->setPlaying(b); | 812 | mediaPlayerState->setPlaying(b); |
813 | // qApp->processEvents(); | 813 | // qApp->processEvents(); |
814 | d->selectedFiles->removeSelected( ); | 814 | d->selectedFiles->removeSelected( ); |
815 | tabWidget->setCurrentPage(1); | 815 | tabWidget->setCurrentPage(1); |
816 | d->selectedFiles->unSelect(); | ||
816 | // mediaPlayerState->setPlaying(FALSE); | 817 | // mediaPlayerState->setPlaying(FALSE); |
817 | } | 818 | } |
818 | break; | 819 | break; |
819 | case 2: | 820 | case 2: |
@@ -822,8 +823,9 @@ void PlayListWidget::btnPlay(bool b) { | |||
822 | mediaPlayerState->setPlaying(b); | 823 | mediaPlayerState->setPlaying(b); |
823 | qApp->processEvents(); | 824 | qApp->processEvents(); |
824 | d->selectedFiles->removeSelected( ); | 825 | d->selectedFiles->removeSelected( ); |
825 | tabWidget->setCurrentPage(2); | 826 | tabWidget->setCurrentPage(2); |
827 | d->selectedFiles->unSelect(); | ||
826 | // mediaPlayerState->setPlaying(FALSE); | 828 | // mediaPlayerState->setPlaying(FALSE); |
827 | } | 829 | } |
828 | break; | 830 | break; |
829 | }; | 831 | }; |