summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/playlistselection.cpp
Side-by-side diff
Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistselection.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistselection.cpp35
1 files changed, 10 insertions, 25 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistselection.cpp b/noncore/multimedia/opieplayer2/playlistselection.cpp
index 678ebdf..780d705 100644
--- a/noncore/multimedia/opieplayer2/playlistselection.cpp
+++ b/noncore/multimedia/opieplayer2/playlistselection.cpp
@@ -51,12 +51,4 @@ PlayListSelection::PlayListSelection( QWidget *parent, const char *name )
{
// odebug << "starting playlistselector" << oendl;
-// #ifdef USE_PLAYLIST_BACKGROUND
-// setStaticBackground( TRUE );
-// setBackgroundPixmap( Resource::loadPixmap( "opieplayer/background" ) );
-
-// setBackgroundPixmap( Resource::loadPixmap( "launcher/opielogo" ) );
-// #endif
-// addColumn("Title",236);
-// setAllColumnsShowFocus( TRUE );
addColumn( tr( "Playlist Selection" ) );
header()->hide();
@@ -69,13 +61,8 @@ PlayListSelection::~PlayListSelection() {
-// #ifdef USE_PLAYLIST_BACKGROUND
void PlayListSelection::drawBackground( QPainter *p, const QRect &r ) {
// odebug << "drawBackground" << oendl;
p->fillRect( r, QBrush( white ) );
-// QImage logo = Resource::loadImage( "launcher/opielogo" );
-// if ( !logo.isNull() )
-// p->drawImage( (width() - logo.width()) / 2, (height() - logo.height()) / 2, logo );
}
-// #endif
@@ -95,5 +82,5 @@ const DocLnk *PlayListSelection::current() {
PlayListSelectionItem *item = (PlayListSelectionItem *)selectedItem();
if ( item )
- return item->file();
+ return item->file();
return NULL;
}
@@ -121,5 +108,5 @@ void PlayListSelection::moveSelectedUp() {
QListViewItem *item = selectedItem();
if ( item && item->itemAbove() )
- item->itemAbove()->moveItem( item );
+ item->itemAbove()->moveItem( item );
ensureItemVisible( selectedItem() );
}
@@ -139,5 +126,5 @@ bool PlayListSelection::prev() {
setSelected( item->itemAbove(), TRUE );
else
- return FALSE;
+ return FALSE;
ensureItemVisible( selectedItem() );
return TRUE;
@@ -149,5 +136,5 @@ bool PlayListSelection::next() {
setSelected( item->itemBelow(), TRUE );
else
- return FALSE;
+ return FALSE;
ensureItemVisible( selectedItem() );
return TRUE;
@@ -160,5 +147,5 @@ bool PlayListSelection::first() {
setSelected( item, TRUE );
else
- return FALSE;
+ return FALSE;
ensureItemVisible( selectedItem() );
return TRUE;
@@ -170,9 +157,9 @@ bool PlayListSelection::last() {
QListViewItem *item = firstChild();
while ( ( item = item->nextSibling() ) )
- prevItem = item;
+ prevItem = item;
if ( prevItem )
setSelected( prevItem, TRUE );
else
- return FALSE;
+ return FALSE;
ensureItemVisible( selectedItem() );
return TRUE;
@@ -181,5 +168,4 @@ bool PlayListSelection::last() {
void PlayListSelection::unSelect()
{
- //QListViewItem *item = selectedItem();
setSelected( currentItem(), FALSE);
}
@@ -188,7 +174,8 @@ void PlayListSelection::writeCurrent( Config& cfg ) {
cfg.setGroup("PlayList");
QListViewItem *item = selectedItem();
- if ( item )
+ if ( item ) {
cfg.writeEntry("current", item->text(0) );
- odebug << item->text(0) << oendl;
+ odebug << item->text(0) << oendl;
+ }
}
@@ -207,5 +194,3 @@ void PlayListSelection::setSelectedItem(const QString &strk ) {
}
}
-// setSelected( item, TRUE );
-// ensureItemVisible( selectedItem() );
}