author | llornkcor <llornkcor> | 2002-08-13 23:57:49 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-08-13 23:57:49 (UTC) |
commit | 05a272a0dc03c37f143546aa5cde228bd3ba79bb (patch) (unidiff) | |
tree | 2e994a06ebd2b66287905dce828c5f3e57a0147a /noncore/multimedia | |
parent | 6baf582094b418ec1defa2415210a7d7583628ff (diff) | |
download | opie-05a272a0dc03c37f143546aa5cde228bd3ba79bb.zip opie-05a272a0dc03c37f143546aa5cde228bd3ba79bb.tar.gz opie-05a272a0dc03c37f143546aa5cde228bd3ba79bb.tar.bz2 |
remove unused variables
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 27db464..2521906 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -620,25 +620,25 @@ void PlayListWidget::setPlaylist( bool shown ) { | |||
620 | void PlayListWidget::setView( char view ) { | 620 | void PlayListWidget::setView( char view ) { |
621 | if ( view == 'l' ) | 621 | if ( view == 'l' ) |
622 | showMaximized(); | 622 | showMaximized(); |
623 | else | 623 | else |
624 | hide(); | 624 | hide(); |
625 | } | 625 | } |
626 | 626 | ||
627 | void PlayListWidget::addSelected() { | 627 | void PlayListWidget::addSelected() { |
628 | 628 | ||
629 | Config cfg( "OpiePlayer" ); | 629 | Config cfg( "OpiePlayer" ); |
630 | cfg.setGroup("PlayList"); | 630 | cfg.setGroup("PlayList"); |
631 | QString currentPlaylist = cfg.readEntry("CurrentPlaylist",""); | 631 | QString currentPlaylist = cfg.readEntry("CurrentPlaylist",""); |
632 | int noOfFiles = cfg.readNumEntry("NumberOfFiles", 0 ); | 632 | // int noOfFiles = cfg.readNumEntry("NumberOfFiles", 0 ); |
633 | 633 | ||
634 | switch (tabWidget->currentPageIndex()) { | 634 | switch (tabWidget->currentPageIndex()) { |
635 | case 0: //playlist | 635 | case 0: //playlist |
636 | break; | 636 | break; |
637 | case 1: { //audio | 637 | case 1: { //audio |
638 | QListViewItemIterator it( audioView ); | 638 | QListViewItemIterator it( audioView ); |
639 | // iterate through all items of the listview | 639 | // iterate through all items of the listview |
640 | for ( ; it.current(); ++it ) { | 640 | for ( ; it.current(); ++it ) { |
641 | if ( it.current()->isSelected() ) { | 641 | if ( it.current()->isSelected() ) { |
642 | QListIterator<DocLnk> dit( files.children() ); | 642 | QListIterator<DocLnk> dit( files.children() ); |
643 | for ( ; dit.current(); ++dit ) { | 643 | for ( ; dit.current(); ++dit ) { |
644 | if( dit.current()->name() == it.current()->text(0) ) { | 644 | if( dit.current()->name() == it.current()->text(0) ) { |
@@ -667,24 +667,25 @@ void PlayListWidget::addSelected() { | |||
667 | } | 667 | } |
668 | tabWidget->setCurrentPage(0); | 668 | tabWidget->setCurrentPage(0); |
669 | } | 669 | } |
670 | break; | 670 | break; |
671 | }; | 671 | }; |
672 | } | 672 | } |
673 | 673 | ||
674 | void PlayListWidget::removeSelected() { | 674 | void PlayListWidget::removeSelected() { |
675 | d->selectedFiles->removeSelected( ); | 675 | d->selectedFiles->removeSelected( ); |
676 | } | 676 | } |
677 | 677 | ||
678 | void PlayListWidget::playIt( QListViewItem *it) { | 678 | void PlayListWidget::playIt( QListViewItem *it) { |
679 | if(it==NULL) return; | ||
679 | qDebug("playIt"); | 680 | qDebug("playIt"); |
680 | mediaPlayerState->setPlaying(FALSE); | 681 | mediaPlayerState->setPlaying(FALSE); |
681 | mediaPlayerState->setPlaying(TRUE); | 682 | mediaPlayerState->setPlaying(TRUE); |
682 | d->selectedFiles->unSelect(); | 683 | d->selectedFiles->unSelect(); |
683 | } | 684 | } |
684 | 685 | ||
685 | void PlayListWidget::addToSelection( QListViewItem *it) { | 686 | void PlayListWidget::addToSelection( QListViewItem *it) { |
686 | d->setDocumentUsed = FALSE; | 687 | d->setDocumentUsed = FALSE; |
687 | 688 | ||
688 | if(it) { | 689 | if(it) { |
689 | switch (tabWidget->currentPageIndex()) { | 690 | switch (tabWidget->currentPageIndex()) { |
690 | case 1: { | 691 | case 1: { |
@@ -703,25 +704,25 @@ void PlayListWidget::addToSelection( QListViewItem *it) { | |||
703 | d->selectedFiles->addToSelection( **dit ); | 704 | d->selectedFiles->addToSelection( **dit ); |
704 | } | 705 | } |
705 | } | 706 | } |
706 | } | 707 | } |
707 | break; | 708 | break; |
708 | case 0: | 709 | case 0: |
709 | break; | 710 | break; |
710 | }; | 711 | }; |
711 | tabWidget->setCurrentPage(0); | 712 | tabWidget->setCurrentPage(0); |
712 | } | 713 | } |
713 | } | 714 | } |
714 | 715 | ||
715 | void PlayListWidget::tabChanged(QWidget *widg) { | 716 | void PlayListWidget::tabChanged(QWidget *) { |
716 | 717 | ||
717 | switch ( tabWidget->currentPageIndex()) { | 718 | switch ( tabWidget->currentPageIndex()) { |
718 | case 0: | 719 | case 0: |
719 | { | 720 | { |
720 | if( !tbDeletePlaylist->isHidden()) | 721 | if( !tbDeletePlaylist->isHidden()) |
721 | tbDeletePlaylist->hide(); | 722 | tbDeletePlaylist->hide(); |
722 | d->tbRemoveFromList->setEnabled(TRUE); | 723 | d->tbRemoveFromList->setEnabled(TRUE); |
723 | d->tbAddToList->setEnabled(FALSE); | 724 | d->tbAddToList->setEnabled(FALSE); |
724 | } | 725 | } |
725 | break; | 726 | break; |
726 | case 1: | 727 | case 1: |
727 | { | 728 | { |
@@ -793,66 +794,66 @@ void PlayListWidget::deletePlaylist() { | |||
793 | (tr("You really want to delete\nthis playlist?")), | 794 | (tr("You really want to delete\nthis playlist?")), |
794 | (tr("Yes")), (tr("No")), 0 )){ | 795 | (tr("Yes")), (tr("No")), 0 )){ |
795 | case 0: // Yes clicked, | 796 | case 0: // Yes clicked, |
796 | QFile().remove(playLists->selected()->file()); | 797 | QFile().remove(playLists->selected()->file()); |
797 | QFile().remove(playLists->selected()->linkFile()); | 798 | QFile().remove(playLists->selected()->linkFile()); |
798 | playLists->reread(); | 799 | playLists->reread(); |
799 | break; | 800 | break; |
800 | case 1: // Cancel | 801 | case 1: // Cancel |
801 | break; | 802 | break; |
802 | }; | 803 | }; |
803 | } | 804 | } |
804 | 805 | ||
805 | void PlayListWidget::viewPressed( int mouse, QListViewItem *item, const QPoint& point, int i) { | 806 | void PlayListWidget::viewPressed( int mouse, QListViewItem *, const QPoint& , int) { |
806 | switch (mouse) { | 807 | switch (mouse) { |
807 | case 1: | 808 | case 1: |
808 | break; | 809 | break; |
809 | case 2:{ | 810 | case 2:{ |
810 | QPopupMenu m; | 811 | QPopupMenu m; |
811 | m.insertItem( tr( "Play" ), this, SLOT( playSelected() )); | 812 | m.insertItem( tr( "Play" ), this, SLOT( playSelected() )); |
812 | m.insertItem( tr( "Add to Playlist" ), this, SLOT( addSelected() )); | 813 | m.insertItem( tr( "Add to Playlist" ), this, SLOT( addSelected() )); |
813 | m.insertSeparator(); | 814 | m.insertSeparator(); |
814 | m.insertItem( tr( "Properties" ), this, SLOT( listDelete() )); | 815 | m.insertItem( tr( "Properties" ), this, SLOT( listDelete() )); |
815 | m.exec( QCursor::pos() ); | 816 | m.exec( QCursor::pos() ); |
816 | } | 817 | } |
817 | break; | 818 | break; |
818 | }; | 819 | }; |
819 | } | 820 | } |
820 | 821 | ||
821 | void PlayListWidget::playSelected() { | 822 | void PlayListWidget::playSelected() { |
822 | btnPlay( TRUE); | 823 | btnPlay( TRUE); |
823 | } | 824 | } |
824 | 825 | ||
825 | void PlayListWidget::playlistViewPressed( int mouse, QListViewItem *item, const QPoint& point, int i) { | 826 | void PlayListWidget::playlistViewPressed( int mouse, QListViewItem *, const QPoint& , int ) { |
826 | switch (mouse) { | 827 | switch (mouse) { |
827 | case 1: | 828 | case 1: |
828 | 829 | ||
829 | break; | 830 | break; |
830 | case 2: | 831 | case 2: |
831 | { | 832 | { |
832 | QPopupMenu m; | 833 | QPopupMenu m; |
833 | m.insertItem( tr( "Play Selected" ), this, SLOT( playSelected() )); | 834 | m.insertItem( tr( "Play Selected" ), this, SLOT( playSelected() )); |
834 | m.insertItem( tr( "Remove" ), this, SLOT( removeSelected() )); | 835 | m.insertItem( tr( "Remove" ), this, SLOT( removeSelected() )); |
835 | m.exec( QCursor::pos() ); | 836 | m.exec( QCursor::pos() ); |
836 | } | 837 | } |
837 | break; | 838 | break; |
838 | }; | 839 | }; |
839 | } | 840 | } |
840 | 841 | ||
841 | void PlayListWidget::listDelete() { | 842 | void PlayListWidget::listDelete() { |
842 | Config cfg( "OpiePlayer" ); | 843 | Config cfg( "OpiePlayer" ); |
843 | cfg.setGroup("PlayList"); | 844 | cfg.setGroup("PlayList"); |
844 | QString currentPlaylist = cfg.readEntry("CurrentPlaylist",""); | 845 | QString currentPlaylist = cfg.readEntry("CurrentPlaylist",""); |
845 | QString file; | 846 | QString file; |
846 | int noOfFiles = cfg.readNumEntry("NumberOfFiles", 0 ); | 847 | // int noOfFiles = cfg.readNumEntry("NumberOfFiles", 0 ); |
847 | switch ( tabWidget->currentPageIndex()) { | 848 | switch ( tabWidget->currentPageIndex()) { |
848 | case 0: | 849 | case 0: |
849 | break; | 850 | break; |
850 | case 1: | 851 | case 1: |
851 | { | 852 | { |
852 | file = audioView->currentItem()->text(0); | 853 | file = audioView->currentItem()->text(0); |
853 | QListIterator<DocLnk> Pdit( files.children() ); | 854 | QListIterator<DocLnk> Pdit( files.children() ); |
854 | for ( ; Pdit.current(); ++Pdit ) { | 855 | for ( ; Pdit.current(); ++Pdit ) { |
855 | if( Pdit.current()->name() == file) { | 856 | if( Pdit.current()->name() == file) { |
856 | LnkProperties prop( Pdit.current() ); | 857 | LnkProperties prop( Pdit.current() ); |
857 | prop.showMaximized(); | 858 | prop.showMaximized(); |
858 | prop.exec(); | 859 | prop.exec(); |
@@ -1031,25 +1032,25 @@ void PlayListWidget::keyReleaseEvent( QKeyEvent *e) | |||
1031 | d->selectedFiles->first(); | 1032 | d->selectedFiles->first(); |
1032 | 1033 | ||
1033 | break; | 1034 | break; |
1034 | case Key_Up: | 1035 | case Key_Up: |
1035 | if ( !d->selectedFiles->prev() ) | 1036 | if ( !d->selectedFiles->prev() ) |
1036 | // d->selectedFiles->last(); | 1037 | // d->selectedFiles->last(); |
1037 | 1038 | ||
1038 | break; | 1039 | break; |
1039 | 1040 | ||
1040 | } | 1041 | } |
1041 | } | 1042 | } |
1042 | 1043 | ||
1043 | void PlayListWidget::keyPressEvent( QKeyEvent *e) | 1044 | void PlayListWidget::keyPressEvent( QKeyEvent *) |
1044 | { | 1045 | { |
1045 | // qDebug("Key press"); | 1046 | // qDebug("Key press"); |
1046 | // switch ( e->key() ) { | 1047 | // switch ( e->key() ) { |
1047 | // ////////////////////////////// Zaurus keys | 1048 | // ////////////////////////////// Zaurus keys |
1048 | // case Key_A: //add to playlist | 1049 | // case Key_A: //add to playlist |
1049 | // qDebug("Add"); | 1050 | // qDebug("Add"); |
1050 | // addSelected(); | 1051 | // addSelected(); |
1051 | // break; | 1052 | // break; |
1052 | // case Key_R: //remove from playlist | 1053 | // case Key_R: //remove from playlist |
1053 | // removeSelected(); | 1054 | // removeSelected(); |
1054 | // break; | 1055 | // break; |
1055 | // case Key_P: //play | 1056 | // case Key_P: //play |