Diffstat (limited to 'core/multimedia/opieplayer/playlistwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 33 |
1 files changed, 22 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 ) initializeStates(); + // audioUI->setFocus(); } @@ -374,3 +375,3 @@ PlayListWidget::~PlayListWidget() { delete d->current; - delete d; + if(d) delete d; } @@ -496,4 +497,11 @@ void PlayListWidget::addAllVideoToList() { void PlayListWidget::setDocument(const QString& fileref) { - qDebug(fileref); - fromSetDocument = TRUE; + fromSetDocument = true; + d->setDocumentUsed = TRUE; + mediaPlayerState->setPlaying( FALSE ); + qApp->processEvents(); + mediaPlayerState->setPlaying( TRUE ); +} + +void PlayListWidget::setDocumentEx(const QString& fileref) { + QFileInfo fileInfo(fileref); @@ -504,3 +512,3 @@ void PlayListWidget::setDocument(const QString& fileref) { } -// qDebug("setDocument "+fileref); + qDebug("setDocument "+fileref); QString extension = fileInfo.extension(false); @@ -532,3 +540,3 @@ void PlayListWidget::setDocument(const QString& fileref) { mediaPlayerState->setPlaying( TRUE ); - qApp->processEvents(); + // qApp->processEvents(); setCaption(tr("OpiePlayer")); @@ -761,3 +769,3 @@ void PlayListWidget::playIt( QListViewItem *) { qDebug("playIt"); - mediaPlayerState->setPlaying(FALSE); + // mediaPlayerState->setPlaying(FALSE); mediaPlayerState->setPlaying(TRUE); @@ -784,2 +792,3 @@ void PlayListWidget::addToSelection( QListViewItem *it) { + if(tabWidget->currentPageIndex() == 0) writeCurrentM3u(); @@ -833,3 +842,3 @@ void PlayListWidget::tabChanged(QWidget *) { void PlayListWidget::btnPlay(bool b) { - qDebug("<<<<<<<<<<<<<<<BtnPlay"); + qDebug("<<<<<<<<<<<<<<<BtnPlay %d", b); // mediaPlayerState->setPlaying(b); @@ -854,3 +863,3 @@ void PlayListWidget::btnPlay(bool b) { addToSelection( audioView->currentItem() ); - mediaPlayerState->setPlaying(true); + mediaPlayerState->setPlaying( b); d->selectedFiles->removeSelected( ); @@ -866,3 +875,3 @@ void PlayListWidget::btnPlay(bool b) { addToSelection( videoView->currentItem() ); - mediaPlayerState->setPlaying(true); + mediaPlayerState->setPlaying( b); // qApp->processEvents(); @@ -1461,3 +1470,3 @@ void PlayListWidget::qcopReceive(const QCString &msg, const QByteArray &data) { mediaPlayerState->togglePaused(); - } else if ( msg == "next()" ) { //select next in list + } else if ( msg == "next()" ) { //select next in lis mediaPlayerState->setNext(); @@ -1478,3 +1487,3 @@ void PlayListWidget::qcopReceive(const QCString &msg, const QByteArray &data) { stream >> file; - setDocument( (const QString &) file); + setDocumentEx( (const QString &) file); } else if ( msg == "add(QString)" ) { //add to playlist @@ -1491,2 +1500,4 @@ void PlayListWidget::qcopReceive(const QCString &msg, const QByteArray &data) { + } else if ( msg == "setDocument(QString)" ) { //loop or not loop + QCopEnvelope h("QPE/Application/opieplayer", "raise()"); } |