mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-09-01 18:04:05 +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_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 )
|
||||||
{
|
{
|
||||||
|
@@ -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;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user