summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/playlistselection.cpp
Side-by-side diff
Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistselection.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistselection.cpp19
1 files changed, 2 insertions, 17 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
@@ -47,39 +47,26 @@ private:
PlayListSelection::PlayListSelection( QWidget *parent, const char *name )
: QListView( parent, 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();
setSorting( -1, FALSE );
}
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
void PlayListSelection::contentsMouseMoveEvent( QMouseEvent *event ) {
if ( event->state() == QMouseEvent::LeftButton ) {
QListViewItem *currentItem = selectedItem();
QListViewItem *itemUnder = itemAt( QPoint( event->pos().x(), event->pos().y() - contentsY() ) );
@@ -177,22 +164,22 @@ bool PlayListSelection::last() {
ensureItemVisible( selectedItem() );
return TRUE;
}
void PlayListSelection::unSelect()
{
- //QListViewItem *item = selectedItem();
setSelected( currentItem(), FALSE);
}
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;
+ }
}
void PlayListSelection::setSelectedItem(const QString &strk ) {
unSelect();
@@ -203,9 +190,7 @@ void PlayListSelection::setSelectedItem(const QString &strk ) {
// odebug << "We have a match "+strk << oendl;
setSelected( it.current(), TRUE);
ensureItemVisible( it.current() );
return;
}
}
-// setSelected( item, TRUE );
-// ensureItemVisible( selectedItem() );
}