author | llornkcor <llornkcor> | 2003-06-12 03:15:06 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-06-12 03:15:06 (UTC) |
commit | d5fb55632847e18026506af6b482c2cd3def3222 (patch) (unidiff) | |
tree | d2d5a3b1d4c3882f51c979562b35a44f021154f5 | |
parent | f0fab7d044feb2fe7f6a8c2a8d41653e1a17a538 (diff) | |
download | opie-d5fb55632847e18026506af6b482c2cd3def3222.zip opie-d5fb55632847e18026506af6b482c2cd3def3222.tar.gz opie-d5fb55632847e18026506af6b482c2cd3def3222.tar.bz2 |
compile
-rw-r--r-- | core/apps/embeddedkonsole/playlistselection.cpp | 28 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/playlistselection.h | 2 |
2 files changed, 15 insertions, 15 deletions
diff --git a/core/apps/embeddedkonsole/playlistselection.cpp b/core/apps/embeddedkonsole/playlistselection.cpp index b9b9401..4dd3126 100644 --- a/core/apps/embeddedkonsole/playlistselection.cpp +++ b/core/apps/embeddedkonsole/playlistselection.cpp | |||
@@ -52,10 +52,10 @@ PlayListSelection::~PlayListSelection() { | |||
52 | void PlayListSelection::contentsMouseMoveEvent( QMouseEvent *event ) { | 52 | void PlayListSelection::contentsMouseMoveEvent( QMouseEvent *event ) { |
53 | if ( event->state() == QMouseEvent::LeftButton ) { | 53 | if ( event->state() == QMouseEvent::LeftButton ) { |
54 | QListViewItem *currentItem = selectedItem(); | 54 | QListViewItem *currentItem = selectedItem(); |
55 | QListViewItem *itemUnder = itemAt( QPoint( event->pos().x(), event->pos().y() - contentsY() ) ); | 55 | QListViewItem *itemUnder = itemAt( QPoint( event->pos().x(), event->pos().y() - contentsY() ) ); |
56 | if ( currentItem && currentItem->itemAbove() == itemUnder ) | 56 | if ( currentItem && currentItem->itemAbove() == itemUnder ) |
57 | moveSelectedUp(); | 57 | moveSelectedUp(); |
58 | else if ( currentItem && currentItem->itemBelow() == itemUnder ) | 58 | else if ( currentItem && currentItem->itemBelow() == itemUnder ) |
59 | moveSelectedDown(); | 59 | moveSelectedDown(); |
60 | } | 60 | } |
61 | } | 61 | } |
@@ -65,5 +65,5 @@ const QString *PlayListSelection::current() { | |||
65 | PlayListSelectionItem *item = (PlayListSelectionItem *)selectedItem(); | 65 | PlayListSelectionItem *item = (PlayListSelectionItem *)selectedItem(); |
66 | if ( item ) | 66 | if ( item ) |
67 | return item->file(); | 67 | return item->file(); |
68 | return NULL; | 68 | return NULL; |
69 | } | 69 | } |
@@ -92,5 +92,5 @@ void PlayListSelection::removeSelected() { | |||
92 | QListViewItem *item = selectedItem(); | 92 | QListViewItem *item = selectedItem(); |
93 | if ( item ) | 93 | if ( item ) |
94 | delete item; | 94 | delete item; |
95 | setSelected( currentItem(), TRUE ); | 95 | setSelected( currentItem(), TRUE ); |
96 | ensureItemVisible( selectedItem() ); | 96 | ensureItemVisible( selectedItem() ); |
@@ -101,5 +101,5 @@ void PlayListSelection::moveSelectedUp() { | |||
101 | QListViewItem *item = selectedItem(); | 101 | QListViewItem *item = selectedItem(); |
102 | if ( item && item->itemAbove() ) | 102 | if ( item && item->itemAbove() ) |
103 | item->itemAbove()->moveItem( item ); | 103 | item->itemAbove()->moveItem( item ); |
104 | ensureItemVisible( selectedItem() ); | 104 | ensureItemVisible( selectedItem() ); |
105 | } | 105 | } |
@@ -119,5 +119,5 @@ bool PlayListSelection::prev() { | |||
119 | setSelected( item->itemAbove(), TRUE ); | 119 | setSelected( item->itemAbove(), TRUE ); |
120 | else | 120 | else |
121 | return FALSE; | 121 | return FALSE; |
122 | ensureItemVisible( selectedItem() ); | 122 | ensureItemVisible( selectedItem() ); |
123 | return TRUE; | 123 | return TRUE; |
@@ -130,5 +130,5 @@ bool PlayListSelection::next() { | |||
130 | setSelected( item->itemBelow(), TRUE ); | 130 | setSelected( item->itemBelow(), TRUE ); |
131 | else | 131 | else |
132 | return FALSE; | 132 | return FALSE; |
133 | ensureItemVisible( selectedItem() ); | 133 | ensureItemVisible( selectedItem() ); |
134 | return TRUE; | 134 | return TRUE; |
@@ -141,5 +141,5 @@ bool PlayListSelection::first() { | |||
141 | setSelected( item, TRUE ); | 141 | setSelected( item, TRUE ); |
142 | else | 142 | else |
143 | return FALSE; | 143 | return FALSE; |
144 | ensureItemVisible( selectedItem() ); | 144 | ensureItemVisible( selectedItem() ); |
145 | return TRUE; | 145 | return TRUE; |
@@ -151,9 +151,9 @@ bool PlayListSelection::last() { | |||
151 | QListViewItem *item = firstChild(); | 151 | QListViewItem *item = firstChild(); |
152 | while ( ( item = item->nextSibling() ) ) | 152 | while ( ( item = item->nextSibling() ) ) |
153 | prevItem = item; | 153 | prevItem = item; |
154 | if ( prevItem ) | 154 | if ( prevItem ) |
155 | setSelected( prevItem, TRUE ); | 155 | setSelected( prevItem, TRUE ); |
156 | else | 156 | else |
157 | return FALSE; | 157 | return FALSE; |
158 | ensureItemVisible( selectedItem() ); | 158 | ensureItemVisible( selectedItem() ); |
159 | return TRUE; | 159 | return TRUE; |
diff --git a/core/apps/embeddedkonsole/playlistselection.h b/core/apps/embeddedkonsole/playlistselection.h index c307f14..f340124 100644 --- a/core/apps/embeddedkonsole/playlistselection.h +++ b/core/apps/embeddedkonsole/playlistselection.h | |||
@@ -29,5 +29,5 @@ class PlayListSelectionItem : public QListViewItem { | |||
29 | public: | 29 | public: |
30 | PlayListSelectionItem( QListView *parent, QString *f ) : QListViewItem( parent ), fl( f ) { | 30 | PlayListSelectionItem( QListView *parent, QString *f ) : QListViewItem( parent ), fl( f ) { |
31 | setText(0, *f ); | 31 | setText(0, *f ); |
32 | } | 32 | } |
33 | 33 | ||