author | bipolar <bipolar> | 2002-03-08 05:26:53 (UTC) |
---|---|---|
committer | bipolar <bipolar> | 2002-03-08 05:26:53 (UTC) |
commit | b0222c051d3666a4215c6b7271daec2ea6f783a0 (patch) (side-by-side diff) | |
tree | 5f4a081e37d25e8d1dcefe68069a89f7d89de4e7 /core | |
parent | 5bb6c01c2a9a40e5bff20a2725f6aacf85d16ef3 (diff) | |
download | opie-b0222c051d3666a4215c6b7271daec2ea6f783a0.zip opie-b0222c051d3666a4215c6b7271daec2ea6f783a0.tar.gz opie-b0222c051d3666a4215c6b7271daec2ea6f783a0.tar.bz2 |
ljp: added something I should have not taken out in the first place
-rw-r--r-- | core/multimedia/opieplayer/playlistselection.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/multimedia/opieplayer/playlistselection.cpp b/core/multimedia/opieplayer/playlistselection.cpp index d6aff66..4019d12 100644 --- a/core/multimedia/opieplayer/playlistselection.cpp +++ b/core/multimedia/opieplayer/playlistselection.cpp @@ -27,97 +27,97 @@ #include <qpixmap.h> #include "playlistselection.h" #include <stdlib.h> class PlayListSelectionItem : public QListViewItem { public: PlayListSelectionItem( QListView *parent, const DocLnk *f ) : QListViewItem( parent ), fl( f ) { setText( 0, f->name() ); setPixmap( 0, f->pixmap() ); } ~PlayListSelectionItem() { }; const DocLnk *file() const { return fl; } private: const DocLnk *fl; }; PlayListSelection::PlayListSelection( QWidget *parent, const char *name ) : QListView( parent, name ) { qDebug("starting playlistselector"); // #ifdef USE_PLAYLIST_BACKGROUND // setStaticBackground( TRUE ); // setBackgroundPixmap( Resource::loadPixmap( "mpegplayer/background" ) ); // setBackgroundPixmap( Resource::loadPixmap( "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 ) { // qDebug("drawBackground"); -// p->fillRect( r, QBrush( white ) ); + p->fillRect( r, QBrush( white ) ); // QImage logo = Resource::loadImage( "mpegplayer/background" ); // // QImage logo = Resource::loadImage( "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() ) ); if ( currentItem && currentItem->itemAbove() == itemUnder ) moveSelectedUp(); else if ( currentItem && currentItem->itemBelow() == itemUnder ) moveSelectedDown(); } } const DocLnk *PlayListSelection::current() { PlayListSelectionItem *item = (PlayListSelectionItem *)selectedItem(); if ( item ) return item->file(); return NULL; } void PlayListSelection::addToSelection( const DocLnk &lnk ) { PlayListSelectionItem *item = new PlayListSelectionItem( this, new DocLnk( lnk ) ); QListViewItem *current = selectedItem(); if ( current ) item->moveItem( current ); setSelected( item, TRUE ); ensureItemVisible( selectedItem() ); } void PlayListSelection::removeSelected() { QListViewItem *item = selectedItem(); if ( item ) delete item; setSelected( currentItem(), TRUE ); ensureItemVisible( selectedItem() ); } void PlayListSelection::moveSelectedUp() { |