1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-31 09:32:03 +02:00

* Add Radio item to sidebar.

This commit is contained in:
Christian Muehlhaeuser
2012-12-29 18:43:55 +01:00
parent 2dbe43fe89
commit a1148ece05
2 changed files with 19 additions and 0 deletions

View File

@@ -76,6 +76,7 @@ ViewManager::ViewManager( QObject* parent )
, m_whatsHotWidget( new WhatsHotWidget() )
, m_newReleasesWidget( new NewReleasesWidget() )
, m_recentPlaysWidget( 0 )
, m_radioView( 0 )
, m_currentPage( 0 )
, m_loaded( false )
{
@@ -348,6 +349,22 @@ ViewManager::showSuperCollection()
}
Tomahawk::ViewPage*
ViewManager::showRadioPage()
{
if ( !m_radioView )
{
dynplaylist_ptr playlist = DynamicPlaylist::create( SourceList::instance()->getLocal(), uuid(), QString(), "", SourceList::instance()->getLocal()->friendlyName(), OnDemand, false, QString(), false, false );
playlist->setMode( OnDemand );
m_radioView = new Tomahawk::DynamicQmlWidget( playlist, m_stack );
}
setPage( m_radioView );
return m_radioView;
}
void
ViewManager::playlistInterfaceChanged( Tomahawk::playlistinterface_ptr interface )
{

View File

@@ -129,6 +129,7 @@ signals:
void historyForwardAvailable( bool avail );
public slots:
Tomahawk::ViewPage* showRadioPage();
Tomahawk::ViewPage* showSuperCollection();
Tomahawk::ViewPage* showWelcomePage();
Tomahawk::ViewPage* showWhatsHotPage();
@@ -193,6 +194,7 @@ private:
WhatsHotWidget* m_whatsHotWidget;
NewReleasesWidget* m_newReleasesWidget;
Tomahawk::ViewPage* m_recentPlaysWidget;
Tomahawk::DynamicQmlWidget* m_radioView;
QList< Tomahawk::collection_ptr > m_superCollections;