本文整理汇总了C++中tomahawk::playlistinterface_ptr类的典型用法代码示例。如果您正苦于以下问题:C++ playlistinterface_ptr类的具体用法?C++ playlistinterface_ptr怎么用?C++ playlistinterface_ptr使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了playlistinterface_ptr类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void
MprisPlugin::setLoopStatus( const QString& value )
{
Tomahawk::playlistinterface_ptr p = MainAudioEngine::instance()->playlist();
if ( p.isNull() )
return;
if ( value == "Track" )
p->setRepeatMode( PlaylistModes::RepeatOne );
else if ( value == "Playlist" )
p->setRepeatMode( PlaylistModes::RepeatAll );
else if ( value == "None" )
p->setRepeatMode( PlaylistModes::NoRepeat );
}
示例2: if
void
AudioEngine::playItem( Tomahawk::playlistinterface_ptr playlist, const Tomahawk::result_ptr& result, const Tomahawk::query_ptr& fromQuery )
{
tDebug( LOGEXTRA ) << Q_FUNC_INFO << ( result.isNull() ? QString() : result->url() );
if ( !m_playlist.isNull() )
m_playlist.data()->reset();
setPlaylist( playlist );
if ( playlist.isNull() && !fromQuery.isNull() )
m_currentTrackPlaylist = playlistinterface_ptr( new SingleTrackPlaylistInterface( fromQuery ) );
else
m_currentTrackPlaylist = playlist;
if ( !result.isNull() )
{
loadTrack( result );
}
else if ( !m_playlist.isNull() && m_playlist.data()->retryMode() == PlaylistModes::Retry )
{
m_waitingOnNewTrack = true;
if ( isStopped() )
emit sendWaitingNotification();
else
stop();
}
}
示例3: playlistChanged
void
AudioEngine::setPlaylist( Tomahawk::playlistinterface_ptr playlist )
{
if ( m_playlist == playlist )
return;
if ( !m_playlist.isNull() )
{
if ( m_playlist.data() && m_playlist.data()->retryMode() == PlaylistModes::Retry )
disconnect( m_playlist.data(), SIGNAL( nextTrackReady() ) );
m_playlist.data()->reset();
}
if ( playlist.isNull() )
{
m_playlist.clear();
emit playlistChanged( playlist );
return;
}
m_playlist = playlist;
m_stopAfterTrack.clear();
if ( !m_playlist.isNull() && m_playlist.data() && m_playlist.data()->retryMode() == PlaylistModes::Retry )
connect( m_playlist.data(), SIGNAL( nextTrackReady() ), SLOT( onPlaylistNextTrackReady() ) );
emit playlistChanged( playlist );
}
示例4: playlistChanged
void
AudioEngine::setPlaylist( Tomahawk::playlistinterface_ptr playlist )
{
if ( m_playlist == playlist )
return;
if ( !m_playlist.isNull() )
{
if ( m_playlist.data() )
{
disconnect( m_playlist.data(), SIGNAL( previousTrackAvailable() ) );
disconnect( m_playlist.data(), SIGNAL( nextTrackAvailable() ) );
}
m_playlist.data()->reset();
}
if ( playlist.isNull() )
{
m_playlist.clear();
emit playlistChanged( playlist );
return;
}
m_playlist = playlist;
m_stopAfterTrack.clear();
if ( !m_playlist.isNull() )
{
connect( m_playlist.data(), SIGNAL( nextTrackAvailable() ), SLOT( onPlaylistNextTrackAvailable() ) );
connect( m_playlist.data(), SIGNAL( previousTrackAvailable() ), SIGNAL( controlStateChanged() ) );
connect( m_playlist.data(), SIGNAL( nextTrackAvailable() ), SIGNAL( controlStateChanged() ) );
}
emit playlistChanged( playlist );
}