本文整理汇总了C++中query_ptr::album方法的典型用法代码示例。如果您正苦于以下问题:C++ query_ptr::album方法的具体用法?C++ query_ptr::album怎么用?C++ query_ptr::album使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类query_ptr
的用法示例。
在下文中一共展示了query_ptr::album方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QString
void
TrackInfoWidget::load( const query_ptr& query )
{
m_query = query;
m_artist = Artist::get( m_query->artist() );
m_title = QString( "%1 - %2" ).arg( query->artist() ).arg( query->track() );
if ( !m_query.isNull() )
{
disconnect( m_query.data(), SIGNAL( statsLoaded() ), this, SLOT( onStatsLoaded() ) );
disconnect( m_query.data(), SIGNAL( updated() ), this, SLOT( onCoverUpdated() ) );
disconnect( m_artist.data(), SIGNAL( statsLoaded() ), this, SLOT( onStatsLoaded() ) );
disconnect( m_artist.data(), SIGNAL( similarArtistsLoaded() ), this, SLOT( onSimilarArtistsLoaded() ) );
}
connect( m_artist.data(), SIGNAL( similarArtistsLoaded() ), SLOT( onSimilarArtistsLoaded() ) );
connect( m_artist.data(), SIGNAL( statsLoaded() ), SLOT( onStatsLoaded() ) );
connect( m_query.data(), SIGNAL( similarTracksLoaded() ), SLOT( onSimilarTracksLoaded() ) );
connect( m_query.data(), SIGNAL( updated() ), SLOT( onCoverUpdated() ) );
connect( m_query.data(), SIGNAL( statsLoaded() ), SLOT( onStatsLoaded() ) );
m_artist->loadStats();
m_query->loadStats();
onCoverUpdated();
ui->trackLabel->setText( query->track() );
ui->artistLabel->setText( query->artist() );
ui->albumLabel->setText( query->album() );
ui->fromLabel->setVisible( !query->album().isEmpty() );
m_query->similarTracks();
m_albumsModel->addArtists( m_artist->similarArtists() );
m_albumsModel->clear();
}
示例2: uuid
QList<Tomahawk::query_ptr>
PlaylistInterface::filterTracks( const QList<Tomahawk::query_ptr>& queries )
{
QList<Tomahawk::query_ptr> result;
for ( int i = 0; i < queries.count(); i++ )
{
bool picked = true;
const query_ptr q1 = queries.at( i );
for ( int j = 0; j < result.count(); j++ )
{
if ( !picked )
break;
const query_ptr& q2 = result.at( j );
if ( q1->track() == q2->track() )
{
picked = false;
}
}
if ( picked )
{
query_ptr q = Query::get( q1->artist(), q1->track(), q1->album(), uuid(), false );
q->setAlbumPos( q1->results().first()->albumpos() );
q->setDiscNumber( q1->discnumber() );
result << q;
}
}
Pipeline::instance()->resolve( result );
return result;
}
示例3: openLink
QUrl
GlobalActionManager::openLinkFromQuery( const query_ptr& query ) const
{
QString title, artist, album;
if( !query->results().isEmpty() && !query->results().first().isNull() )
{
title = query->results().first()->track();
artist = query->results().first()->artist().isNull() ? QString() : query->results().first()->artist()->name();
album = query->results().first()->album().isNull() ? QString() : query->results().first()->album()->name();
} else
{
title = query->track();
artist = query->artist();
album = query->album();
}
return openLink( title, artist, album );
}