Diffstat (limited to 'core/multimedia/opieplayer/playlistwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 47 |
1 files changed, 26 insertions, 21 deletions
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp index 4e1543e..269aed8 100644 --- a/core/multimedia/opieplayer/playlistwidget.cpp +++ b/core/multimedia/opieplayer/playlistwidget.cpp | |||
@@ -39,7 +39,7 @@ | |||
39 | #include <qtabwidget.h> | 39 | #include <qtabwidget.h> |
40 | #include <qlistview.h> | 40 | #include <qlistview.h> |
41 | #include <qpoint.h> | 41 | #include <qpoint.h> |
42 | #include <qtimer.h> | 42 | //#include <qtimer.h> |
43 | 43 | ||
44 | #include "playlistselection.h" | 44 | #include "playlistselection.h" |
45 | #include "playlistwidget.h" | 45 | #include "playlistwidget.h" |
@@ -98,8 +98,8 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
98 | d = new PlayListWidgetPrivate; | 98 | d = new PlayListWidgetPrivate; |
99 | d->setDocumentUsed = FALSE; | 99 | d->setDocumentUsed = FALSE; |
100 | d->current = NULL; | 100 | d->current = NULL; |
101 | menuTimer = new QTimer( this ,"menu timer"), | 101 | // menuTimer = new QTimer( this ,"menu timer"), |
102 | connect( menuTimer, SIGNAL( timeout() ), SLOT( addSelected() ) ); | 102 | // connect( menuTimer, SIGNAL( timeout() ), SLOT( addSelected() ) ); |
103 | 103 | ||
104 | setBackgroundMode( PaletteButton ); | 104 | setBackgroundMode( PaletteButton ); |
105 | 105 | ||
@@ -204,12 +204,14 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
204 | for ( ; dit.current(); ++dit ) { | 204 | for ( ; dit.current(); ++dit ) { |
205 | QListViewItem * newItem; | 205 | QListViewItem * newItem; |
206 | if(dit.current()->file().find("/mnt/cf") != -1 ) storage="CF"; | 206 | if(dit.current()->file().find("/mnt/cf") != -1 ) storage="CF"; |
207 | else if(dit.current()->file().find("/mnt/hda") != -1 ) storage="CF"; | ||
207 | else if(dit.current()->file().find("/mnt/card") != -1 ) storage="SD"; | 208 | else if(dit.current()->file().find("/mnt/card") != -1 ) storage="SD"; |
208 | else storage="RAM"; | 209 | else storage="RAM"; |
209 | 210 | if ( QFile( dit.current()->file()).exists() ) { | |
210 | newItem= /*(void)*/ new QListViewItem( audioView, dit.current()->name(), QString::number( QFile( dit.current()->file()).size() ), storage); | 211 | newItem= /*(void)*/ new QListViewItem( audioView, dit.current()->name(), QString::number( QFile( dit.current()->file()).size() ), storage); |
211 | newItem->setPixmap(0, Resource::loadPixmap( "mpegplayer/musicfile" )); | 212 | newItem->setPixmap(0, Resource::loadPixmap( "mpegplayer/musicfile" )); |
212 | } | 213 | } |
214 | } | ||
213 | // videowidget | 215 | // videowidget |
214 | 216 | ||
215 | QWidget *vTab; | 217 | QWidget *vTab; |
@@ -229,12 +231,15 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
229 | QListIterator<DocLnk> Vdit( vFiles.children() ); | 231 | QListIterator<DocLnk> Vdit( vFiles.children() ); |
230 | for ( ; Vdit.current(); ++Vdit ) { | 232 | for ( ; Vdit.current(); ++Vdit ) { |
231 | if( Vdit.current()->file().find("/mnt/cf") != -1 ) storage="CF"; | 233 | if( Vdit.current()->file().find("/mnt/cf") != -1 ) storage="CF"; |
234 | else if( Vdit.current()->file().find("/mnt/hda") != -1 ) storage="CF"; | ||
232 | else if( Vdit.current()->file().find("/mnt/card") != -1 ) storage="SD"; | 235 | else if( Vdit.current()->file().find("/mnt/card") != -1 ) storage="SD"; |
233 | else storage="RAM"; | 236 | else storage="RAM"; |
234 | QListViewItem * newItem; | 237 | QListViewItem * newItem; |
238 | if ( QFile( Vdit.current()->file()).exists() ) { | ||
235 | newItem= /*(void)*/ new QListViewItem( videoView, Vdit.current()->name(), QString::number( QFile( Vdit.current()->file()).size() ), storage); | 239 | newItem= /*(void)*/ new QListViewItem( videoView, Vdit.current()->name(), QString::number( QFile( Vdit.current()->file()).size() ), storage); |
236 | newItem->setPixmap(0, Resource::loadPixmap( "mpegplayer/videofile" )); | 240 | newItem->setPixmap(0, Resource::loadPixmap( "mpegplayer/videofile" )); |
237 | } | 241 | } |
242 | } | ||
238 | 243 | ||
239 | 244 | ||
240 | // d->tbPlay = new ToolButton( vbox1, tr( "Play" ), "mpegplayer/play", mediaPlayerState, SLOT(setPlaying(bool)), TRUE ); | 245 | // d->tbPlay = new ToolButton( vbox1, tr( "Play" ), "mpegplayer/play", mediaPlayerState, SLOT(setPlaying(bool)), TRUE ); |
@@ -663,28 +668,28 @@ void PlayListWidget::tabChanged(QWidget *widg) { | |||
663 | }; | 668 | }; |
664 | } | 669 | } |
665 | 670 | ||
666 | void PlayListWidget::cancelMenuTimer() { | 671 | // void PlayListWidget::cancelMenuTimer() { |
667 | if( menuTimer->isActive() ) | 672 | // if( menuTimer->isActive() ) |
668 | menuTimer->stop(); | 673 | // menuTimer->stop(); |
669 | } | 674 | // } |
670 | 675 | ||
671 | void PlayListWidget::showFileMenu() { | 676 | // void PlayListWidget::showFileMenu() { |
672 | 677 | ||
673 | } | 678 | // } |
674 | 679 | ||
675 | void PlayListWidget::contentsMousePressEvent( QMouseEvent * e ) | 680 | // void PlayListWidget::contentsMousePressEvent( QMouseEvent * e ) |
676 | { | 681 | // { |
677 | // QListView::contentsMousePressEvent( e ); | 682 | // // QListView::contentsMousePressEvent( e ); |
678 | menuTimer->start( 750, TRUE ); | 683 | // menuTimer->start( 750, TRUE ); |
679 | } | 684 | // } |
680 | 685 | ||
681 | 686 | ||
682 | void PlayListWidget::contentsMouseReleaseEvent( QMouseEvent * e ) | 687 | // void PlayListWidget::contentsMouseReleaseEvent( QMouseEvent * e ) |
683 | { | 688 | // { |
684 | // QListView::contentsMouseReleaseEvent( e ); | 689 | // // QListView::contentsMouseReleaseEvent( e ); |
685 | menuTimer->stop(); | 690 | // menuTimer->stop(); |
686 | } | 691 | // } |
687 | // void PlayListWidget::setFullScreen() { | 692 | // // void PlayListWidget::setFullScreen() { |
688 | // mediaPlayerState->toggleFullscreen( ); | 693 | // mediaPlayerState->toggleFullscreen( ); |
689 | // } | 694 | // } |
690 | 695 | ||