summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/playlistselection.cpp6
-rw-r--r--core/multimedia/opieplayer/playlistselection.h1
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp8
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() {
ensureItemVisible( selectedItem() );
return TRUE;
}
-
bool PlayListSelection::next() {
QListViewItem *item = selectedItem();
if ( item && item->itemBelow() )
setSelected( item->itemBelow(), TRUE );
@@ -180,4 +179,9 @@ bool PlayListSelection::last() {
ensureItemVisible( selectedItem() );
return TRUE;
}
+void PlayListSelection::unSelect()
+{
+ QListViewItem *item = selectedItem();
+ setSelected( currentItem(), FALSE);
+} \ 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:
void addToSelection( const DocLnk & ); // Add a media file to the playlist
void removeSelected(); // Remove a media file from the playlist
void moveSelectedUp(); // Move the media file up the playlist so it is played earlier
void moveSelectedDown(); // Move the media file down the playlist so it is played later
+ void unSelect();
bool prev();
bool next();
bool first();
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 )
QVBox *vbox4 = new QVBox( vbox5 ); vbox4->setBackgroundMode( PaletteButton );
QHBox *hbox6 = new QHBox( vbox4 ); hbox6->setBackgroundMode( PaletteButton );
- tabWidget = new QTabWidget( hbox6, "tabWidget" );
+ tabWidget = new QTabWidget( hbox6, "tabWidget" );
tabWidget->setTabShape(QTabWidget::Triangular);
QWidget *pTab;
pTab = new QWidget( tabWidget, "pTab" );
@@ -481,9 +481,9 @@ const DocLnk *PlayListWidget::current() { // this is fugly
// Global::findDocuments(&files, "video/*;audio/*");
// QListIterator<DocLnk> dit( files.children() );
// for ( ; dit.current(); ++dit ) {
// if(dit.current()->linkFile() == setDocFileRef) {
-// qDebug(setDocFileRef);
+// qDebug(setDocFileRef);
// return dit;
// }
// }
// } else
@@ -492,9 +492,9 @@ const DocLnk *PlayListWidget::current() { // this is fugly
// case 0: //playlist
// {
qDebug("playlist");
if ( mediaPlayerState->playlist() ) {
- return d->selectedFiles->current();
+ return d->selectedFiles->current();
}
else if ( d->setDocumentUsed && d->current ) {
return d->current;
} else {
@@ -812,8 +812,9 @@ void PlayListWidget::btnPlay(bool b) {
mediaPlayerState->setPlaying(b);
// qApp->processEvents();
d->selectedFiles->removeSelected( );
tabWidget->setCurrentPage(1);
+ d->selectedFiles->unSelect();
// mediaPlayerState->setPlaying(FALSE);
}
break;
case 2:
@@ -822,8 +823,9 @@ void PlayListWidget::btnPlay(bool b) {
mediaPlayerState->setPlaying(b);
qApp->processEvents();
d->selectedFiles->removeSelected( );
tabWidget->setCurrentPage(2);
+ d->selectedFiles->unSelect();
// mediaPlayerState->setPlaying(FALSE);
}
break;
};