summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-04 11:03:26 (UTC)
committer simon <simon>2002-12-04 11:03:26 (UTC)
commit9b30090fddf1cc2e8ffbff70b164213118106167 (patch) (side-by-side diff)
treea328c893928233cd0f17f1842d150ecf87530efe
parent63541c46776721ef5ae63903e5b40838c1c49a43 (diff)
downloadopie-9b30090fddf1cc2e8ffbff70b164213118106167.zip
opie-9b30090fddf1cc2e8ffbff70b164213118106167.tar.gz
opie-9b30090fddf1cc2e8ffbff70b164213118106167.tar.bz2
- moving videoScan and audioScan into PlayListFileView
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistfileview.cpp2
-rw-r--r--noncore/multimedia/opieplayer2/playlistfileview.h4
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp18
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.h2
4 files changed, 14 insertions, 12 deletions
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 <qpe/global.h>
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<FileSystem> &fs = storageInfo.fileSystems();
- if(!audioScan) {
+ if(!audioView->scannedFiles()) {
scanForAudio();
}
@@ -695,7 +693,7 @@ void PlayListWidget::populateVideoView() {
StorageInfo storageInfo;
// const QList<FileSystem> &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();