summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2003-06-12 03:15:06 (UTC)
committer llornkcor <llornkcor>2003-06-12 03:15:06 (UTC)
commitd5fb55632847e18026506af6b482c2cd3def3222 (patch) (side-by-side diff)
treed2d5a3b1d4c3882f51c979562b35a44f021154f5
parentf0fab7d044feb2fe7f6a8c2a8d41653e1a17a538 (diff)
downloadopie-d5fb55632847e18026506af6b482c2cd3def3222.zip
opie-d5fb55632847e18026506af6b482c2cd3def3222.tar.gz
opie-d5fb55632847e18026506af6b482c2cd3def3222.tar.bz2
compile
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
@@ -50,22 +50,22 @@ 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;
}
@@ -90,18 +90,18 @@ 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() );
}
@@ -117,9 +117,9 @@ bool PlayListSelection::prev() {
QListViewItem *item = selectedItem();
if ( item && item->itemAbove() )
setSelected( item->itemAbove(), TRUE );
else
- return FALSE;
+ return FALSE;
ensureItemVisible( selectedItem() );
return TRUE;
}
@@ -128,9 +128,9 @@ bool PlayListSelection::next() {
QListViewItem *item = selectedItem();
if ( item && item->itemBelow() )
setSelected( item->itemBelow(), TRUE );
else
- return FALSE;
+ return FALSE;
ensureItemVisible( selectedItem() );
return TRUE;
}
@@ -139,9 +139,9 @@ bool PlayListSelection::first() {
QListViewItem *item = firstChild();
if ( item )
setSelected( item, TRUE );
else
- return FALSE;
+ return FALSE;
ensureItemVisible( selectedItem() );
return TRUE;
}
@@ -149,13 +149,13 @@ bool PlayListSelection::first() {
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
@@ -27,9 +27,9 @@
class PlayListSelectionItem : public QListViewItem {
public:
PlayListSelectionItem( QListView *parent, QString *f ) : QListViewItem( parent ), fl( f ) {
- setText(0, *f );
+ setText(0, *f );
}
~PlayListSelectionItem() {
};