summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/playlistselection.cpp
Side-by-side diff
Diffstat (limited to 'core/multimedia/opieplayer/playlistselection.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/playlistselection.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/core/multimedia/opieplayer/playlistselection.cpp b/core/multimedia/opieplayer/playlistselection.cpp
index 6259b3f..8f3711a 100644
--- a/core/multimedia/opieplayer/playlistselection.cpp
+++ b/core/multimedia/opieplayer/playlistselection.cpp
@@ -10,24 +10,26 @@
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include <qpe/applnk.h>
#include <qpe/resource.h>
+#include <qpe/config.h>
+
#include <qpainter.h>
#include <qimage.h>
#include <qheader.h>
#include <qlistview.h>
#include <qlist.h>
#include <qpixmap.h>
#include "playlistselection.h"
#include <stdlib.h>
class PlayListSelectionItem : public QListViewItem {
@@ -41,25 +43,25 @@ public:
};
const DocLnk *file() const { return fl; }
private:
const DocLnk *fl;
};
PlayListSelection::PlayListSelection( QWidget *parent, const char *name )
: QListView( parent, name )
{
- qDebug("starting playlistselector");
+// qDebug("starting playlistselector");
// #ifdef USE_PLAYLIST_BACKGROUND
// setStaticBackground( TRUE );
// setBackgroundPixmap( Resource::loadPixmap( "mpegplayer/background" ) );
// setBackgroundPixmap( Resource::loadPixmap( "launcher/opielogo" ) );
// #endif
// addColumn("Title",236);
// setAllColumnsShowFocus( TRUE );
addColumn( tr( "Playlist Selection" ) );
header()->hide();
setSorting( -1, FALSE );
}
@@ -175,13 +177,27 @@ bool PlayListSelection::last() {
if ( prevItem )
setSelected( prevItem, TRUE );
else
return FALSE;
ensureItemVisible( selectedItem() );
return TRUE;
}
void PlayListSelection::unSelect()
{
QListViewItem *item = selectedItem();
setSelected( currentItem(), FALSE);
-} \ No newline at end of file
+}
+
+void PlayListSelection::writeCurrent( Config& cfg ) {
+ cfg.setGroup("PlayList");
+ QListViewItem *item = selectedItem();
+ if ( item )
+ cfg.writeEntry("current", item->text(0) );
+ qDebug(item->text(0));
+
+}
+
+void PlayListSelection::setSelectedItem(const QString &strk ) {
+// setSelected( item, TRUE );
+// ensureItemVisible( selectedItem() );
+}