-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 33 | ||||
-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.h | 1 |
2 files changed, 23 insertions, 11 deletions
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp index c6de5e6..5d0f6de 100644 --- a/core/multimedia/opieplayer/playlistwidget.cpp +++ b/core/multimedia/opieplayer/playlistwidget.cpp | |||
@@ -365,2 +365,3 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
365 | initializeStates(); | 365 | initializeStates(); |
366 | // audioUI->setFocus(); | ||
366 | } | 367 | } |
@@ -374,3 +375,3 @@ PlayListWidget::~PlayListWidget() { | |||
374 | delete d->current; | 375 | delete d->current; |
375 | delete d; | 376 | if(d) delete d; |
376 | } | 377 | } |
@@ -496,4 +497,11 @@ void PlayListWidget::addAllVideoToList() { | |||
496 | void PlayListWidget::setDocument(const QString& fileref) { | 497 | void PlayListWidget::setDocument(const QString& fileref) { |
497 | qDebug(fileref); | 498 | fromSetDocument = true; |
498 | fromSetDocument = TRUE; | 499 | d->setDocumentUsed = TRUE; |
500 | mediaPlayerState->setPlaying( FALSE ); | ||
501 | qApp->processEvents(); | ||
502 | mediaPlayerState->setPlaying( TRUE ); | ||
503 | } | ||
504 | |||
505 | void PlayListWidget::setDocumentEx(const QString& fileref) { | ||
506 | |||
499 | QFileInfo fileInfo(fileref); | 507 | QFileInfo fileInfo(fileref); |
@@ -504,3 +512,3 @@ void PlayListWidget::setDocument(const QString& fileref) { | |||
504 | } | 512 | } |
505 | // qDebug("setDocument "+fileref); | 513 | qDebug("setDocument "+fileref); |
506 | QString extension = fileInfo.extension(false); | 514 | QString extension = fileInfo.extension(false); |
@@ -532,3 +540,3 @@ void PlayListWidget::setDocument(const QString& fileref) { | |||
532 | mediaPlayerState->setPlaying( TRUE ); | 540 | mediaPlayerState->setPlaying( TRUE ); |
533 | qApp->processEvents(); | 541 | // qApp->processEvents(); |
534 | setCaption(tr("OpiePlayer")); | 542 | setCaption(tr("OpiePlayer")); |
@@ -761,3 +769,3 @@ void PlayListWidget::playIt( QListViewItem *) { | |||
761 | qDebug("playIt"); | 769 | qDebug("playIt"); |
762 | mediaPlayerState->setPlaying(FALSE); | 770 | // mediaPlayerState->setPlaying(FALSE); |
763 | mediaPlayerState->setPlaying(TRUE); | 771 | mediaPlayerState->setPlaying(TRUE); |
@@ -784,2 +792,3 @@ void PlayListWidget::addToSelection( QListViewItem *it) { | |||
784 | 792 | ||
793 | if(tabWidget->currentPageIndex() == 0) | ||
785 | writeCurrentM3u(); | 794 | writeCurrentM3u(); |
@@ -833,3 +842,3 @@ void PlayListWidget::tabChanged(QWidget *) { | |||
833 | void PlayListWidget::btnPlay(bool b) { | 842 | void PlayListWidget::btnPlay(bool b) { |
834 | qDebug("<<<<<<<<<<<<<<<BtnPlay"); | 843 | qDebug("<<<<<<<<<<<<<<<BtnPlay %d", b); |
835 | // mediaPlayerState->setPlaying(b); | 844 | // mediaPlayerState->setPlaying(b); |
@@ -854,3 +863,3 @@ void PlayListWidget::btnPlay(bool b) { | |||
854 | addToSelection( audioView->currentItem() ); | 863 | addToSelection( audioView->currentItem() ); |
855 | mediaPlayerState->setPlaying(true); | 864 | mediaPlayerState->setPlaying( b); |
856 | d->selectedFiles->removeSelected( ); | 865 | d->selectedFiles->removeSelected( ); |
@@ -866,3 +875,3 @@ void PlayListWidget::btnPlay(bool b) { | |||
866 | addToSelection( videoView->currentItem() ); | 875 | addToSelection( videoView->currentItem() ); |
867 | mediaPlayerState->setPlaying(true); | 876 | mediaPlayerState->setPlaying( b); |
868 | // qApp->processEvents(); | 877 | // qApp->processEvents(); |
@@ -1461,3 +1470,3 @@ void PlayListWidget::qcopReceive(const QCString &msg, const QByteArray &data) { | |||
1461 | mediaPlayerState->togglePaused(); | 1470 | mediaPlayerState->togglePaused(); |
1462 | } else if ( msg == "next()" ) { //select next in list | 1471 | } else if ( msg == "next()" ) { //select next in lis |
1463 | mediaPlayerState->setNext(); | 1472 | mediaPlayerState->setNext(); |
@@ -1478,3 +1487,3 @@ void PlayListWidget::qcopReceive(const QCString &msg, const QByteArray &data) { | |||
1478 | stream >> file; | 1487 | stream >> file; |
1479 | setDocument( (const QString &) file); | 1488 | setDocumentEx( (const QString &) file); |
1480 | } else if ( msg == "add(QString)" ) { //add to playlist | 1489 | } else if ( msg == "add(QString)" ) { //add to playlist |
@@ -1491,2 +1500,4 @@ void PlayListWidget::qcopReceive(const QCString &msg, const QByteArray &data) { | |||
1491 | 1500 | ||
1501 | } else if ( msg == "setDocument(QString)" ) { //loop or not loop | ||
1502 | QCopEnvelope h("QPE/Application/opieplayer", "raise()"); | ||
1492 | } | 1503 | } |
diff --git a/core/multimedia/opieplayer/playlistwidget.h b/core/multimedia/opieplayer/playlistwidget.h index e66bcb9..0c0e367 100644 --- a/core/multimedia/opieplayer/playlistwidget.h +++ b/core/multimedia/opieplayer/playlistwidget.h | |||
@@ -104,2 +104,3 @@ private slots: | |||
104 | void setDocument( const QString& fileref ); | 104 | void setDocument( const QString& fileref ); |
105 | void setDocumentEx( const QString& fileref ); | ||
105 | void addToSelection( const DocLnk& ); // Add a media file to the playlist | 106 | void addToSelection( const DocLnk& ); // Add a media file to the playlist |