author | llornkcor <llornkcor> | 2003-06-12 03:15:06 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-06-12 03:15:06 (UTC) |
commit | d5fb55632847e18026506af6b482c2cd3def3222 (patch) (side-by-side diff) | |
tree | d2d5a3b1d4c3882f51c979562b35a44f021154f5 /core | |
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() { void PlayListSelection::contentsMouseMoveEvent( QMouseEvent *event ) { if ( event->state() == QMouseEvent::LeftButton ) { - QListViewItem *currentItem = selectedItem(); - QListViewItem *itemUnder = itemAt( QPoint( event->pos().x(), event->pos().y() - contentsY() ) ); - if ( currentItem && currentItem->itemAbove() == itemUnder ) - moveSelectedUp(); - else if ( currentItem && currentItem->itemBelow() == itemUnder ) - moveSelectedDown(); + QListViewItem *currentItem = selectedItem(); + QListViewItem *itemUnder = itemAt( QPoint( event->pos().x(), event->pos().y() - contentsY() ) ); + if ( currentItem && currentItem->itemAbove() == itemUnder ) + moveSelectedUp(); + else if ( currentItem && currentItem->itemBelow() == itemUnder ) + moveSelectedDown(); } } @@ -65,5 +65,5 @@ const QString *PlayListSelection::current() { PlayListSelectionItem *item = (PlayListSelectionItem *)selectedItem(); if ( item ) - return item->file(); + return item->file(); return NULL; } @@ -92,5 +92,5 @@ void PlayListSelection::removeSelected() { QListViewItem *item = selectedItem(); if ( item ) - delete item; + delete item; setSelected( currentItem(), TRUE ); ensureItemVisible( selectedItem() ); @@ -101,5 +101,5 @@ void PlayListSelection::moveSelectedUp() { QListViewItem *item = selectedItem(); if ( item && item->itemAbove() ) - item->itemAbove()->moveItem( item ); + item->itemAbove()->moveItem( item ); ensureItemVisible( selectedItem() ); } @@ -119,5 +119,5 @@ bool PlayListSelection::prev() { setSelected( item->itemAbove(), TRUE ); else - return FALSE; + return FALSE; ensureItemVisible( selectedItem() ); return TRUE; @@ -130,5 +130,5 @@ bool PlayListSelection::next() { setSelected( item->itemBelow(), TRUE ); else - return FALSE; + return FALSE; ensureItemVisible( selectedItem() ); return TRUE; @@ -141,5 +141,5 @@ bool PlayListSelection::first() { setSelected( item, TRUE ); else - return FALSE; + return FALSE; ensureItemVisible( selectedItem() ); return TRUE; @@ -151,9 +151,9 @@ bool PlayListSelection::last() { QListViewItem *item = firstChild(); while ( ( item = item->nextSibling() ) ) - prevItem = item; + prevItem = item; if ( prevItem ) setSelected( prevItem, TRUE ); else - return FALSE; + return FALSE; ensureItemVisible( selectedItem() ); 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 { public: PlayListSelectionItem( QListView *parent, QString *f ) : QListViewItem( parent ), fl( f ) { - setText(0, *f ); + setText(0, *f ); } |