-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 ); } |