summaryrefslogtreecommitdiff
Unidiff
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
@@ -51,12 +51,12 @@ PlayListSelection::~PlayListSelection() {
51 51
52void PlayListSelection::contentsMouseMoveEvent( QMouseEvent *event ) { 52void PlayListSelection::contentsMouseMoveEvent( QMouseEvent *event ) {
53 if ( event->state() == QMouseEvent::LeftButton ) { 53 if ( event->state() == QMouseEvent::LeftButton ) {
54 QListViewItem *currentItem = selectedItem(); 54 QListViewItem *currentItem = selectedItem();
55 QListViewItem *itemUnder = itemAt( QPoint( event->pos().x(), event->pos().y() - contentsY() ) ); 55 QListViewItem *itemUnder = itemAt( QPoint( event->pos().x(), event->pos().y() - contentsY() ) );
56 if ( currentItem && currentItem->itemAbove() == itemUnder ) 56 if ( currentItem && currentItem->itemAbove() == itemUnder )
57 moveSelectedUp(); 57 moveSelectedUp();
58 else if ( currentItem && currentItem->itemBelow() == itemUnder ) 58 else if ( currentItem && currentItem->itemBelow() == itemUnder )
59 moveSelectedDown(); 59 moveSelectedDown();
60 } 60 }
61} 61}
62 62
@@ -64,7 +64,7 @@ void PlayListSelection::contentsMouseMoveEvent( QMouseEvent *event ) {
64const QString *PlayListSelection::current() { 64const QString *PlayListSelection::current() {
65 PlayListSelectionItem *item = (PlayListSelectionItem *)selectedItem(); 65 PlayListSelectionItem *item = (PlayListSelectionItem *)selectedItem();
66 if ( item ) 66 if ( item )
67 return item->file(); 67 return item->file();
68 return NULL; 68 return NULL;
69} 69}
70 70
@@ -91,7 +91,7 @@ void PlayListSelection::removeSelected() {
91 qDebug("removeSelected()"); 91 qDebug("removeSelected()");
92 QListViewItem *item = selectedItem(); 92 QListViewItem *item = selectedItem();
93 if ( item ) 93 if ( item )
94 delete item; 94 delete item;
95 setSelected( currentItem(), TRUE ); 95 setSelected( currentItem(), TRUE );
96 ensureItemVisible( selectedItem() ); 96 ensureItemVisible( selectedItem() );
97} 97}
@@ -100,7 +100,7 @@ void PlayListSelection::removeSelected() {
100void PlayListSelection::moveSelectedUp() { 100void PlayListSelection::moveSelectedUp() {
101 QListViewItem *item = selectedItem(); 101 QListViewItem *item = selectedItem();
102 if ( item && item->itemAbove() ) 102 if ( item && item->itemAbove() )
103 item->itemAbove()->moveItem( item ); 103 item->itemAbove()->moveItem( item );
104 ensureItemVisible( selectedItem() ); 104 ensureItemVisible( selectedItem() );
105} 105}
106 106
@@ -118,7 +118,7 @@ bool PlayListSelection::prev() {
118 if ( item && item->itemAbove() ) 118 if ( item && item->itemAbove() )
119 setSelected( item->itemAbove(), TRUE ); 119 setSelected( item->itemAbove(), TRUE );
120 else 120 else
121 return FALSE; 121 return FALSE;
122 ensureItemVisible( selectedItem() ); 122 ensureItemVisible( selectedItem() );
123 return TRUE; 123 return TRUE;
124} 124}
@@ -129,7 +129,7 @@ bool PlayListSelection::next() {
129 if ( item && item->itemBelow() ) 129 if ( item && item->itemBelow() )
130 setSelected( item->itemBelow(), TRUE ); 130 setSelected( item->itemBelow(), TRUE );
131 else 131 else
132 return FALSE; 132 return FALSE;
133 ensureItemVisible( selectedItem() ); 133 ensureItemVisible( selectedItem() );
134 return TRUE; 134 return TRUE;
135} 135}
@@ -140,7 +140,7 @@ bool PlayListSelection::first() {
140 if ( item ) 140 if ( item )
141 setSelected( item, TRUE ); 141 setSelected( item, TRUE );
142 else 142 else
143 return FALSE; 143 return FALSE;
144 ensureItemVisible( selectedItem() ); 144 ensureItemVisible( selectedItem() );
145 return TRUE; 145 return TRUE;
146} 146}
@@ -150,11 +150,11 @@ bool PlayListSelection::last() {
150 QListViewItem *prevItem = NULL; 150 QListViewItem *prevItem = NULL;
151 QListViewItem *item = firstChild(); 151 QListViewItem *item = firstChild();
152 while ( ( item = item->nextSibling() ) ) 152 while ( ( item = item->nextSibling() ) )
153 prevItem = item; 153 prevItem = item;
154 if ( prevItem ) 154 if ( prevItem )
155 setSelected( prevItem, TRUE ); 155 setSelected( prevItem, TRUE );
156 else 156 else
157 return FALSE; 157 return FALSE;
158 ensureItemVisible( selectedItem() ); 158 ensureItemVisible( selectedItem() );
159 return TRUE; 159 return TRUE;
160} 160}
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 @@
28class PlayListSelectionItem : public QListViewItem { 28class PlayListSelectionItem : public QListViewItem {
29public: 29public:
30 PlayListSelectionItem( QListView *parent, QString *f ) : QListViewItem( parent ), fl( f ) { 30 PlayListSelectionItem( QListView *parent, QString *f ) : QListViewItem( parent ), fl( f ) {
31 setText(0, *f ); 31 setText(0, *f );
32 } 32 }
33 33
34 ~PlayListSelectionItem() { 34 ~PlayListSelectionItem() {