author | bipolar <bipolar> | 2002-03-03 17:13:17 (UTC) |
---|---|---|
committer | bipolar <bipolar> | 2002-03-03 17:13:17 (UTC) |
commit | a99347380a9006ec81a9dba2340d6aaab690a86e (patch) (unidiff) | |
tree | 73fdc2eff476fba2113172ed881dd64a4031def6 /core/multimedia/opieplayer/playlistselection.cpp | |
parent | 0e245156b28b70be5cd98a58a9256fe5e2739562 (diff) | |
download | opie-a99347380a9006ec81a9dba2340d6aaab690a86e.zip opie-a99347380a9006ec81a9dba2340d6aaab690a86e.tar.gz opie-a99347380a9006ec81a9dba2340d6aaab690a86e.tar.bz2 |
commited by ljp (llornkcor) reverted to qpe's interface for compatibility. Added playlist features:
save, remove, and have different ones. Uncommented code for background image and added opielogo.
Diffstat (limited to 'core/multimedia/opieplayer/playlistselection.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/playlistselection.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/multimedia/opieplayer/playlistselection.cpp b/core/multimedia/opieplayer/playlistselection.cpp index 2c62e86..d70df51 100644 --- a/core/multimedia/opieplayer/playlistselection.cpp +++ b/core/multimedia/opieplayer/playlistselection.cpp | |||
@@ -34,51 +34,51 @@ class PlayListSelectionItem : public QListViewItem { | |||
34 | public: | 34 | public: |
35 | PlayListSelectionItem( QListView *parent, const DocLnk *f ) : QListViewItem( parent ), fl( f ) { | 35 | PlayListSelectionItem( QListView *parent, const DocLnk *f ) : QListViewItem( parent ), fl( f ) { |
36 | setText( 0, f->name() ); | 36 | setText( 0, f->name() ); |
37 | setPixmap( 0, f->pixmap() ); | 37 | setPixmap( 0, f->pixmap() ); |
38 | } | 38 | } |
39 | 39 | ||
40 | ~PlayListSelectionItem() { | 40 | ~PlayListSelectionItem() { |
41 | }; | 41 | }; |
42 | 42 | ||
43 | const DocLnk *file() const { return fl; } | 43 | const DocLnk *file() const { return fl; } |
44 | 44 | ||
45 | private: | 45 | private: |
46 | const DocLnk *fl; | 46 | const DocLnk *fl; |
47 | }; | 47 | }; |
48 | 48 | ||
49 | 49 | ||
50 | PlayListSelection::PlayListSelection( QWidget *parent, const char *name ) | 50 | PlayListSelection::PlayListSelection( QWidget *parent, const char *name ) |
51 | : QListView( parent, name ) | 51 | : QListView( parent, name ) |
52 | { | 52 | { |
53 | // #ifdef USE_PLAYLIST_BACKGROUND | 53 | // #ifdef USE_PLAYLIST_BACKGROUND |
54 | setStaticBackground( TRUE ); | 54 | setStaticBackground( TRUE ); |
55 | // setBackgroundPixmap( Resource::loadPixmap( "mpegplayer/background" ) ); | 55 | // setBackgroundPixmap( Resource::loadPixmap( "mpegplayer/background" ) ); |
56 | setBackgroundPixmap( Resource::loadPixmap( "opielogo" ) ); | 56 | setBackgroundPixmap( Resource::loadPixmap( "opielogo" ) ); |
57 | // #endif | 57 | // #endif |
58 | addColumn("Title",236); | 58 | // addColumn("Title",236); |
59 | setAllColumnsShowFocus( TRUE ); | 59 | // setAllColumnsShowFocus( TRUE ); |
60 | addColumn( tr( "Playlist Selection" ) ); | 60 | addColumn( tr( "Playlist Selection" ) ); |
61 | header()->hide(); | 61 | header()->hide(); |
62 | setSorting( -1, FALSE ); | 62 | setSorting( -1, FALSE ); |
63 | } | 63 | } |
64 | 64 | ||
65 | 65 | ||
66 | PlayListSelection::~PlayListSelection() { | 66 | PlayListSelection::~PlayListSelection() { |
67 | } | 67 | } |
68 | 68 | ||
69 | 69 | ||
70 | // #ifdef USE_PLAYLIST_BACKGROUND | 70 | // #ifdef USE_PLAYLIST_BACKGROUND |
71 | void PlayListSelection::drawBackground( QPainter *p, const QRect &r ) { | 71 | void PlayListSelection::drawBackground( QPainter *p, const QRect &r ) { |
72 | p->fillRect( r, QBrush( white ) ); | 72 | p->fillRect( r, QBrush( white ) ); |
73 | // QImage logo = Resource::loadImage( "mpegplayer/background" ); | 73 | // QImage logo = Resource::loadImage( "mpegplayer/background" ); |
74 | QImage logo = Resource::loadImage( "opielogo" ); | 74 | QImage logo = Resource::loadImage( "opielogo" ); |
75 | if ( !logo.isNull() ) | 75 | if ( !logo.isNull() ) |
76 | p->drawImage( (width() - logo.width()) / 2, (height() - logo.height()) / 2, logo ); | 76 | p->drawImage( (width() - logo.width()) / 2, (height() - logo.height()) / 2, logo ); |
77 | } | 77 | } |
78 | // #endif | 78 | // #endif |
79 | 79 | ||
80 | 80 | ||
81 | void PlayListSelection::contentsMouseMoveEvent( QMouseEvent *event ) { | 81 | void PlayListSelection::contentsMouseMoveEvent( QMouseEvent *event ) { |
82 | if ( event->state() == QMouseEvent::LeftButton ) { | 82 | if ( event->state() == QMouseEvent::LeftButton ) { |
83 | QListViewItem *currentItem = selectedItem(); | 83 | QListViewItem *currentItem = selectedItem(); |
84 | QListViewItem *itemUnder = itemAt( QPoint( event->pos().x(), event->pos().y() - contentsY() ) ); | 84 | QListViewItem *itemUnder = itemAt( QPoint( event->pos().x(), event->pos().y() - contentsY() ) ); |