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 @@ -51,12 +51,12 @@ 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(); } } @@ -64,7 +64,7 @@ void PlayListSelection::contentsMouseMoveEvent( QMouseEvent *event ) { const QString *PlayListSelection::current() { PlayListSelectionItem *item = (PlayListSelectionItem *)selectedItem(); if ( item ) - return item->file(); + return item->file(); return NULL; } @@ -91,7 +91,7 @@ void PlayListSelection::removeSelected() { qDebug("removeSelected()"); QListViewItem *item = selectedItem(); if ( item ) - delete item; + delete item; setSelected( currentItem(), TRUE ); ensureItemVisible( selectedItem() ); } @@ -100,7 +100,7 @@ void PlayListSelection::removeSelected() { void PlayListSelection::moveSelectedUp() { QListViewItem *item = selectedItem(); if ( item && item->itemAbove() ) - item->itemAbove()->moveItem( item ); + item->itemAbove()->moveItem( item ); ensureItemVisible( selectedItem() ); } @@ -118,7 +118,7 @@ bool PlayListSelection::prev() { if ( item && item->itemAbove() ) setSelected( item->itemAbove(), TRUE ); else - return FALSE; + return FALSE; ensureItemVisible( selectedItem() ); return TRUE; } @@ -129,7 +129,7 @@ bool PlayListSelection::next() { if ( item && item->itemBelow() ) setSelected( item->itemBelow(), TRUE ); else - return FALSE; + return FALSE; ensureItemVisible( selectedItem() ); return TRUE; } @@ -140,7 +140,7 @@ bool PlayListSelection::first() { if ( item ) setSelected( item, TRUE ); else - return FALSE; + return FALSE; ensureItemVisible( selectedItem() ); return TRUE; } @@ -150,11 +150,11 @@ bool PlayListSelection::last() { QListViewItem *prevItem = NULL; 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 @@ -28,7 +28,7 @@ class PlayListSelectionItem : public QListViewItem { public: PlayListSelectionItem( QListView *parent, QString *f ) : QListViewItem( parent ), fl( f ) { - setText(0, *f ); + setText(0, *f ); } ~PlayListSelectionItem() { |