author | llornkcor <llornkcor> | 2003-01-19 23:11:02 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-01-19 23:11:02 (UTC) |
commit | 512e600c777643230a032e89f7446b4099f54a86 (patch) (side-by-side diff) | |
tree | 0a19e567b5acc6f44c5d5957fcaf097350f84a03 | |
parent | 4e9ddbd0da3de7d0d03d7a39f05643dec07cc2cf (diff) | |
download | opie-512e600c777643230a032e89f7446b4099f54a86.zip opie-512e600c777643230a032e89f7446b4099f54a86.tar.gz opie-512e600c777643230a032e89f7446b4099f54a86.tar.bz2 |
partly fix playing from audio and video views
-rw-r--r-- | core/multimedia/opieplayer/playlistselection.cpp | 11 | ||||
-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 22 |
2 files changed, 21 insertions, 12 deletions
diff --git a/core/multimedia/opieplayer/playlistselection.cpp b/core/multimedia/opieplayer/playlistselection.cpp index 85228a9..67187f8 100644 --- a/core/multimedia/opieplayer/playlistselection.cpp +++ b/core/multimedia/opieplayer/playlistselection.cpp @@ -60,13 +60,14 @@ PlayListSelection::PlayListSelection( QWidget *parent, const char *name ) // setBackgroundPixmap( Resource::loadPixmap( "launcher/opielogo" ) ); // #endif // addColumn("Title",236); // setAllColumnsShowFocus( TRUE ); addColumn( tr( "Playlist Selection" ) ); header()->hide(); - setSorting( -1, FALSE ); +// setSorting( -1, FALSE ); + // FIXME } PlayListSelection::~PlayListSelection() { } @@ -101,17 +102,17 @@ const DocLnk *PlayListSelection::current() { return NULL; } void PlayListSelection::addToSelection( const DocLnk &lnk ) { PlayListSelectionItem *item = new PlayListSelectionItem( this, new DocLnk( lnk ) ); - QListViewItem *current = selectedItem(); - if ( current ) - item->moveItem( current ); + QListViewItem *current = selectedItem(); + if ( current ) + item->moveItem( current ); setSelected( item, TRUE ); - ensureItemVisible( selectedItem() ); + ensureItemVisible( item); } void PlayListSelection::removeSelected() { QListViewItem *item = selectedItem(); if ( item ) diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp index 395037f..19c8056 100644 --- a/core/multimedia/opieplayer/playlistwidget.cpp +++ b/core/multimedia/opieplayer/playlistwidget.cpp @@ -256,12 +256,13 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) audioView->setColumnAlignment(1, Qt::AlignRight); audioView->setColumnAlignment(2, Qt::AlignRight); audioView->setAllColumnsShowFocus(TRUE); audioView->setMultiSelection( TRUE ); audioView->setSelectionMode( QListView::Extended); + audioView->setSorting( 3, TRUE ); tabWidget->insertTab(aTab,tr("Audio")); QPEApplication::setStylusOperation( audioView->viewport(),QPEApplication::RightOnHold); // audioView @@ -297,25 +298,31 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) connect( fullScreenButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleFullscreen()) ); connect( scaleButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleScaled()) ); connect( d->selectedFiles, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), this,SLOT( playlistViewPressed(int, QListViewItem *, const QPoint&, int)) ); + +///audioView connect( audioView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), this,SLOT( viewPressed(int, QListViewItem *, const QPoint&, int)) ); connect( audioView, SIGNAL( returnPressed( QListViewItem *)), this,SLOT( playIt( QListViewItem *)) ); connect( audioView, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( addToSelection( QListViewItem *) ) ); + +//videoView connect( videoView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), this,SLOT( viewPressed(int, QListViewItem *, const QPoint&, int)) ); connect( videoView, SIGNAL( returnPressed( QListViewItem *)), this,SLOT( playIt( QListViewItem *)) ); connect( videoView, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( addToSelection( QListViewItem *) ) ); + +//playlists connect( playLists, SIGNAL( fileSelected( const DocLnk &) ), this, SLOT( loadList( const DocLnk & ) ) ); connect( tabWidget, SIGNAL (currentChanged(QWidget*)),this,SLOT(tabChanged(QWidget*))); // connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), d->tbPlay, SLOT( setOn( bool ) ) ); @@ -804,30 +811,31 @@ void PlayListWidget::btnPlay(bool b) { // } } break; case 1: { qDebug("2"); +// d->selectedFiles->unSelect(); addToSelection( audioView->currentItem() ); - mediaPlayerState->setPlaying(b); - d->selectedFiles->removeSelected( ); - tabWidget->setCurrentPage(1); - d->selectedFiles->unSelect(); + mediaPlayerState->setPlaying(true); + d->selectedFiles->removeSelected( ); + d->selectedFiles->unSelect(); + tabWidget->setCurrentPage(1); insanityBool=FALSE; }// audioView->clearSelection(); break; case 2: { qDebug("3"); addToSelection( videoView->currentItem() ); - mediaPlayerState->setPlaying(b); - qApp->processEvents(); + mediaPlayerState->setPlaying(true); +// qApp->processEvents(); d->selectedFiles->removeSelected( ); - tabWidget->setCurrentPage(2); d->selectedFiles->unSelect(); + tabWidget->setCurrentPage(2); insanityBool=FALSE; }// videoView->clearSelection(); break; }; } |