Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 92 |
1 files changed, 55 insertions, 37 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 3bd04bc..15c70c3 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -323,3 +323,3 @@ void PlayListWidget::useSelectedDocument() { | |||
323 | const DocLnk *PlayListWidget::current() { // this is fugly | 323 | const DocLnk *PlayListWidget::current() { // this is fugly |
324 | switch ( tabWidget->currentPageIndex() ) { | 324 | switch ( whichList() ) { |
325 | case 0: //playlist | 325 | case 0: //playlist |
@@ -396,3 +396,4 @@ bool PlayListWidget::prev() { | |||
396 | bool PlayListWidget::next() { | 396 | bool PlayListWidget::next() { |
397 | if ( mediaPlayerState->playlist() ) { | 397 | qDebug("<<<<<<<<<<<<next()"); |
398 | if ( mediaPlayerState->playlist() ) { | ||
398 | if ( mediaPlayerState->shuffled() ) { | 399 | if ( mediaPlayerState->shuffled() ) { |
@@ -499,3 +500,3 @@ void PlayListWidget::addSelected() { | |||
499 | 500 | ||
500 | switch (tabWidget->currentPageIndex()) { | 501 | switch (whichList()) { |
501 | case 0: //playlist | 502 | case 0: //playlist |
@@ -559,3 +560,3 @@ void PlayListWidget::addToSelection( QListViewItem *it) { | |||
559 | if(it) { | 560 | if(it) { |
560 | switch (tabWidget->currentPageIndex()) { | 561 | switch ( whichList()) { |
561 | case 1: { | 562 | case 1: { |
@@ -590,3 +591,3 @@ void PlayListWidget::tabChanged(QWidget *) { | |||
590 | 591 | ||
591 | switch ( tabWidget->currentPageIndex()) { | 592 | switch ( whichList()) { |
592 | case 0: | 593 | case 0: |
@@ -636,31 +637,30 @@ void PlayListWidget::tabChanged(QWidget *) { | |||
636 | void PlayListWidget::btnPlay(bool b) { | 637 | void PlayListWidget::btnPlay(bool b) { |
637 | // mediaPlayerState->setPlaying(b); | 638 | mediaPlayerState->setPlaying(b); |
638 | switch ( tabWidget->currentPageIndex()) { | 639 | qApp->processEvents(); |
639 | case 0: | 640 | insanityBool=FALSE; |
640 | { | 641 | // switch ( whichList()) { |
641 | mediaPlayerState->setPlaying(b); | 642 | // case 0: |
642 | } | 643 | // { |
643 | break; | 644 | // mediaPlayerState->setPlaying(b); |
644 | case 1: | 645 | // } |
645 | { | 646 | // break; |
646 | addToSelection( audioView->currentItem() ); | 647 | // case 1: |
647 | mediaPlayerState->setPlaying(b); | 648 | // { |
648 | d->selectedFiles->removeSelected( ); | 649 | // mediaPlayerState->setPlaying(b); |
649 | tabWidget->setCurrentPage(1); | 650 | // qApp->processEvents(); |
650 | d->selectedFiles->unSelect(); | 651 | // insanityBool=FALSE; |
651 | insanityBool=FALSE; | 652 | // }// audioView->clearSelection(); |
652 | }// audioView->clearSelection(); | 653 | // break; |
653 | break; | 654 | // case 2: |
654 | case 2: | 655 | // { |
655 | { | 656 | // // addToSelection( videoView->currentItem() ); |
656 | addToSelection( videoView->currentItem() ); | 657 | // mediaPlayerState->setPlaying(b); |
657 | mediaPlayerState->setPlaying(b); | 658 | // qApp->processEvents(); |
658 | qApp->processEvents(); | 659 | // // d->selectedFiles->removeSelected( ); |
659 | d->selectedFiles->removeSelected( ); | 660 | // // tabWidget->setCurrentPage(2); |
660 | tabWidget->setCurrentPage(2); | 661 | // // d->selectedFiles->unSelect(); |
661 | d->selectedFiles->unSelect(); | 662 | // insanityBool=FALSE; |
662 | insanityBool=FALSE; | 663 | // }// videoView->clearSelection(); |
663 | }// videoView->clearSelection(); | 664 | // break; |
664 | break; | 665 | // }; |
665 | }; | ||
666 | 666 | ||
@@ -738,3 +738,4 @@ void PlayListWidget::populateAudioView() { | |||
738 | size = QFile( dit.current()->file() ).size(); | 738 | size = QFile( dit.current()->file() ).size(); |
739 | newItem= /*(void)*/ new QListViewItem( audioView, dit.current()->name(), QString::number(size ), storage); | 739 | newItem= /*(void)*/ new QListViewItem( audioView, dit.current()->name(), |
740 | QString::number(size ), storage, dit.current()->file()); | ||
740 | newItem->setPixmap( 0, Resource::loadPixmap( "opieplayer2/musicfile" ) ); | 741 | newItem->setPixmap( 0, Resource::loadPixmap( "opieplayer2/musicfile" ) ); |
@@ -757,3 +758,3 @@ void PlayListWidget::populateVideoView() { | |||
757 | videoView->clear(); | 758 | videoView->clear(); |
758 | QString storage; | 759 | QString storage, pathName; |
759 | for ( ; Vdit.current(); ++Vdit ) { | 760 | for ( ; Vdit.current(); ++Vdit ) { |
@@ -764,2 +765,3 @@ void PlayListWidget::populateVideoView() { | |||
764 | storage=name; | 765 | storage=name; |
766 | pathName=path; | ||
765 | } | 767 | } |
@@ -770,3 +772,3 @@ void PlayListWidget::populateVideoView() { | |||
770 | newItem= /*(void)*/ new QListViewItem( videoView, Vdit.current()->name(), | 772 | newItem= /*(void)*/ new QListViewItem( videoView, Vdit.current()->name(), |
771 | QString::number( QFile( Vdit.current()->file() ).size() ), storage ); | 773 | QString::number( QFile( Vdit.current()->file() ).size() ), storage, Vdit.current()->file()); |
772 | newItem->setPixmap(0, Resource::loadPixmap( "opieplayer2/videofile" ) ); | 774 | newItem->setPixmap(0, Resource::loadPixmap( "opieplayer2/videofile" ) ); |
@@ -1064 +1066,17 @@ void PlayListWidget::skinsMenuActivated( int item ) { | |||
1064 | } | 1066 | } |
1067 | |||
1068 | int PlayListWidget::whichList() { | ||
1069 | return tabWidget->currentPageIndex(); | ||
1070 | } | ||
1071 | |||
1072 | QString PlayListWidget::currentFileListPathName() { | ||
1073 | switch (whichList()) { | ||
1074 | case 1: | ||
1075 | return audioView->currentItem()->text(3); | ||
1076 | break; | ||
1077 | case 2: | ||
1078 | return videoView->currentItem()->text(3); | ||
1079 | break; | ||
1080 | }; | ||
1081 | return ""; | ||
1082 | } | ||