author | llornkcor <llornkcor> | 2002-04-10 20:16:48 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-04-10 20:16:48 (UTC) |
commit | 5d7caf051fb1b46fc2ed7d2f71b03fdf3b42b3ac (patch) (side-by-side diff) | |
tree | af7abddaeb16b6167d975968f62a521d8e6231dc /core/multimedia/opieplayer/playlistselection.cpp | |
parent | 5cf7797af9fb965916f5017f84898516157c4620 (diff) | |
download | opie-5d7caf051fb1b46fc2ed7d2f71b03fdf3b42b3ac.zip opie-5d7caf051fb1b46fc2ed7d2f71b03fdf3b42b3ac.tar.gz opie-5d7caf051fb1b46fc2ed7d2f71b03fdf3b42b3ac.tar.bz2 |
added ability to remember position in the playlist you were last at startup and when opening playlists
Diffstat (limited to 'core/multimedia/opieplayer/playlistselection.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/playlistselection.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/multimedia/opieplayer/playlistselection.cpp b/core/multimedia/opieplayer/playlistselection.cpp index 8f3711a..3c47256 100644 --- a/core/multimedia/opieplayer/playlistselection.cpp +++ b/core/multimedia/opieplayer/playlistselection.cpp @@ -200,2 +200,14 @@ void PlayListSelection::writeCurrent( Config& cfg ) { void PlayListSelection::setSelectedItem(const QString &strk ) { + + unSelect(); + QListViewItemIterator it( this ); + for ( ; it.current(); ++it ) { +// qDebug( it.current()->text(0)); + if( strk == it.current()->text(0)) { +// qDebug( "We have a match "+strk); + setSelected( it.current(), TRUE); + ensureItemVisible( it.current() ); + return; + } + } // setSelected( item, TRUE ); |