1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-13 20:39:57 +01:00

TWK-686: Implement playlistinterface and jump to current track

This commit is contained in:
Leo Franchi 2012-02-26 13:06:10 -05:00
parent e9fb17dadb
commit 3900dd27d2
2 changed files with 18 additions and 2 deletions

View File

@ -1,6 +1,7 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
* Copyright 2012 Leo Franchi <lfranchi@kde.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -112,6 +113,20 @@ SearchWidget::changeEvent( QEvent* e )
}
Tomahawk::playlistinterface_ptr
SearchWidget::playlistInterface() const
{
return ui->resultsView->playlistInterface();
}
bool
SearchWidget::jumpToCurrentTrack()
{
return ui->resultsView->jumpToCurrentTrack();
}
void
SearchWidget::onResultsFound( const QList<Tomahawk::result_ptr>& results )
{

View File

@ -1,6 +1,7 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
* Copyright 2012 Leo Franchi <lfranchi@kde.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -46,7 +47,7 @@ public:
~SearchWidget();
virtual QWidget* widget() { return this; }
virtual Tomahawk::playlistinterface_ptr playlistInterface() const { return Tomahawk::playlistinterface_ptr(); }
virtual Tomahawk::playlistinterface_ptr playlistInterface() const;
virtual bool isTemporaryPage() const { return true; }
virtual QString title() const { return QString( tr( "Search: %1" ) ).arg( m_search ); }
@ -55,7 +56,7 @@ public:
virtual bool showStatsBar() const { return false; }
virtual bool jumpToCurrentTrack() { return false; }
virtual bool jumpToCurrentTrack();
protected:
void changeEvent( QEvent* e );