mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-21 00:09:47 +01:00
* TrackView's default ViewPage implementation is good enough for PlaylistView.
This commit is contained in:
parent
fad3c6d12a
commit
175b413584
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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<Tomahawk::PlaylistUpdaterInterface*> 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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user