mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-09 07:36:48 +02:00
* Update control-states when queue changes.
This commit is contained in:
@@ -832,6 +832,25 @@ AudioEngine::timerTriggered( qint64 time )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
AudioEngine::setQueue( const playlistinterface_ptr& queue )
|
||||||
|
{
|
||||||
|
if ( m_queue )
|
||||||
|
{
|
||||||
|
disconnect( m_queue.data(), SIGNAL( previousTrackAvailable() ), this, SIGNAL( controlStateChanged() ) );
|
||||||
|
disconnect( m_queue.data(), SIGNAL( nextTrackAvailable() ), this, SIGNAL( controlStateChanged() ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
m_queue = queue;
|
||||||
|
|
||||||
|
if ( m_queue )
|
||||||
|
{
|
||||||
|
connect( m_queue.data(), SIGNAL( previousTrackAvailable() ), SIGNAL( controlStateChanged() ) );
|
||||||
|
connect( m_queue.data(), SIGNAL( nextTrackAvailable() ), SIGNAL( controlStateChanged() ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioEngine::setPlaylist( Tomahawk::playlistinterface_ptr playlist )
|
AudioEngine::setPlaylist( Tomahawk::playlistinterface_ptr playlist )
|
||||||
{
|
{
|
||||||
@@ -842,8 +861,8 @@ AudioEngine::setPlaylist( Tomahawk::playlistinterface_ptr playlist )
|
|||||||
{
|
{
|
||||||
if ( m_playlist.data() )
|
if ( m_playlist.data() )
|
||||||
{
|
{
|
||||||
disconnect( m_playlist.data(), SIGNAL( previousTrackAvailable( bool ) ) );
|
disconnect( m_playlist.data(), SIGNAL( previousTrackAvailable() ) );
|
||||||
disconnect( m_playlist.data(), SIGNAL( nextTrackAvailable( bool ) ) );
|
disconnect( m_playlist.data(), SIGNAL( nextTrackAvailable() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_playlist.data()->reset();
|
m_playlist.data()->reset();
|
||||||
|
@@ -94,7 +94,7 @@ public slots:
|
|||||||
void playItem( const Tomahawk::artist_ptr& artist );
|
void playItem( const Tomahawk::artist_ptr& artist );
|
||||||
void playItem( const Tomahawk::album_ptr& album );
|
void playItem( const Tomahawk::album_ptr& album );
|
||||||
void setPlaylist( Tomahawk::playlistinterface_ptr playlist );
|
void setPlaylist( Tomahawk::playlistinterface_ptr playlist );
|
||||||
void setQueue( Tomahawk::playlistinterface_ptr queue ) { m_queue = queue; }
|
void setQueue( const Tomahawk::playlistinterface_ptr& queue );
|
||||||
|
|
||||||
void setStopAfterTrack( const Tomahawk::query_ptr& query );
|
void setStopAfterTrack( const Tomahawk::query_ptr& query );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user