author | bipolar <bipolar> | 2002-03-08 05:26:53 (UTC) |
---|---|---|
committer | bipolar <bipolar> | 2002-03-08 05:26:53 (UTC) |
commit | b0222c051d3666a4215c6b7271daec2ea6f783a0 (patch) (unidiff) | |
tree | 5f4a081e37d25e8d1dcefe68069a89f7d89de4e7 | |
parent | 5bb6c01c2a9a40e5bff20a2725f6aacf85d16ef3 (diff) | |
download | opie-b0222c051d3666a4215c6b7271daec2ea6f783a0.zip opie-b0222c051d3666a4215c6b7271daec2ea6f783a0.tar.gz opie-b0222c051d3666a4215c6b7271daec2ea6f783a0.tar.bz2 |
ljp: added something I should have not taken out in the first place
-rw-r--r-- | core/multimedia/opieplayer/playlistselection.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/multimedia/opieplayer/playlistselection.cpp b/core/multimedia/opieplayer/playlistselection.cpp index d6aff66..4019d12 100644 --- a/core/multimedia/opieplayer/playlistselection.cpp +++ b/core/multimedia/opieplayer/playlistselection.cpp | |||
@@ -43,65 +43,65 @@ public: | |||
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 | qDebug("starting playlistselector"); | 53 | qDebug("starting playlistselector"); |
54 | // #ifdef USE_PLAYLIST_BACKGROUND | 54 | // #ifdef USE_PLAYLIST_BACKGROUND |
55 | // setStaticBackground( TRUE ); | 55 | // setStaticBackground( TRUE ); |
56 | // setBackgroundPixmap( Resource::loadPixmap( "mpegplayer/background" ) ); | 56 | // setBackgroundPixmap( Resource::loadPixmap( "mpegplayer/background" ) ); |
57 | 57 | ||
58 | // setBackgroundPixmap( Resource::loadPixmap( "opielogo" ) ); | 58 | // setBackgroundPixmap( Resource::loadPixmap( "opielogo" ) ); |
59 | // #endif | 59 | // #endif |
60 | // addColumn("Title",236); | 60 | // addColumn("Title",236); |
61 | // setAllColumnsShowFocus( TRUE ); | 61 | // setAllColumnsShowFocus( TRUE ); |
62 | addColumn( tr( "Playlist Selection" ) ); | 62 | addColumn( tr( "Playlist Selection" ) ); |
63 | header()->hide(); | 63 | header()->hide(); |
64 | setSorting( -1, FALSE ); | 64 | setSorting( -1, FALSE ); |
65 | } | 65 | } |
66 | 66 | ||
67 | 67 | ||
68 | PlayListSelection::~PlayListSelection() { | 68 | PlayListSelection::~PlayListSelection() { |
69 | } | 69 | } |
70 | 70 | ||
71 | 71 | ||
72 | // #ifdef USE_PLAYLIST_BACKGROUND | 72 | // #ifdef USE_PLAYLIST_BACKGROUND |
73 | void PlayListSelection::drawBackground( QPainter *p, const QRect &r ) { | 73 | void PlayListSelection::drawBackground( QPainter *p, const QRect &r ) { |
74 | // qDebug("drawBackground"); | 74 | // qDebug("drawBackground"); |
75 | // p->fillRect( r, QBrush( white ) ); | 75 | p->fillRect( r, QBrush( white ) ); |
76 | // QImage logo = Resource::loadImage( "mpegplayer/background" ); | 76 | // QImage logo = Resource::loadImage( "mpegplayer/background" ); |
77 | // // QImage logo = Resource::loadImage( "opielogo" ); | 77 | // // QImage logo = Resource::loadImage( "opielogo" ); |
78 | // if ( !logo.isNull() ) | 78 | // if ( !logo.isNull() ) |
79 | // p->drawImage( (width() - logo.width()) / 2, (height() - logo.height()) / 2, logo ); | 79 | // p->drawImage( (width() - logo.width()) / 2, (height() - logo.height()) / 2, logo ); |
80 | } | 80 | } |
81 | // #endif | 81 | // #endif |
82 | 82 | ||
83 | 83 | ||
84 | void PlayListSelection::contentsMouseMoveEvent( QMouseEvent *event ) { | 84 | void PlayListSelection::contentsMouseMoveEvent( QMouseEvent *event ) { |
85 | if ( event->state() == QMouseEvent::LeftButton ) { | 85 | if ( event->state() == QMouseEvent::LeftButton ) { |
86 | QListViewItem *currentItem = selectedItem(); | 86 | QListViewItem *currentItem = selectedItem(); |
87 | QListViewItem *itemUnder = itemAt( QPoint( event->pos().x(), event->pos().y() - contentsY() ) ); | 87 | QListViewItem *itemUnder = itemAt( QPoint( event->pos().x(), event->pos().y() - contentsY() ) ); |
88 | if ( currentItem && currentItem->itemAbove() == itemUnder ) | 88 | if ( currentItem && currentItem->itemAbove() == itemUnder ) |
89 | moveSelectedUp(); | 89 | moveSelectedUp(); |
90 | else if ( currentItem && currentItem->itemBelow() == itemUnder ) | 90 | else if ( currentItem && currentItem->itemBelow() == itemUnder ) |
91 | moveSelectedDown(); | 91 | moveSelectedDown(); |
92 | } | 92 | } |
93 | } | 93 | } |
94 | 94 | ||
95 | 95 | ||
96 | const DocLnk *PlayListSelection::current() { | 96 | const DocLnk *PlayListSelection::current() { |
97 | PlayListSelectionItem *item = (PlayListSelectionItem *)selectedItem(); | 97 | PlayListSelectionItem *item = (PlayListSelectionItem *)selectedItem(); |
98 | if ( item ) | 98 | if ( item ) |
99 | return item->file(); | 99 | return item->file(); |
100 | return NULL; | 100 | return NULL; |
101 | } | 101 | } |
102 | 102 | ||
103 | 103 | ||
104 | void PlayListSelection::addToSelection( const DocLnk &lnk ) { | 104 | void PlayListSelection::addToSelection( const DocLnk &lnk ) { |
105 | PlayListSelectionItem *item = new PlayListSelectionItem( this, new DocLnk( lnk ) ); | 105 | PlayListSelectionItem *item = new PlayListSelectionItem( this, new DocLnk( lnk ) ); |
106 | QListViewItem *current = selectedItem(); | 106 | QListViewItem *current = selectedItem(); |
107 | if ( current ) | 107 | if ( current ) |