From 175b413584fab5996669eae2347b87404e228a43 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Fri, 1 Jun 2012 04:46:48 +0200 Subject: [PATCH] * TrackView's default ViewPage implementation is good enough for PlaylistView. --- src/libtomahawk/playlist/PlaylistView.cpp | 11 ----------- src/libtomahawk/playlist/PlaylistView.h | 10 +--------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/src/libtomahawk/playlist/PlaylistView.cpp b/src/libtomahawk/playlist/PlaylistView.cpp index d42d1dfe2..e6a2e4675 100644 --- a/src/libtomahawk/playlist/PlaylistView.cpp +++ b/src/libtomahawk/playlist/PlaylistView.cpp @@ -35,8 +35,6 @@ PlaylistView::PlaylistView( QWidget* parent ) : TrackView( parent ) , m_model( 0 ) { - setProxyModel( new PlayableProxyModel( this ) ); - connect( contextMenu(), SIGNAL( triggered( int ) ), SLOT( onMenuTriggered( int ) ) ); } @@ -132,14 +130,6 @@ PlaylistView::onTrackCountChanged( unsigned int tracks ) } -bool -PlaylistView::jumpToCurrentTrack() -{ - scrollTo( proxyModel()->currentIndex(), QAbstractItemView::PositionAtCenter ); - return true; -} - - void PlaylistView::onDeleted() { @@ -174,7 +164,6 @@ PlaylistView::onMenuTriggered( int action ) break; default: - TrackView::onMenuTriggered( action ); break; } } diff --git a/src/libtomahawk/playlist/PlaylistView.h b/src/libtomahawk/playlist/PlaylistView.h index 34633ee1e..e3cbbcf53 100644 --- a/src/libtomahawk/playlist/PlaylistView.h +++ b/src/libtomahawk/playlist/PlaylistView.h @@ -26,7 +26,7 @@ #include "ViewPage.h" #include "DllMacro.h" -class DLLEXPORT PlaylistView : public TrackView, public Tomahawk::ViewPage +class DLLEXPORT PlaylistView : public TrackView { Q_OBJECT @@ -38,17 +38,9 @@ public: virtual void setPlaylistModel( PlaylistModel* model ); virtual void setModel( QAbstractItemModel* model ); - virtual QWidget* widget() { return this; } - virtual Tomahawk::playlistinterface_ptr playlistInterface() const { return proxyModel()->playlistInterface(); } - - virtual bool showFilter() const { return true; } - virtual QList updaters() const; - virtual QString title() const { return playlistModel()->title(); } - virtual QString description() const { return m_model->description(); } virtual QPixmap pixmap() const { return QPixmap( RESPATH "images/playlist-icon.png" ); } - virtual bool jumpToCurrentTrack(); virtual bool isTemporaryPage() const; signals: