summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/playlistselection.cpp28
-rw-r--r--core/apps/embeddedkonsole/playlistselection.h2
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
@@ -48,26 +48,26 @@ 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();
}
}
const QString *PlayListSelection::current() {
PlayListSelectionItem *item = (PlayListSelectionItem *)selectedItem();
if ( item )
- return item->file();
+ return item->file();
return NULL;
}
void PlayListSelection::addToSelection( QListViewItem *lnk ) {
PlayListSelectionItem *item = new PlayListSelectionItem( this, new QString( lnk->text(0) ) );
@@ -88,22 +88,22 @@ void PlayListSelection::addStringToSelection (const QString & lnk) {
}
void PlayListSelection::removeSelected() {
qDebug("removeSelected()");
QListViewItem *item = selectedItem();
if ( item )
- delete item;
+ delete item;
setSelected( currentItem(), TRUE );
ensureItemVisible( selectedItem() );
}
void PlayListSelection::moveSelectedUp() {
QListViewItem *item = selectedItem();
if ( item && item->itemAbove() )
- item->itemAbove()->moveItem( item );
+ item->itemAbove()->moveItem( item );
ensureItemVisible( selectedItem() );
}
void PlayListSelection::moveSelectedDown() {
QListViewItem *item = selectedItem();
@@ -115,47 +115,47 @@ void PlayListSelection::moveSelectedDown() {
bool PlayListSelection::prev() {
QListViewItem *item = selectedItem();
if ( item && item->itemAbove() )
setSelected( item->itemAbove(), TRUE );
else
- return FALSE;
+ return FALSE;
ensureItemVisible( selectedItem() );
return TRUE;
}
bool PlayListSelection::next() {
QListViewItem *item = selectedItem();
if ( item && item->itemBelow() )
setSelected( item->itemBelow(), TRUE );
else
- return FALSE;
+ return FALSE;
ensureItemVisible( selectedItem() );
return TRUE;
}
bool PlayListSelection::first() {
QListViewItem *item = firstChild();
if ( item )
setSelected( item, TRUE );
else
- return FALSE;
+ return FALSE;
ensureItemVisible( selectedItem() );
return TRUE;
}
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
@@ -25,13 +25,13 @@
#include <qlistview.h>
#include <qpe/applnk.h>
class PlayListSelectionItem : public QListViewItem {
public:
PlayListSelectionItem( QListView *parent, QString *f ) : QListViewItem( parent ), fl( f ) {
- setText(0, *f );
+ setText(0, *f );
}
~PlayListSelectionItem() {
};
const QString *file() const { return fl; }