本文整理汇总了C++中tomahawk::playlist_ptr::loaded方法的典型用法代码示例。如果您正苦于以下问题:C++ playlist_ptr::loaded方法的具体用法?C++ playlist_ptr::loaded怎么用?C++ playlist_ptr::loaded使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tomahawk::playlist_ptr
的用法示例。
在下文中一共展示了playlist_ptr::loaded方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: disconnect
void
PlaylistModel::loadPlaylist( const Tomahawk::playlist_ptr& playlist, bool loadEntries )
{
Q_D( PlaylistModel );
if ( d->playlist )
{
disconnect( d->playlist.data(), SIGNAL( revisionLoaded( Tomahawk::PlaylistRevision ) ), this, SLOT( onRevisionLoaded( Tomahawk::PlaylistRevision ) ) );
disconnect( d->playlist.data(), SIGNAL( deleted( Tomahawk::playlist_ptr ) ), this, SIGNAL( playlistDeleted() ) );
disconnect( d->playlist.data(), SIGNAL( changed() ), this, SLOT( onPlaylistChanged() ) );
}
if ( loadEntries )
{
startLoading();
clear();
}
d->playlist = playlist;
connect( playlist.data(), SIGNAL( revisionLoaded( Tomahawk::PlaylistRevision ) ), SLOT( onRevisionLoaded( Tomahawk::PlaylistRevision ) ) );
connect( playlist.data(), SIGNAL( deleted( Tomahawk::playlist_ptr ) ), SIGNAL( playlistDeleted() ) );
connect( playlist.data(), SIGNAL( changed() ), SLOT( onPlaylistChanged() ) );
setReadOnly( !d->playlist->author()->isLocal() );
d->isTemporary = false;
onPlaylistChanged();
if ( !loadEntries )
return;
if ( playlist->loaded() )
{
QList<plentry_ptr> entries = playlist->entries();
appendEntries( entries );
// finishLoading() will be called by appendEntries, so it can keep showing it until all tracks are resolved
// finishLoading();
/* foreach ( const plentry_ptr& p, entries )
qDebug() << p->guid() << p->query()->track() << p->query()->artist(); */
}
}