author | simon <simon> | 2002-12-02 15:51:48 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-02 15:51:48 (UTC) |
commit | a0cfa5b76aac8de36304faef4bb2b14237c04c9a (patch) (side-by-side diff) | |
tree | 0b427d07d918671065e6aed1682b108cda166ce7 /noncore/multimedia/opieplayer2/playlistwidget.cpp | |
parent | 9f770813346acbe7817b20c5fe0fea03827fc41a (diff) | |
download | opie-a0cfa5b76aac8de36304faef4bb2b14237c04c9a.zip opie-a0cfa5b76aac8de36304faef4bb2b14237c04c9a.tar.gz opie-a0cfa5b76aac8de36304faef4bb2b14237c04c9a.tar.bz2 |
- simplified MediaPlayer::setPlaying, moving more switch() like code into
playlistwidget
Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index fd256b7..ce73252 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp @@ -424,7 +424,7 @@ void PlayListWidget::useSelectedDocument() { } -const DocLnk *PlayListWidget::current() { // this is fugly +const DocLnk *PlayListWidget::current() const { // this is fugly assert( currentTab() == CurrentPlayList ); // qDebug("playlist"); @@ -1141,6 +1141,16 @@ PlayListWidget::TabType PlayListWidget::currentTab() const return indexToTabType[ index ]; } +PlayListWidget::Entry PlayListWidget::currentEntry() const +{ + if ( currentTab() == CurrentPlayList ) { + const DocLnk *lnk = current(); + return Entry( lnk->name(), lnk->file() ); + } + + return Entry( currentFileListPathName() ); +} + QString PlayListWidget::currentFileListPathName() const { return currentFileListView()->currentItem()->text( 3 ); } |