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