author | llornkcor <llornkcor> | 2002-02-25 01:35:47 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-02-25 01:35:47 (UTC) |
commit | f180c1a5e8fc889ff1fb390d5cc94cdbc5085046 (patch) (unidiff) | |
tree | 5e9ea6f1313f4c33d57fb266523c1cfbe0826756 /core/multimedia/opieplayer/playlistselection.cpp | |
parent | c0446b55fc32b7fdea9f58db06e40da703f5e8ff (diff) | |
download | opie-f180c1a5e8fc889ff1fb390d5cc94cdbc5085046.zip opie-f180c1a5e8fc889ff1fb390d5cc94cdbc5085046.tar.gz opie-f180c1a5e8fc889ff1fb390d5cc94cdbc5085046.tar.bz2 |
fucked up- no workie.. back out
Diffstat (limited to 'core/multimedia/opieplayer/playlistselection.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/playlistselection.cpp | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/core/multimedia/opieplayer/playlistselection.cpp b/core/multimedia/opieplayer/playlistselection.cpp index f17ab6f..a82b594 100644 --- a/core/multimedia/opieplayer/playlistselection.cpp +++ b/core/multimedia/opieplayer/playlistselection.cpp | |||
@@ -1,5 +1,5 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of the Qtopia Environment. |
5 | ** | 5 | ** |
@@ -32,3 +32,2 @@ | |||
32 | 32 | ||
33 | |||
34 | class PlayListSelectionItem : public QListViewItem { | 33 | class PlayListSelectionItem : public QListViewItem { |
@@ -36,4 +35,4 @@ public: | |||
36 | PlayListSelectionItem( QListView *parent, const DocLnk *f ) : QListViewItem( parent ), fl( f ) { | 35 | PlayListSelectionItem( QListView *parent, const DocLnk *f ) : QListViewItem( parent ), fl( f ) { |
37 | setText( 0, f->name() ); | 36 | setText( 0, f->name() ); |
38 | setPixmap( 0, f->pixmap() ); | 37 | setPixmap( 0, f->pixmap() ); |
39 | } | 38 | } |
@@ -73,3 +72,3 @@ void PlayListSelection::drawBackground( QPainter *p, const QRect &r ) { | |||
73 | if ( !logo.isNull() ) | 72 | if ( !logo.isNull() ) |
74 | p->drawImage( (width() - logo.width()) / 2, (height() - logo.height()) / 2, logo ); | 73 | p->drawImage( (width() - logo.width()) / 2, (height() - logo.height()) / 2, logo ); |
75 | } | 74 | } |
@@ -80,8 +79,8 @@ void PlayListSelection::contentsMouseMoveEvent( QMouseEvent *event ) { | |||
80 | if ( event->state() == QMouseEvent::LeftButton ) { | 79 | if ( event->state() == QMouseEvent::LeftButton ) { |
81 | QListViewItem *currentItem = selectedItem(); | 80 | QListViewItem *currentItem = selectedItem(); |
82 | QListViewItem *itemUnder = itemAt( QPoint( event->pos().x(), event->pos().y() - contentsY() ) ); | 81 | QListViewItem *itemUnder = itemAt( QPoint( event->pos().x(), event->pos().y() - contentsY() ) ); |
83 | if ( currentItem && currentItem->itemAbove() == itemUnder ) | 82 | if ( currentItem && currentItem->itemAbove() == itemUnder ) |
84 | moveSelectedUp(); | 83 | moveSelectedUp(); |
85 | else if ( currentItem && currentItem->itemBelow() == itemUnder ) | 84 | else if ( currentItem && currentItem->itemBelow() == itemUnder ) |
86 | moveSelectedDown(); | 85 | moveSelectedDown(); |
87 | } | 86 | } |
@@ -93,3 +92,3 @@ const DocLnk *PlayListSelection::current() { | |||
93 | if ( item ) | 92 | if ( item ) |
94 | return item->file(); | 93 | return item->file(); |
95 | return NULL; | 94 | return NULL; |
@@ -99,3 +98,3 @@ const DocLnk *PlayListSelection::current() { | |||
99 | void PlayListSelection::addToSelection( const DocLnk &lnk ) { | 98 | void PlayListSelection::addToSelection( const DocLnk &lnk ) { |
100 | PlayListSelectionItem *item = new PlayListSelectionItem( this, new DocLnk( lnk ) ); | 99 | PlayListSelectionItem *item = new PlayListSelectionItem( this, new DocLnk( lnk ) ); |
101 | QListViewItem *current = selectedItem(); | 100 | QListViewItem *current = selectedItem(); |
@@ -111,3 +110,3 @@ void PlayListSelection::removeSelected() { | |||
111 | if ( item ) | 110 | if ( item ) |
112 | delete item; | 111 | delete item; |
113 | setSelected( currentItem(), TRUE ); | 112 | setSelected( currentItem(), TRUE ); |
@@ -120,3 +119,3 @@ void PlayListSelection::moveSelectedUp() { | |||
120 | if ( item && item->itemAbove() ) | 119 | if ( item && item->itemAbove() ) |
121 | item->itemAbove()->moveItem( item ); | 120 | item->itemAbove()->moveItem( item ); |
122 | ensureItemVisible( selectedItem() ); | 121 | ensureItemVisible( selectedItem() ); |
@@ -138,3 +137,3 @@ bool PlayListSelection::prev() { | |||
138 | else | 137 | else |
139 | return FALSE; | 138 | return FALSE; |
140 | ensureItemVisible( selectedItem() ); | 139 | ensureItemVisible( selectedItem() ); |
@@ -149,3 +148,3 @@ bool PlayListSelection::next() { | |||
149 | else | 148 | else |
150 | return FALSE; | 149 | return FALSE; |
151 | ensureItemVisible( selectedItem() ); | 150 | ensureItemVisible( selectedItem() ); |
@@ -160,3 +159,3 @@ bool PlayListSelection::first() { | |||
160 | else | 159 | else |
161 | return FALSE; | 160 | return FALSE; |
162 | ensureItemVisible( selectedItem() ); | 161 | ensureItemVisible( selectedItem() ); |
@@ -170,3 +169,3 @@ bool PlayListSelection::last() { | |||
170 | while ( ( item = item->nextSibling() ) ) | 169 | while ( ( item = item->nextSibling() ) ) |
171 | prevItem = item; | 170 | prevItem = item; |
172 | if ( prevItem ) | 171 | if ( prevItem ) |
@@ -174,3 +173,3 @@ bool PlayListSelection::last() { | |||
174 | else | 173 | else |
175 | return FALSE; | 174 | return FALSE; |
176 | ensureItemVisible( selectedItem() ); | 175 | ensureItemVisible( selectedItem() ); |