author | llornkcor <llornkcor> | 2002-06-29 04:06:17 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-06-29 04:06:17 (UTC) |
commit | 869bbb0b53c6ce941906a05a1536ad3eb130163e (patch) (unidiff) | |
tree | 068db89509c58effd9e2e0af879b761784042e1a | |
parent | 3c187ccc9f1b684453c978ca9e56ff3137cb15ec (diff) | |
download | opie-869bbb0b53c6ce941906a05a1536ad3eb130163e.zip opie-869bbb0b53c6ce941906a05a1536ad3eb130163e.tar.gz opie-869bbb0b53c6ce941906a05a1536ad3eb130163e.tar.bz2 |
how about some key action on the playlist
-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp index 4926287..b9b63c7 100644 --- a/core/multimedia/opieplayer/playlistwidget.cpp +++ b/core/multimedia/opieplayer/playlistwidget.cpp | |||
@@ -1153,12 +1153,23 @@ void PlayListWidget::keyReleaseEvent( QKeyEvent *e) | |||
1153 | case Key_2: | 1153 | case Key_2: |
1154 | tabWidget->setCurrentPage(1); | 1154 | tabWidget->setCurrentPage(1); |
1155 | break; | 1155 | break; |
1156 | case Key_3: | 1156 | case Key_3: |
1157 | tabWidget->setCurrentPage(2); | 1157 | tabWidget->setCurrentPage(2); |
1158 | break; | 1158 | break; |
1159 | case Key_4: | 1159 | case Key_4: |
1160 | tabWidget->setCurrentPage(3); | 1160 | tabWidget->setCurrentPage(3); |
1161 | break; | 1161 | break; |
1162 | case Key_Down: | ||
1163 | if ( !d->selectedFiles->next() ) | ||
1164 | d->selectedFiles->first(); | ||
1165 | |||
1166 | break; | ||
1167 | case Key_Up: | ||
1168 | if ( !d->selectedFiles->prev() ) | ||
1169 | d->selectedFiles->last(); | ||
1170 | |||
1171 | break; | ||
1172 | |||
1162 | } | 1173 | } |
1163 | } | 1174 | } |
1164 | 1175 | ||
@@ -1336,14 +1347,12 @@ void PlayListWidget::readPls(const QString &filename) { | |||
1336 | // name = name.left(name.length()-4); | 1347 | // name = name.left(name.length()-4); |
1337 | // name = name.right(name.findRev("/",0,TRUE)); | 1348 | // name = name.right(name.findRev("/",0,TRUE)); |
1338 | lnk.setName( name); | 1349 | lnk.setName( name); |
1339 | if(s.at(s.length()-4) == '.') | 1350 | if(s.at(s.length()-4) == '.') // if this is probably a file |
1340 | lnk.setFile( s); | 1351 | lnk.setFile( s); |
1341 | else { | 1352 | else { //if its a url |
1342 | if( name.right(1).find('/') == -1) | 1353 | if( name.right(1).find('/') == -1) |
1343 | s+="/"; | 1354 | s+="/"; |
1344 | // if(s.right(1) != '/') | 1355 | lnk.setFile( s); |
1345 | lnk.setFile( s); | ||
1346 | |||
1347 | } | 1356 | } |
1348 | lnk.setType("audio/x-mpegurl"); | 1357 | lnk.setType("audio/x-mpegurl"); |
1349 | 1358 | ||