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:
@@ -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 )
|
||||
{
|
||||
|
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user