mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-02-25 20:33:20 +01:00
* Track::socialActionPixmaps( action, height ) returns a list of matching avatars for a particular social action.
This commit is contained in:
parent
2ef38eb291
commit
76b20ccfc0
@ -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
|
||||
Track::artistPtr() const
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user