1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-11 16:44:05 +02:00

Override resolver pixmap in AtticaResolverAccount

This commit is contained in:
Leo Franchi
2012-09-14 15:05:32 -04:00
parent 7bf019740c
commit a936f53cea
3 changed files with 11 additions and 0 deletions

View File

@@ -22,6 +22,8 @@
#include "ExternalResolver.h"
#include "DllMacro.h"
#include <QPixmap>
class QWidget;
namespace Tomahawk
@@ -41,6 +43,9 @@ public:
ExternalResolverGui( const QString& filePath );
virtual QWidget* configUI() const = 0;
virtual QPixmap icon() const { return QPixmap(); }
virtual void setIcon( const QPixmap& ) {}
protected:
QWidget* widgetFromData( QByteArray& data, QWidget* parent = 0 );
QVariant configMsgFromWidget( QWidget* w );

View File

@@ -274,7 +274,12 @@ AtticaResolverAccount::loadIcon()
codeDir.cd( "../images" );
if ( codeDir.exists() && codeDir.exists( "icon.png" ) )
{
m_icon.load( codeDir.absoluteFilePath( "icon.png" ) );
if ( !m_resolver.isNull() )
m_resolver.data()->setIcon( m_icon );
}
}

View File

@@ -141,6 +141,7 @@ public:
virtual bool running() const;
virtual void reload();
virtual void setIcon( const QPixmap& icon ) { m_icon = icon; }
public slots:
virtual void resolve( const Tomahawk::query_ptr& query );
virtual void stop();