1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-02-26 12:53:41 +01:00

* Track::socialActionPixmaps( action, height ) returns a list of matching avatars for a particular social action.

This commit is contained in:
Christian Muehlhaeuser 2013-09-03 12:14:24 +02:00
parent 2ef38eb291
commit 76b20ccfc0

View File

@ -518,6 +518,29 @@ Track::socialActionDescription( const QString& action, DescriptionMode mode ) co
} }
QList< QPixmap >
Track::socialActionPixmaps( const QString& action, unsigned int height ) const
{
QList< QPixmap > pixmaps;
QList< Tomahawk::SocialAction > socialActions = allSocialActions();
QStringList actionSources;
foreach ( const Tomahawk::SocialAction& sa, socialActions )
{
if ( sa.action == action )
{
if ( actionSources.contains( sa.source->friendlyName() ) )
continue;
actionSources << sa.source->friendlyName();
pixmaps << sa.source->avatar( TomahawkUtils::Original, QSize( height, height ) );
}
}
return pixmaps;
}
artist_ptr artist_ptr
Track::artistPtr() const Track::artistPtr() const
{ {