summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/playlistwidget.cpp
authoralwin <alwin>2004-03-02 12:21:11 (UTC)
committer alwin <alwin>2004-03-02 12:21:11 (UTC)
commitb6b1c97559c0ed9f2e33632272426bf98f289232 (patch) (unidiff)
treed3a9987704770cdf5eb14e1136f6e3ecb2f36a04 /noncore/multimedia/opieplayer2/playlistwidget.cpp
parent0d59c780513da78033f4d9040475dee9db0256d4 (diff)
downloadopie-b6b1c97559c0ed9f2e33632272426bf98f289232.zip
opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.gz
opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.bz2
applied the patch generated by the optimize_connect script from
TT.
Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp88
1 files changed, 44 insertions, 44 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index 9a9e1ec..0a84268 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -60,17 +60,17 @@ PlayListWidget::PlayListWidget(QWidget* parent, const char* name, WFlags fl )
60 "opieplayer2/add_to_playlist", 60 "opieplayer2/add_to_playlist",
61 this , SLOT(addSelected() ) ); 61 this , SLOT(addSelected() ) );
62 d->tbRemoveFromList = new ToolButton( bar, tr( "Remove from Playlist" ), 62 d->tbRemoveFromList = new ToolButton( bar, tr( "Remove from Playlist" ),
63 "opieplayer2/remove_from_playlist", 63 "opieplayer2/remove_from_playlist",
64 this , SLOT(removeSelected() ) ); 64 this , SLOT(removeSelected() ) );
65 d->tbPlay = new ToolButton( bar, tr( "Play" ), "opieplayer2/play", 65 d->tbPlay = new ToolButton( bar, tr( "Play" ), "opieplayer2/play",
66 this , SLOT( btnPlay( bool) ), TRUE ); 66 this , SLOT( btnPlay(bool) ), TRUE );
67 d->tbShuffle = new ToolButton( bar, tr( "Randomize" ),"opieplayer2/shuffle", 67 d->tbShuffle = new ToolButton( bar, tr( "Randomize" ),"opieplayer2/shuffle",
68 mediaPlayerState, SLOT( setShuffled( bool ) ), TRUE ); 68 mediaPlayerState, SLOT( setShuffled(bool) ), TRUE );
69 d->tbLoop = new ToolButton( bar, tr( "Loop" ), "opieplayer2/loop", 69 d->tbLoop = new ToolButton( bar, tr( "Loop" ), "opieplayer2/loop",
70 mediaPlayerState, SLOT( setLooping( bool ) ), TRUE ); 70 mediaPlayerState, SLOT( setLooping(bool) ), TRUE );
71 71
72 (void)new MenuItem( pmPlayList, tr( "Clear List" ), this, SLOT( clearList() ) ); 72 (void)new MenuItem( pmPlayList, tr( "Clear List" ), this, SLOT( clearList() ) );
73 (void)new MenuItem( pmPlayList, tr( "Add all audio files" ), 73 (void)new MenuItem( pmPlayList, tr( "Add all audio files" ),
74 this, SLOT( addAllMusicToList() ) ); 74 this, SLOT( addAllMusicToList() ) );
75 (void)new MenuItem( pmPlayList, tr( "Add all video files" ), 75 (void)new MenuItem( pmPlayList, tr( "Add all video files" ),
76 this, SLOT( addAllVideoToList() ) ); 76 this, SLOT( addAllVideoToList() ) );
@@ -105,55 +105,55 @@ PlayListWidget::PlayListWidget(QWidget* parent, const char* name, WFlags fl )
105 (void)new ToolButton( vbox1, tr( "Move Down" ), "opieplayer2/down", 105 (void)new ToolButton( vbox1, tr( "Move Down" ), "opieplayer2/down",
106 d->selectedFiles, SLOT(moveSelectedDown() ) ); 106 d->selectedFiles, SLOT(moveSelectedDown() ) );
107 QVBox *stretch2 = new QVBox( vbox1 ); 107 QVBox *stretch2 = new QVBox( vbox1 );
108 108
109 connect( tbDeletePlaylist, ( SIGNAL( released() ) ), 109 connect( tbDeletePlaylist, ( SIGNAL( released() ) ),
110 SLOT( deletePlaylist() ) ); 110 SLOT( deletePlaylist() ) );
111 connect( pmView, SIGNAL( activated( int ) ), 111 connect( pmView, SIGNAL( activated(int) ),
112 this, SLOT( pmViewActivated( int ) ) ); 112 this, SLOT( pmViewActivated(int) ) );
113 connect( skinsMenu, SIGNAL( activated( int ) ) , 113 connect( skinsMenu, SIGNAL( activated(int) ) ,
114 this, SLOT( skinsMenuActivated( int ) ) ); 114 this, SLOT( skinsMenuActivated(int) ) );
115 connect( d->selectedFiles, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int) ), 115 connect( d->selectedFiles, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),
116 this,SLOT( playlistViewPressed( int, QListViewItem *, const QPoint&, int ) ) ); 116 this,SLOT( playlistViewPressed(int,QListViewItem*,const QPoint&,int) ) );
117 connect( audioView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int ) ), 117 connect( audioView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),
118 this,SLOT( viewPressed( int, QListViewItem *, const QPoint&, int ) ) ); 118 this,SLOT( viewPressed(int,QListViewItem*,const QPoint&,int) ) );
119 connect( audioView, SIGNAL( returnPressed( QListViewItem *) ), 119 connect( audioView, SIGNAL( returnPressed(QListViewItem*) ),
120 this,SLOT( playIt( QListViewItem *) ) ); 120 this,SLOT( playIt(QListViewItem*) ) );
121 connect( audioView, SIGNAL( doubleClicked( QListViewItem *) ), 121 connect( audioView, SIGNAL( doubleClicked(QListViewItem*) ),
122 this, SLOT( addToSelection( QListViewItem *) ) ); 122 this, SLOT( addToSelection(QListViewItem*) ) );
123 connect( videoView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int) ), 123 connect( videoView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),
124 this,SLOT( viewPressed( int, QListViewItem *, const QPoint&, int) ) ); 124 this,SLOT( viewPressed(int,QListViewItem*,const QPoint&,int) ) );
125 connect( videoView, SIGNAL( returnPressed( QListViewItem *) ), 125 connect( videoView, SIGNAL( returnPressed(QListViewItem*) ),
126 this,SLOT( playIt( QListViewItem *) ) ); 126 this,SLOT( playIt(QListViewItem*) ) );
127 connect( videoView, SIGNAL( doubleClicked( QListViewItem *) ), 127 connect( videoView, SIGNAL( doubleClicked(QListViewItem*) ),
128 this, SLOT( addToSelection( QListViewItem *) ) ); 128 this, SLOT( addToSelection(QListViewItem*) ) );
129 connect( playLists, SIGNAL( fileSelected( const DocLnk &) ), 129 connect( playLists, SIGNAL( fileSelected(const DocLnk&) ),
130 this, SLOT( loadList( const DocLnk & ) ) ); 130 this, SLOT( loadList(const DocLnk&) ) );
131 connect( tabWidget, SIGNAL ( currentChanged(QWidget*) ), 131 connect( tabWidget, SIGNAL ( currentChanged(QWidget*) ),
132 this, SLOT( tabChanged( QWidget* ) ) ); 132 this, SLOT( tabChanged(QWidget*) ) );
133 connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), 133 connect( mediaPlayerState, SIGNAL( playingToggled(bool) ),
134 d->tbPlay, SLOT( setOn( bool ) ) ); 134 d->tbPlay, SLOT( setOn(bool) ) );
135 connect( mediaPlayerState, SIGNAL( loopingToggled( bool ) ), 135 connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ),
136 d->tbLoop, SLOT( setOn( bool ) ) ); 136 d->tbLoop, SLOT( setOn(bool) ) );
137 connect( mediaPlayerState, SIGNAL( shuffledToggled( bool ) ), 137 connect( mediaPlayerState, SIGNAL( shuffledToggled(bool) ),
138 d->tbShuffle, SLOT( setOn( bool ) ) ); 138 d->tbShuffle, SLOT( setOn(bool) ) );
139 connect( d->selectedFiles, SIGNAL( doubleClicked( QListViewItem *) ), 139 connect( d->selectedFiles, SIGNAL( doubleClicked(QListViewItem*) ),
140 this, SLOT( playIt( QListViewItem *) ) ); 140 this, SLOT( playIt(QListViewItem*) ) );
141 connect ( gammaSlider, SIGNAL( valueChanged( int ) ), 141 connect ( gammaSlider, SIGNAL( valueChanged(int) ),
142 mediaPlayerState, SLOT( setVideoGamma( int ) ) ); 142 mediaPlayerState, SLOT( setVideoGamma(int) ) );
143 143
144 connect( this, SIGNAL(skinSelected() ), 144 connect( this, SIGNAL(skinSelected() ),
145 m_mp, SLOT( reloadSkins() ) ); 145 m_mp, SLOT( reloadSkins() ) );
146 146
147 // see which skins are installed 147 // see which skins are installed
148 populateSkinsMenu(); 148 populateSkinsMenu();
149 initializeStates(); 149 initializeStates();
150 150
151 channel = new QCopChannel( "QPE/Application/opieplayer2", this ); 151 channel = new QCopChannel( "QPE/Application/opieplayer2", this );
152 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), 152 connect( channel, SIGNAL(received(const QCString&,const QByteArray&)),
153 this, SLOT( qcopReceive(const QCString&, const QByteArray&)) ); 153 this, SLOT( qcopReceive(const QCString&,const QByteArray&)) );
154 154
155 155
156 cfg.setGroup("PlayList"); 156 cfg.setGroup("PlayList");
157 QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "default"); 157 QString currentPlaylist = cfg.readEntry( "CurrentPlaylist", "default");
158 loadList(DocLnk( currentPlaylist ) ); 158 loadList(DocLnk( currentPlaylist ) );
159 159
@@ -500,16 +500,16 @@ void PlayListWidget::addToSelection( QListViewItem *it) {
500 500
501 501
502void PlayListWidget::tabChanged(QWidget *) { 502void PlayListWidget::tabChanged(QWidget *) {
503 503
504 d->tbPlay->setEnabled( true ); 504 d->tbPlay->setEnabled( true );
505 505
506 disconnect( audioView, SIGNAL( itemsSelected( bool ) ), 506 disconnect( audioView, SIGNAL( itemsSelected(bool) ),
507 d->tbPlay, SLOT( setEnabled( bool ) ) ); 507 d->tbPlay, SLOT( setEnabled(bool) ) );
508 disconnect( videoView, SIGNAL( itemsSelected( bool ) ), 508 disconnect( videoView, SIGNAL( itemsSelected(bool) ),
509 d->tbPlay, SLOT( setEnabled( bool ) ) ); 509 d->tbPlay, SLOT( setEnabled(bool) ) );
510 510
511 currentFileListView = 0; 511 currentFileListView = 0;
512 512
513 switch ( currentTab() ) { 513 switch ( currentTab() ) {
514 case CurrentPlayList: 514 case CurrentPlayList:
515 { 515 {
@@ -529,14 +529,14 @@ void PlayListWidget::tabChanged(QWidget *) {
529 if( !tbDeletePlaylist->isHidden() ) { 529 if( !tbDeletePlaylist->isHidden() ) {
530 tbDeletePlaylist->hide(); 530 tbDeletePlaylist->hide();
531 } 531 }
532 d->tbRemoveFromList->setEnabled(FALSE); 532 d->tbRemoveFromList->setEnabled(FALSE);
533 d->tbAddToList->setEnabled(TRUE); 533 d->tbAddToList->setEnabled(TRUE);
534 534
535 connect( audioView, SIGNAL( itemsSelected( bool ) ), 535 connect( audioView, SIGNAL( itemsSelected(bool) ),
536 d->tbPlay, SLOT( setEnabled( bool ) ) ); 536 d->tbPlay, SLOT( setEnabled(bool) ) );
537 537
538 d->tbPlay->setEnabled( audioView->hasSelection() ); 538 d->tbPlay->setEnabled( audioView->hasSelection() );
539 539
540 currentFileListView = audioView; 540 currentFileListView = audioView;
541 } 541 }
542 break; 542 break;
@@ -546,14 +546,14 @@ void PlayListWidget::tabChanged(QWidget *) {
546 if( !tbDeletePlaylist->isHidden() ) { 546 if( !tbDeletePlaylist->isHidden() ) {
547 tbDeletePlaylist->hide(); 547 tbDeletePlaylist->hide();
548 } 548 }
549 d->tbRemoveFromList->setEnabled(FALSE); 549 d->tbRemoveFromList->setEnabled(FALSE);
550 d->tbAddToList->setEnabled(TRUE); 550 d->tbAddToList->setEnabled(TRUE);
551 551
552 connect( videoView, SIGNAL( itemsSelected( bool ) ), 552 connect( videoView, SIGNAL( itemsSelected(bool) ),
553 d->tbPlay, SLOT( setEnabled( bool ) ) ); 553 d->tbPlay, SLOT( setEnabled(bool) ) );
554 554
555 d->tbPlay->setEnabled( videoView->hasSelection() ); 555 d->tbPlay->setEnabled( videoView->hasSelection() );
556 556
557 currentFileListView = videoView; 557 currentFileListView = videoView;
558 } 558 }
559 break; 559 break;