author | simon <simon> | 2002-12-04 11:51:16 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-04 11:51:16 (UTC) |
commit | d75c4d9a27fcfc38ac3f9fd58f6b398809ec6a94 (patch) (unidiff) | |
tree | 48ef914d460feaaec1a29860067a5b84fb862ae6 | |
parent | df599e48ffde0e5272e511bba57363ac28a67b2d (diff) | |
download | opie-d75c4d9a27fcfc38ac3f9fd58f6b398809ec6a94.zip opie-d75c4d9a27fcfc38ac3f9fd58f6b398809ec6a94.tar.gz opie-d75c4d9a27fcfc38ac3f9fd58f6b398809ec6a94.tar.bz2 |
- scannedFiles is no more public
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistfileview.h | 4 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 20 |
2 files changed, 4 insertions, 20 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistfileview.h b/noncore/multimedia/opieplayer2/playlistfileview.h index abe1bb8..6eea2fc 100644 --- a/noncore/multimedia/opieplayer2/playlistfileview.h +++ b/noncore/multimedia/opieplayer2/playlistfileview.h | |||
@@ -9,16 +9,12 @@ class PlayListFileView : public PlayListView | |||
9 | { | 9 | { |
10 | Q_OBJECT | 10 | Q_OBJECT |
11 | public: | 11 | public: |
12 | PlayListFileView( const QString &mimeTypePattern, const QString &itemPixmapName, QWidget *parent, const char *name = 0 ); | 12 | PlayListFileView( const QString &mimeTypePattern, const QString &itemPixmapName, QWidget *parent, const char *name = 0 ); |
13 | virtual ~PlayListFileView(); | 13 | virtual ~PlayListFileView(); |
14 | 14 | ||
15 | // both temporarily accessible that way until the caller code has | ||
16 | // been migrated into this class | ||
17 | bool &scannedFiles() { return m_scannedFiles; } | ||
18 | |||
19 | public slots: | 15 | public slots: |
20 | void scanFiles(); | 16 | void scanFiles(); |
21 | void populateView(); | 17 | void populateView(); |
22 | 18 | ||
23 | private: | 19 | private: |
24 | QString m_mimeTypePattern; | 20 | QString m_mimeTypePattern; |
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index eb0606d..e754067 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -247,32 +247,26 @@ void PlayListWidget::playlistViewPressed( int mouse, QListViewItem *, const QPoi | |||
247 | 247 | ||
248 | void PlayListWidget::addAllToList() { | 248 | void PlayListWidget::addAllToList() { |
249 | 249 | ||
250 | // QTime t; | 250 | // QTime t; |
251 | // t.start(); | 251 | // t.start(); |
252 | 252 | ||
253 | if(!audioView->scannedFiles()) { | 253 | audioView->populateView(); |
254 | if(audioView->childCount() < 1) | ||
255 | audioView->populateView(); | ||
256 | } | ||
257 | 254 | ||
258 | QListViewItemIterator audioIt( audioView ); | 255 | QListViewItemIterator audioIt( audioView ); |
259 | DocLnk lnk; | 256 | DocLnk lnk; |
260 | QString filename; | 257 | QString filename; |
261 | // iterate through all items of the listview | 258 | // iterate through all items of the listview |
262 | for ( ; audioIt.current(); ++audioIt ) { | 259 | for ( ; audioIt.current(); ++audioIt ) { |
263 | filename = audioIt.current()->text(3); | 260 | filename = audioIt.current()->text(3); |
264 | lnk.setName( QFileInfo(filename).baseName() ); //sets name | 261 | lnk.setName( QFileInfo(filename).baseName() ); //sets name |
265 | lnk.setFile( filename ); //sets file name | 262 | lnk.setFile( filename ); //sets file name |
266 | d->selectedFiles->addToSelection( lnk); | 263 | d->selectedFiles->addToSelection( lnk); |
267 | } | 264 | } |
268 | 265 | ||
269 | if(!videoView->scannedFiles()) { | 266 | videoView->populateView(); |
270 | if(videoView->childCount() < 1) | ||
271 | videoView->populateView(); | ||
272 | } | ||
273 | 267 | ||
274 | QListViewItemIterator videoIt( videoView ); | 268 | QListViewItemIterator videoIt( videoView ); |
275 | for ( ; videoIt.current(); ++videoIt ) { | 269 | for ( ; videoIt.current(); ++videoIt ) { |
276 | filename = videoIt.current()->text(3); | 270 | filename = videoIt.current()->text(3); |
277 | lnk.setName( QFileInfo(filename).baseName() ); //sets name | 271 | lnk.setName( QFileInfo(filename).baseName() ); //sets name |
278 | lnk.setFile( filename ); //sets file name | 272 | lnk.setFile( filename ); //sets file name |
@@ -307,16 +301,13 @@ void PlayListWidget::addAllToList() { | |||
307 | d->selectedFiles->first(); | 301 | d->selectedFiles->first(); |
308 | } | 302 | } |
309 | 303 | ||
310 | 304 | ||
311 | void PlayListWidget::addAllMusicToList() { | 305 | void PlayListWidget::addAllMusicToList() { |
312 | 306 | ||
313 | if(!audioView->scannedFiles()) { | 307 | audioView->populateView(); |
314 | if(audioView->childCount() < 1) | ||
315 | audioView->populateView(); | ||
316 | } | ||
317 | 308 | ||
318 | QListViewItemIterator audioIt( audioView ); | 309 | QListViewItemIterator audioIt( audioView ); |
319 | DocLnk lnk; | 310 | DocLnk lnk; |
320 | QString filename; | 311 | QString filename; |
321 | // iterate through all items of the listview | 312 | // iterate through all items of the listview |
322 | for ( ; audioIt.current(); ++audioIt ) { | 313 | for ( ; audioIt.current(); ++audioIt ) { |
@@ -340,16 +331,13 @@ void PlayListWidget::addAllMusicToList() { | |||
340 | d->selectedFiles->first(); | 331 | d->selectedFiles->first(); |
341 | } | 332 | } |
342 | 333 | ||
343 | 334 | ||
344 | void PlayListWidget::addAllVideoToList() { | 335 | void PlayListWidget::addAllVideoToList() { |
345 | 336 | ||
346 | if(!videoView->scannedFiles()) { | 337 | videoView->populateView(); |
347 | if(videoView->childCount() < 1) | ||
348 | videoView->populateView(); | ||
349 | } | ||
350 | 338 | ||
351 | QListViewItemIterator videoIt( videoView ); | 339 | QListViewItemIterator videoIt( videoView ); |
352 | DocLnk lnk; | 340 | DocLnk lnk; |
353 | QString filename; | 341 | QString filename; |
354 | for ( ; videoIt.current(); ++videoIt ) { | 342 | for ( ; videoIt.current(); ++videoIt ) { |
355 | filename = videoIt.current()->text(3); | 343 | filename = videoIt.current()->text(3); |