author | simon <simon> | 2002-12-04 11:20:48 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-04 11:20:48 (UTC) |
commit | 84d5ca934e9cb8950d1efdb90ac3b00ce6d44e95 (patch) (side-by-side diff) | |
tree | bb84499e28cfb1d518e3cebf504eb9279257ced9 /noncore/multimedia/opieplayer2/playlistwidget.cpp | |
parent | 9b30090fddf1cc2e8ffbff70b164213118106167 (diff) | |
download | opie-84d5ca934e9cb8950d1efdb90ac3b00ce6d44e95.zip opie-84d5ca934e9cb8950d1efdb90ac3b00ce6d44e95.tar.gz opie-84d5ca934e9cb8950d1efdb90ac3b00ce6d44e95.tar.bz2 |
- merged popuplateAudioView and popuplateVideoView into one
PlayListFileView::popuplateView method
Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 72 |
1 files changed, 3 insertions, 69 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 12b8a71..460a0bf 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp @@ -649,74 +649,8 @@ void PlayListWidget::scanForVideo() { void PlayListWidget::populateAudioView() { - audioView->clear(); - StorageInfo storageInfo; - // const QList<FileSystem> &fs = storageInfo.fileSystems(); - if(!audioView->scannedFiles()) { - scanForAudio(); - } - - QListIterator<DocLnk> dit( audioView->files().children() ); - // QListIterator<FileSystem> it ( fs ); - audioView->clear(); - - QString storage; - for ( ; dit.current(); ++dit ) { -// // for( ; it.current(); ++it ){ -// const QString name = (*dit)->name(); -// const QString path = (*dit)->path(); -// if(dit.current()->file().find(path) != -1 ) { -// storage = name; -// // } -// } - - QListViewItem * newItem; - if ( QFile( dit.current()->file()).exists() || - dit.current()->file().left(4) == "http" ) { - long size; - if( dit.current()->file().left(4) == "http" ) - size=0; - else - size = QFile( dit.current()->file() ).size(); - - newItem= /*(void)*/ new QListViewItem( audioView, dit.current()->name(), - QString::number(size ), "" /*storage*/, - dit.current()->file() ); - newItem->setPixmap( 0, Resource::loadPixmap( "opieplayer2/musicfile" ) ); -// qDebug("<<<< "+dit.current()->file()); - } - } - audioPopulated=true; + audioView->populateView(); + audioPopulated = true; } - void PlayListWidget::populateVideoView() { - videoView->clear(); - StorageInfo storageInfo; - // const QList<FileSystem> &fs = storageInfo.fileSystems(); - - if(!videoView->scannedFiles()) { - scanForVideo(); - } - - QListIterator<DocLnk> Vdit( videoView->files().children() ); -// QListIterator<FileSystem> it ( fs ); - videoView->clear(); - QString storage, pathName; - for ( ; Vdit.current(); ++Vdit ) { -// // for( ; it.current(); ++it ) { -// const QString name = (*Vdit)->name(); -// const QString path = (*Vdit)->path(); -// if( Vdit.current()->file().find(path) != -1 ) { -// storage=name; -// pathName=path; -// // } -// } - - QListViewItem * newItem; - if ( QFile( Vdit.current()->file() ).exists() ) { - newItem= /*(void)*/ new QListViewItem( videoView, Vdit.current()->name(), - QString::number( QFile( Vdit.current()->file() ).size() ), - ""/*storage*/, Vdit.current()->file()); - newItem->setPixmap(0, Resource::loadPixmap( "opieplayer2/videofile" ) ); - } - } + videoView->populateView(); videoPopulated=true; |