summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/playlistselection.cpp
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/playlistselection.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/playlistselection.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/core/multimedia/opieplayer/playlistselection.cpp b/core/multimedia/opieplayer/playlistselection.cpp
index ad831cf..58c3966 100644
--- a/core/multimedia/opieplayer/playlistselection.cpp
+++ b/core/multimedia/opieplayer/playlistselection.cpp
@@ -17,12 +17,17 @@
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include <qheader.h>
22
23#include "playlistselection.h" 21#include "playlistselection.h"
24 22
23/* OPIE */
24#include <opie2/odebug.h>
25
26/* QT */
27#include <qheader.h>
28
29/* STD */
25#include <stdlib.h> 30#include <stdlib.h>
26 31
27class PlayListSelectionItem : public QListViewItem { 32class PlayListSelectionItem : public QListViewItem {
28public: 33public:
@@ -43,9 +48,9 @@ private:
43 48
44PlayListSelection::PlayListSelection( QWidget *parent, const char *name ) 49PlayListSelection::PlayListSelection( QWidget *parent, const char *name )
45 : QListView( parent, name ) 50 : QListView( parent, name )
46{ 51{
47// qDebug("starting playlistselector"); 52// odebug << "starting playlistselector" << oendl;
48// #ifdef USE_PLAYLIST_BACKGROUND 53// #ifdef USE_PLAYLIST_BACKGROUND
49// setStaticBackground( TRUE ); 54// setStaticBackground( TRUE );
50// setBackgroundPixmap( Resource::loadPixmap( "opieplayer/background" ) ); 55// setBackgroundPixmap( Resource::loadPixmap( "opieplayer/background" ) );
51 56
@@ -65,9 +70,9 @@ PlayListSelection::~PlayListSelection() {
65 70
66 71
67// #ifdef USE_PLAYLIST_BACKGROUND 72// #ifdef USE_PLAYLIST_BACKGROUND
68void PlayListSelection::drawBackground( QPainter *p, const QRect &r ) { 73void PlayListSelection::drawBackground( QPainter *p, const QRect &r ) {
69// qDebug("drawBackground"); 74// odebug << "drawBackground" << oendl;
70 p->fillRect( r, QBrush( white ) ); 75 p->fillRect( r, QBrush( white ) );
71// QImage logo = Resource::loadImage( "launcher/opielogo" ); 76// QImage logo = Resource::loadImage( "launcher/opielogo" );
72// if ( !logo.isNull() ) 77// if ( !logo.isNull() )
73// p->drawImage( (width() - logo.width()) / 2, (height() - logo.height()) / 2, logo ); 78// p->drawImage( (width() - logo.width()) / 2, (height() - logo.height()) / 2, logo );
@@ -185,20 +190,20 @@ void PlayListSelection::writeCurrent( Config& cfg ) {
185 cfg.setGroup("PlayList"); 190 cfg.setGroup("PlayList");
186 QListViewItem *item = selectedItem(); 191 QListViewItem *item = selectedItem();
187 if ( item ) 192 if ( item )
188 cfg.writeEntry("current", item->text(0) ); 193 cfg.writeEntry("current", item->text(0) );
189 // qDebug(item->text(0)); 194 // odebug << item->text(0) << oendl;
190 195
191} 196}
192 197
193void PlayListSelection::setSelectedItem(const QString &strk ) { 198void PlayListSelection::setSelectedItem(const QString &strk ) {
194 199
195 unSelect(); 200 unSelect();
196 QListViewItemIterator it( this ); 201 QListViewItemIterator it( this );
197 for ( ; it.current(); ++it ) { 202 for ( ; it.current(); ++it ) {
198// qDebug( it.current()->text(0)); 203// odebug << it.current()->text(0) << oendl;
199 if( strk == it.current()->text(0)) { 204 if( strk == it.current()->text(0)) {
200// qDebug( "We have a match "+strk); 205// odebug << "We have a match "+strk << oendl;
201 setSelected( it.current(), TRUE); 206 setSelected( it.current(), TRUE);
202 ensureItemVisible( it.current() ); 207 ensureItemVisible( it.current() );
203 return; 208 return;
204 } 209 }