From 9b30090fddf1cc2e8ffbff70b164213118106167 Mon Sep 17 00:00:00 2001 From: simon Date: Wed, 04 Dec 2002 11:03:26 +0000 Subject: - moving videoScan and audioScan into PlayListFileView --- (limited to 'noncore/multimedia') diff --git a/noncore/multimedia/opieplayer2/playlistfileview.cpp b/noncore/multimedia/opieplayer2/playlistfileview.cpp index 2726296..1e2ef89 100644 --- a/noncore/multimedia/opieplayer2/playlistfileview.cpp +++ b/noncore/multimedia/opieplayer2/playlistfileview.cpp @@ -4,7 +4,7 @@ #include PlayListFileView::PlayListFileView( const QString &mimeTypePattern, QWidget *parent, const char *name ) - : PlayListView( parent, name ), m_mimeTypePattern( mimeTypePattern ) + : PlayListView( parent, name ), m_mimeTypePattern( mimeTypePattern ), m_scannedFiles( false ) { addColumn( tr( "Title" ), 140); addColumn( tr( "Size" ), -1 ); diff --git a/noncore/multimedia/opieplayer2/playlistfileview.h b/noncore/multimedia/opieplayer2/playlistfileview.h index 08db929..4e17966 100644 --- a/noncore/multimedia/opieplayer2/playlistfileview.h +++ b/noncore/multimedia/opieplayer2/playlistfileview.h @@ -12,7 +12,10 @@ public: PlayListFileView( const QString &mimeTypePattern, QWidget *parent, const char *name = 0 ); virtual ~PlayListFileView(); + // both temporarily accessible that way until the caller code has + // been migrated into this class DocLnkSet &files() { return m_files; } + bool &scannedFiles() { return m_scannedFiles; } public slots: void scanFiles(); @@ -20,6 +23,7 @@ public slots: private: QString m_mimeTypePattern; DocLnkSet m_files; + bool m_scannedFiles; }; #endif // PLAYLISTFILEVIEW_H diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 93e7919..12b8a71 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp @@ -151,8 +151,6 @@ PlayListWidget::PlayListWidget( MediaPlayerState &mediaPlayerState, QWidget* par &mediaPlayerState, SLOT( setVideoGamma( int ) ) ); // see which skins are installed - videoScan=false; - audioScan=false; audioPopulated=false; videoPopulated=false; populateSkinsMenu(); @@ -254,7 +252,7 @@ void PlayListWidget::addAllToList() { // QTime t; // t.start(); - if(!audioScan) { + if(!audioView->scannedFiles()) { if(audioView->childCount() < 1) populateAudioView(); } @@ -270,7 +268,7 @@ void PlayListWidget::addAllToList() { d->selectedFiles->addToSelection( lnk); } - if(!videoScan) { + if(!videoView->scannedFiles()) { if(videoView->childCount() < 1) populateVideoView(); } @@ -314,7 +312,7 @@ void PlayListWidget::addAllToList() { void PlayListWidget::addAllMusicToList() { - if(!audioScan) { + if(!audioView->scannedFiles()) { if(audioView->childCount() < 1) populateAudioView(); } @@ -347,7 +345,7 @@ void PlayListWidget::addAllMusicToList() { void PlayListWidget::addAllVideoToList() { - if(!videoScan) { + if(!videoView->scannedFiles()) { if(videoView->childCount() < 1) populateVideoView(); } @@ -638,13 +636,13 @@ void PlayListWidget::playSelected() { void PlayListWidget::scanForAudio() { audioView->scanFiles(); - audioScan = true; + audioView->scannedFiles() = true; populateAudioView(); } void PlayListWidget::scanForVideo() { videoView->scanFiles(); - videoScan = true; + videoView->scannedFiles() = true; populateVideoView(); } @@ -652,7 +650,7 @@ void PlayListWidget::populateAudioView() { audioView->clear(); StorageInfo storageInfo; // const QList &fs = storageInfo.fileSystems(); - if(!audioScan) { + if(!audioView->scannedFiles()) { scanForAudio(); } @@ -695,7 +693,7 @@ void PlayListWidget::populateVideoView() { StorageInfo storageInfo; // const QList &fs = storageInfo.fileSystems(); - if(!videoScan ) { + if(!videoView->scannedFiles()) { scanForVideo(); } diff --git a/noncore/multimedia/opieplayer2/playlistwidget.h b/noncore/multimedia/opieplayer2/playlistwidget.h index e81ef3c..58efd47 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.h +++ b/noncore/multimedia/opieplayer2/playlistwidget.h @@ -94,7 +94,7 @@ signals: private: int defaultSkinIndex; - bool audioScan, videoScan, audioPopulated, videoPopulated; + bool audioPopulated, videoPopulated; void readm3u(const QString &); void readPls(const QString &); void initializeStates(); -- cgit v0.9.0.2