mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-24 14:42:53 +02:00
* Set the playlistinterface_ptr in TrackDetailView, so we can continue playback after picking an alternative source.
This commit is contained in:
@@ -93,6 +93,7 @@ ContextView::ContextView( QWidget* parent, const QString& caption )
|
|||||||
vboxInner->setStretchFactor( m_trackView, 1 );
|
vboxInner->setStretchFactor( m_trackView, 1 );
|
||||||
|
|
||||||
TrackDetailView* detailView = new TrackDetailView;
|
TrackDetailView* detailView = new TrackDetailView;
|
||||||
|
detailView->setPlaylistInterface( playlistInterface() );
|
||||||
hboxl->addWidget( detailView );
|
hboxl->addWidget( detailView );
|
||||||
hboxl->addLayout( vboxInner );
|
hboxl->addLayout( vboxInner );
|
||||||
hbox->setLayout( hboxl );
|
hbox->setLayout( hboxl );
|
||||||
|
@@ -100,6 +100,7 @@ FlexibleView::FlexibleView( QWidget* parent, QWidget* extraHeader )
|
|||||||
hboxl->setSpacing( 32 );
|
hboxl->setSpacing( 32 );
|
||||||
|
|
||||||
m_detailView = new TrackDetailView;
|
m_detailView = new TrackDetailView;
|
||||||
|
m_detailView->setPlaylistInterface( playlistInterface() );
|
||||||
hboxl->addWidget( m_detailView );
|
hboxl->addWidget( m_detailView );
|
||||||
hboxl->addWidget( m_stack );
|
hboxl->addWidget( m_stack );
|
||||||
hbox->setLayout( hboxl );
|
hbox->setLayout( hboxl );
|
||||||
@@ -145,6 +146,7 @@ FlexibleView::setTrackView( TrackView* view )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// view->setPlaylistInterface( m_playlistInterface );
|
// view->setPlaylistInterface( m_playlistInterface );
|
||||||
|
m_detailView->setPlaylistInterface( playlistInterface() );
|
||||||
|
|
||||||
m_trackView = view;
|
m_trackView = view;
|
||||||
m_stack->addWidget( view );
|
m_stack->addWidget( view );
|
||||||
|
@@ -135,6 +135,13 @@ TrackDetailView::~TrackDetailView()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
TrackDetailView::setPlaylistInterface( const Tomahawk::playlistinterface_ptr& playlistInterface )
|
||||||
|
{
|
||||||
|
m_playlistInterface = playlistInterface;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TrackDetailView::setQuery( const Tomahawk::query_ptr& query )
|
TrackDetailView::setQuery( const Tomahawk::query_ptr& query )
|
||||||
{
|
{
|
||||||
@@ -253,7 +260,7 @@ TrackDetailView::onResultsChanged()
|
|||||||
|
|
||||||
NewClosure( resolverLabel, SIGNAL( clicked() ), const_cast< AudioEngine* >( AudioEngine::instance() ),
|
NewClosure( resolverLabel, SIGNAL( clicked() ), const_cast< AudioEngine* >( AudioEngine::instance() ),
|
||||||
SLOT( playItem( Tomahawk::playlistinterface_ptr, Tomahawk::result_ptr, Tomahawk::query_ptr ) ),
|
SLOT( playItem( Tomahawk::playlistinterface_ptr, Tomahawk::result_ptr, Tomahawk::query_ptr ) ),
|
||||||
Tomahawk::playlistinterface_ptr(), result, m_query )->setAutoDelete( false );
|
m_playlistInterface, result, m_query )->setAutoDelete( false );
|
||||||
|
|
||||||
QWidget* hbox = new QWidget;
|
QWidget* hbox = new QWidget;
|
||||||
QHBoxLayout* hboxl = new QHBoxLayout;
|
QHBoxLayout* hboxl = new QHBoxLayout;
|
||||||
|
@@ -39,6 +39,7 @@ public:
|
|||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
virtual void setQuery( const Tomahawk::query_ptr& query );
|
virtual void setQuery( const Tomahawk::query_ptr& query );
|
||||||
|
void setPlaylistInterface( const Tomahawk::playlistinterface_ptr& playlistInterface );
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
@@ -54,6 +55,8 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
void setSocialActions();
|
void setSocialActions();
|
||||||
|
|
||||||
|
Tomahawk::playlistinterface_ptr m_playlistInterface;
|
||||||
|
|
||||||
PlayableCover* m_playableCover;
|
PlayableCover* m_playableCover;
|
||||||
QueryLabel* m_nameLabel;
|
QueryLabel* m_nameLabel;
|
||||||
QLabel* m_dateLabel;
|
QLabel* m_dateLabel;
|
||||||
|
Reference in New Issue
Block a user