summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/playlistselection.cpp
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/playlistselection.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/playlistselection.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/core/multimedia/opieplayer/playlistselection.cpp b/core/multimedia/opieplayer/playlistselection.cpp
index d70df51..d6aff66 100644
--- a/core/multimedia/opieplayer/playlistselection.cpp
+++ b/core/multimedia/opieplayer/playlistselection.cpp
@@ -41,48 +41,51 @@ public:
41 }; 41 };
42 42
43 const DocLnk *file() const { return fl; } 43 const DocLnk *file() const { return fl; }
44 44
45private: 45private:
46 const DocLnk *fl; 46 const DocLnk *fl;
47}; 47};
48 48
49 49
50PlayListSelection::PlayListSelection( QWidget *parent, const char *name ) 50PlayListSelection::PlayListSelection( QWidget *parent, const char *name )
51 : QListView( parent, name ) 51 : QListView( parent, name )
52{ 52{
53 qDebug("starting playlistselector");
53// #ifdef USE_PLAYLIST_BACKGROUND 54// #ifdef USE_PLAYLIST_BACKGROUND
54 setStaticBackground( TRUE ); 55// setStaticBackground( TRUE );
55// setBackgroundPixmap( Resource::loadPixmap( "mpegplayer/background" ) ); 56// setBackgroundPixmap( Resource::loadPixmap( "mpegplayer/background" ) );
56 setBackgroundPixmap( Resource::loadPixmap( "opielogo" ) ); 57
58// setBackgroundPixmap( Resource::loadPixmap( "opielogo" ) );
57// #endif 59// #endif
58// addColumn("Title",236); 60// addColumn("Title",236);
59// setAllColumnsShowFocus( TRUE ); 61// setAllColumnsShowFocus( TRUE );
60 addColumn( tr( "Playlist Selection" ) ); 62 addColumn( tr( "Playlist Selection" ) );
61 header()->hide(); 63 header()->hide();
62 setSorting( -1, FALSE ); 64 setSorting( -1, FALSE );
63} 65}
64 66
65 67
66PlayListSelection::~PlayListSelection() { 68PlayListSelection::~PlayListSelection() {
67} 69}
68 70
69 71
70// #ifdef USE_PLAYLIST_BACKGROUND 72// #ifdef USE_PLAYLIST_BACKGROUND
71void PlayListSelection::drawBackground( QPainter *p, const QRect &r ) { 73void PlayListSelection::drawBackground( QPainter *p, const QRect &r ) {
72 p->fillRect( r, QBrush( white ) ); 74// qDebug("drawBackground");
73// QImage logo = Resource::loadImage( "mpegplayer/background" ); 75// p->fillRect( r, QBrush( white ) );
74 QImage logo = Resource::loadImage( "opielogo" ); 76// QImage logo = Resource::loadImage( "mpegplayer/background" );
75 if ( !logo.isNull() ) 77// // QImage logo = Resource::loadImage( "opielogo" );
76 p->drawImage( (width() - logo.width()) / 2, (height() - logo.height()) / 2, logo ); 78// if ( !logo.isNull() )
79// p->drawImage( (width() - logo.width()) / 2, (height() - logo.height()) / 2, logo );
77} 80}
78// #endif 81// #endif
79 82
80 83
81void PlayListSelection::contentsMouseMoveEvent( QMouseEvent *event ) { 84void PlayListSelection::contentsMouseMoveEvent( QMouseEvent *event ) {
82 if ( event->state() == QMouseEvent::LeftButton ) { 85 if ( event->state() == QMouseEvent::LeftButton ) {
83 QListViewItem *currentItem = selectedItem(); 86 QListViewItem *currentItem = selectedItem();
84 QListViewItem *itemUnder = itemAt( QPoint( event->pos().x(), event->pos().y() - contentsY() ) ); 87 QListViewItem *itemUnder = itemAt( QPoint( event->pos().x(), event->pos().y() - contentsY() ) );
85 if ( currentItem && currentItem->itemAbove() == itemUnder ) 88 if ( currentItem && currentItem->itemAbove() == itemUnder )
86 moveSelectedUp(); 89 moveSelectedUp();
87 else if ( currentItem && currentItem->itemBelow() == itemUnder ) 90 else if ( currentItem && currentItem->itemBelow() == itemUnder )
88 moveSelectedDown(); 91 moveSelectedDown();