Diffstat (limited to 'core/multimedia/opieplayer/playlistselection.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/playlistselection.cpp | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/core/multimedia/opieplayer/playlistselection.cpp b/core/multimedia/opieplayer/playlistselection.cpp index a82b594..2c62e86 100644 --- a/core/multimedia/opieplayer/playlistselection.cpp +++ b/core/multimedia/opieplayer/playlistselection.cpp @@ -35,4 +35,4 @@ public: PlayListSelectionItem( QListView *parent, const DocLnk *f ) : QListViewItem( parent ), fl( f ) { - setText( 0, f->name() ); - setPixmap( 0, f->pixmap() ); + setText( 0, f->name() ); + setPixmap( 0, f->pixmap() ); } @@ -52,6 +52,8 @@ PlayListSelection::PlayListSelection( QWidget *parent, const char *name ) { -#ifdef USE_PLAYLIST_BACKGROUND +// #ifdef USE_PLAYLIST_BACKGROUND setStaticBackground( TRUE ); - setBackgroundPixmap( Resource::loadPixmap( "mpegplayer/background" ) ); -#endif +// setBackgroundPixmap( Resource::loadPixmap( "mpegplayer/background" ) ); + setBackgroundPixmap( Resource::loadPixmap( "opielogo" ) ); +// #endif + addColumn("Title",236); setAllColumnsShowFocus( TRUE ); @@ -67,10 +69,11 @@ PlayListSelection::~PlayListSelection() { -#ifdef USE_PLAYLIST_BACKGROUND +// #ifdef USE_PLAYLIST_BACKGROUND void PlayListSelection::drawBackground( QPainter *p, const QRect &r ) { p->fillRect( r, QBrush( white ) ); - QImage logo = Resource::loadImage( "mpegplayer/background" ); +// QImage logo = Resource::loadImage( "mpegplayer/background" ); + QImage logo = Resource::loadImage( "opielogo" ); if ( !logo.isNull() ) - p->drawImage( (width() - logo.width()) / 2, (height() - logo.height()) / 2, logo ); + p->drawImage( (width() - logo.width()) / 2, (height() - logo.height()) / 2, logo ); } -#endif +// #endif @@ -79,8 +82,8 @@ void PlayListSelection::contentsMouseMoveEvent( QMouseEvent *event ) { if ( event->state() == QMouseEvent::LeftButton ) { - QListViewItem *currentItem = selectedItem(); - QListViewItem *itemUnder = itemAt( QPoint( event->pos().x(), event->pos().y() - contentsY() ) ); - if ( currentItem && currentItem->itemAbove() == itemUnder ) - moveSelectedUp(); - else if ( currentItem && currentItem->itemBelow() == itemUnder ) - moveSelectedDown(); + QListViewItem *currentItem = selectedItem(); + QListViewItem *itemUnder = itemAt( QPoint( event->pos().x(), event->pos().y() - contentsY() ) ); + if ( currentItem && currentItem->itemAbove() == itemUnder ) + moveSelectedUp(); + else if ( currentItem && currentItem->itemBelow() == itemUnder ) + moveSelectedDown(); } @@ -92,3 +95,3 @@ const DocLnk *PlayListSelection::current() { if ( item ) - return item->file(); + return item->file(); return NULL; @@ -110,3 +113,3 @@ void PlayListSelection::removeSelected() { if ( item ) - delete item; + delete item; setSelected( currentItem(), TRUE ); @@ -119,3 +122,3 @@ void PlayListSelection::moveSelectedUp() { if ( item && item->itemAbove() ) - item->itemAbove()->moveItem( item ); + item->itemAbove()->moveItem( item ); ensureItemVisible( selectedItem() ); @@ -137,3 +140,3 @@ bool PlayListSelection::prev() { else - return FALSE; + return FALSE; ensureItemVisible( selectedItem() ); @@ -148,3 +151,3 @@ bool PlayListSelection::next() { else - return FALSE; + return FALSE; ensureItemVisible( selectedItem() ); @@ -159,3 +162,3 @@ bool PlayListSelection::first() { else - return FALSE; + return FALSE; ensureItemVisible( selectedItem() ); @@ -169,3 +172,3 @@ bool PlayListSelection::last() { while ( ( item = item->nextSibling() ) ) - prevItem = item; + prevItem = item; if ( prevItem ) @@ -173,3 +176,3 @@ bool PlayListSelection::last() { else - return FALSE; + return FALSE; ensureItemVisible( selectedItem() ); |