1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-09-01 09:53:57 +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_whatsHotWidget( new WhatsHotWidget() )
, m_newReleasesWidget( new NewReleasesWidget() ) , m_newReleasesWidget( new NewReleasesWidget() )
, m_recentPlaysWidget( 0 ) , m_recentPlaysWidget( 0 )
, m_radioView( 0 )
, m_currentPage( 0 ) , m_currentPage( 0 )
, m_loaded( false ) , 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 void
ViewManager::playlistInterfaceChanged( Tomahawk::playlistinterface_ptr interface ) ViewManager::playlistInterfaceChanged( Tomahawk::playlistinterface_ptr interface )
{ {

View File

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