mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 15:59:42 +01:00
Merge pull request #143 from crabmanX/master
show resolver icon in accounts widget for external resolvers
This commit is contained in:
commit
ef5487703c
@ -171,7 +171,7 @@ AccountDelegate::paint ( QPainter* painter, const QStyleOptionViewItem& option,
|
||||
QPixmap p = index.data( Qt::DecorationRole ).value< QPixmap >();
|
||||
QRect pixmapRect( leftEdge + PADDING, center - ICONSIZE/2, ICONSIZE, ICONSIZE );
|
||||
if ( p.isNull() ) // default image... TODO
|
||||
p = TomahawkUtils::defaultPixmap( TomahawkUtils::SipPluginOnline, TomahawkUtils::Original, pixmapRect.size() );
|
||||
p = TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultResolver, TomahawkUtils::Original, pixmapRect.size() );
|
||||
else
|
||||
p = p.scaled( pixmapRect.size(), Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
|
||||
|
@ -232,6 +232,11 @@ ResolverAccount::resolverChanged()
|
||||
emit connectionStateChanged( connectionState() );
|
||||
}
|
||||
|
||||
QPixmap
|
||||
ResolverAccount::icon() const
|
||||
{
|
||||
return m_resolver.data()->icon();
|
||||
}
|
||||
|
||||
/// AtticaResolverAccount
|
||||
|
||||
|
@ -77,8 +77,9 @@ public:
|
||||
|
||||
QString path() const;
|
||||
|
||||
virtual QPixmap icon() const;
|
||||
|
||||
// Not relevant
|
||||
virtual QPixmap icon() const { return QPixmap(); }
|
||||
virtual SipPlugin* sipPlugin() { return 0; }
|
||||
virtual Tomahawk::InfoSystem::InfoPluginPtr infoPlugin() { return Tomahawk::InfoSystem::InfoPluginPtr(); }
|
||||
virtual QWidget* aclWidget() { return 0; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user