summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/playlistwidget.cpp
authorllornkcor <llornkcor>2002-06-17 12:54:54 (UTC)
committer llornkcor <llornkcor>2002-06-17 12:54:54 (UTC)
commit282007e58a8a038a0db042341528510e73ac80fc (patch) (unidiff)
treef1a16c9a6a380bdc4217e9f92ac6ef6128d10717 /core/multimedia/opieplayer/playlistwidget.cpp
parent2917d7481dc8c1b053e3212a699e64948a90ec4c (diff)
downloadopie-282007e58a8a038a0db042341528510e73ac80fc.zip
opie-282007e58a8a038a0db042341528510e73ac80fc.tar.gz
opie-282007e58a8a038a0db042341528510e73ac80fc.tar.bz2
fixes for goofy crap going on
Diffstat (limited to 'core/multimedia/opieplayer/playlistwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp43
1 files changed, 25 insertions, 18 deletions
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp
index 200ec16..35208e4 100644
--- a/core/multimedia/opieplayer/playlistwidget.cpp
+++ b/core/multimedia/opieplayer/playlistwidget.cpp
@@ -157,7 +157,6 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
157 tbDeletePlaylist = new QPushButton( Resource::loadIconSet("trash"),"",bar,"close"); 157 tbDeletePlaylist = new QPushButton( Resource::loadIconSet("trash"),"",bar,"close");
158 tbDeletePlaylist->setFlat(TRUE); 158 tbDeletePlaylist->setFlat(TRUE);
159 tbDeletePlaylist->setFixedSize(20,20); 159 tbDeletePlaylist->setFixedSize(20,20);
160 connect(tbDeletePlaylist,(SIGNAL(released())),SLOT( deletePlaylist()));
161 160
162 d->tbAddToList = new ToolButton( bar, tr( "Add to Playlist" ), "opieplayer/add_to_playlist", 161 d->tbAddToList = new ToolButton( bar, tr( "Add to Playlist" ), "opieplayer/add_to_playlist",
163 this , SLOT(addSelected()) ); 162 this , SLOT(addSelected()) );
@@ -190,10 +189,8 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
190 menu->insertItem( tr( "View" ), pmView ); 189 menu->insertItem( tr( "View" ), pmView );
191 190
192 fullScreenButton = new QAction(tr("Full Screen"), Resource::loadPixmap("fullscreen"), QString::null, 0, this, 0); 191 fullScreenButton = new QAction(tr("Full Screen"), Resource::loadPixmap("fullscreen"), QString::null, 0, this, 0);
193 connect( fullScreenButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleFullscreen()) );
194 fullScreenButton->addTo(pmView); 192 fullScreenButton->addTo(pmView);
195 scaleButton = new QAction(tr("Scale"), Resource::loadPixmap("opieplayer/scale"), QString::null, 0, this, 0); 193 scaleButton = new QAction(tr("Scale"), Resource::loadPixmap("opieplayer/scale"), QString::null, 0, this, 0);
196 connect( scaleButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleScaled()) );
197 scaleButton->addTo(pmView); 194 scaleButton->addTo(pmView);
198 195
199 QVBox *vbox5 = new QVBox( this ); vbox5->setBackgroundMode( PaletteButton ); 196 QVBox *vbox5 = new QVBox( this ); vbox5->setBackgroundMode( PaletteButton );
@@ -224,8 +221,6 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
224 221
225 QPEApplication::setStylusOperation( d->selectedFiles->viewport(),QPEApplication::RightOnHold); 222 QPEApplication::setStylusOperation( d->selectedFiles->viewport(),QPEApplication::RightOnHold);
226 223
227 connect( d->selectedFiles, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)),
228 this,SLOT( playlistViewPressed(int, QListViewItem *, const QPoint&, int)) );
229 224
230 225
231 QVBox *stretch1 = new QVBox( vbox1 ); stretch1->setBackgroundMode( PaletteButton ); // add stretch 226 QVBox *stretch1 = new QVBox( vbox1 ); stretch1->setBackgroundMode( PaletteButton ); // add stretch
@@ -251,11 +246,6 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
251 tabWidget->insertTab(aTab,tr("Audio")); 246 tabWidget->insertTab(aTab,tr("Audio"));
252 247
253 QPEApplication::setStylusOperation( audioView->viewport(),QPEApplication::RightOnHold); 248 QPEApplication::setStylusOperation( audioView->viewport(),QPEApplication::RightOnHold);
254 connect( audioView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)),
255 this,SLOT( viewPressed(int, QListViewItem *, const QPoint&, int)) );
256
257 connect( audioView, SIGNAL( returnPressed( QListViewItem *)),
258 this,SLOT( playIt( QListViewItem *)) );
259 249
260// audioView 250// audioView
261// populateAudioView(); 251// populateAudioView();
@@ -277,11 +267,6 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
277 267
278 QPEApplication::setStylusOperation( videoView->viewport(),QPEApplication::RightOnHold); 268 QPEApplication::setStylusOperation( videoView->viewport(),QPEApplication::RightOnHold);
279 269
280 connect( videoView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)),
281 this,SLOT( viewPressed(int, QListViewItem *, const QPoint&, int)) );
282 connect( videoView, SIGNAL( returnPressed( QListViewItem *)),
283 this,SLOT( playIt( QListViewItem *)) );
284
285 tabWidget->insertTab( vTab,tr("Video")); 270 tabWidget->insertTab( vTab,tr("Video"));
286// populateVideoView(); 271// populateVideoView();
287 272
@@ -292,7 +277,6 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
292 playLists->setMinimumSize(233,260); 277 playLists->setMinimumSize(233,260);
293 tabWidget->insertTab(LTab,tr("Lists")); 278 tabWidget->insertTab(LTab,tr("Lists"));
294 279
295 connect( playLists, SIGNAL( fileSelected( const DocLnk &) ), this, SLOT( loadList( const DocLnk & ) ) );
296// connect( playLists, SIGNAL( newSelected( const DocLnk &) ), this, SLOT( newFile( const DocLnk & ) ) ); 280// connect( playLists, SIGNAL( newSelected( const DocLnk &) ), this, SLOT( newFile( const DocLnk & ) ) );
297 281
298// add the library area 282// add the library area
@@ -305,10 +289,30 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
305// connect( audioView, SIGNAL( clicked( QListViewItem *) ), this, SLOT( fauxPlay( QListViewItem *) ) ); 289// connect( audioView, SIGNAL( clicked( QListViewItem *) ), this, SLOT( fauxPlay( QListViewItem *) ) );
306// connect( videoView, SIGNAL( clicked( QListViewItem *) ), this, SLOT( fauxPlay( QListViewItem *) ) ); 290// connect( videoView, SIGNAL( clicked( QListViewItem *) ), this, SLOT( fauxPlay( QListViewItem *) ) );
307 291
308 connect( audioView, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( addToSelection( QListViewItem *) ) ); 292 connect(tbDeletePlaylist,(SIGNAL(released())),SLOT( deletePlaylist()));
293 connect( fullScreenButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleFullscreen()) );
294 connect( scaleButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleScaled()) );
295 connect( d->selectedFiles, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)),
296 this,SLOT( playlistViewPressed(int, QListViewItem *, const QPoint&, int)) );
297
298 connect( audioView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)),
299 this,SLOT( viewPressed(int, QListViewItem *, const QPoint&, int)) );
300
301 connect( audioView, SIGNAL( returnPressed( QListViewItem *)),
302 this,SLOT( playIt( QListViewItem *)) );
303 connect( audioView, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( addToSelection( QListViewItem *) ) );
304
305 connect( videoView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)),
306 this,SLOT( viewPressed(int, QListViewItem *, const QPoint&, int)) );
307 connect( videoView, SIGNAL( returnPressed( QListViewItem *)),
308 this,SLOT( playIt( QListViewItem *)) );
309 connect( videoView, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( addToSelection( QListViewItem *) ) ); 309 connect( videoView, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( addToSelection( QListViewItem *) ) );
310 310
311 connect( playLists, SIGNAL( fileSelected( const DocLnk &) ), this, SLOT( loadList( const DocLnk & ) ) );
312
313
311 connect( tabWidget, SIGNAL (currentChanged(QWidget*)),this,SLOT(tabChanged(QWidget*))); 314 connect( tabWidget, SIGNAL (currentChanged(QWidget*)),this,SLOT(tabChanged(QWidget*)));
315
312 connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), d->tbPlay, SLOT( setOn( bool ) ) ); 316 connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), d->tbPlay, SLOT( setOn( bool ) ) );
313 connect( mediaPlayerState, SIGNAL( loopingToggled( bool ) ), d->tbLoop, SLOT( setOn( bool ) ) ); 317 connect( mediaPlayerState, SIGNAL( loopingToggled( bool ) ), d->tbLoop, SLOT( setOn( bool ) ) );
314 connect( mediaPlayerState, SIGNAL( shuffledToggled( bool ) ), d->tbShuffle, SLOT( setOn( bool ) ) ); 318 connect( mediaPlayerState, SIGNAL( shuffledToggled( bool ) ), d->tbShuffle, SLOT( setOn( bool ) ) );
@@ -752,7 +756,9 @@ void PlayListWidget::removeSelected() {
752 756
753void PlayListWidget::playIt( QListViewItem *it) { 757void PlayListWidget::playIt( QListViewItem *it) {
754// d->setDocumentUsed = FALSE; 758// d->setDocumentUsed = FALSE;
755 mediaPlayerState->setPlaying(FALSE); 759// mediaPlayerState->curPosition =0;
760 qDebug("playIt");
761 mediaPlayerState->setPlaying(FALSE);
756 mediaPlayerState->setPlaying(TRUE); 762 mediaPlayerState->setPlaying(TRUE);
757 d->selectedFiles->unSelect(); 763 d->selectedFiles->unSelect();
758} 764}
@@ -835,6 +841,7 @@ void PlayListWidget::btnPlay(bool b) {
835 switch ( tabWidget->currentPageIndex()) { 841 switch ( tabWidget->currentPageIndex()) {
836 case 0: 842 case 0:
837 { 843 {
844
838 mediaPlayerState->setPlaying(b); 845 mediaPlayerState->setPlaying(b);
839 } 846 }
840 break; 847 break;