1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-24 01:39:42 +01:00

* Cleaned up DropJobNotifier.

This commit is contained in:
Christian Muehlhaeuser 2012-05-28 16:11:57 +02:00
parent 9d26f342d3
commit 7cacc42737

View File

@ -32,25 +32,25 @@
#include <QtNetwork/QNetworkAccessManager>
#include <QtNetwork/QNetworkReply>
class QNetworkReply;
using namespace Tomahawk;
DropJobNotifier::DropJobNotifier( QPixmap servicePixmap, QString service, DropJob::DropType type, QNetworkReply* job )
: JobStatusItem()
, m_type( "unknown" )
, m_job( 0 )
, m_pixmap ( servicePixmap )
, m_service ( service )
, m_pixmap( servicePixmap )
, m_service( service )
{
init( type );
if( m_service.isEmpty() )
if ( m_service.isEmpty() )
m_service = "DropJob";
connect( job, SIGNAL( finished() ), this, SLOT( setFinished() ) );
}
DropJobNotifier::DropJobNotifier( QPixmap pixmap, DropJob::DropType type )
: JobStatusItem()
, m_job( 0 )
@ -61,23 +61,24 @@ DropJobNotifier::DropJobNotifier( QPixmap pixmap, DropJob::DropType type )
DropJobNotifier::~DropJobNotifier()
{}
{
}
void
DropJobNotifier::init( DropJob::DropType type )
{
if( type == DropJob::Playlist )
m_type = "playlist";
if ( type == DropJob::Playlist )
m_type = tr( "playlist" );
if( type == DropJob::Artist )
m_type = "artist";
if ( type == DropJob::Artist )
m_type = tr( "artist" );
if( type == DropJob::Track )
m_type = "track";
if( type == DropJob::Album )
m_type = "album";
if ( type == DropJob::Track )
m_type = tr( "track" );
if ( type == DropJob::Album )
m_type = tr( "album" );
}
@ -87,6 +88,7 @@ DropJobNotifier::rightColumnText() const
return QString();
}
QPixmap
DropJobNotifier::icon() const
{
@ -108,6 +110,7 @@ DropJobNotifier::mainText() const
}
}
void
DropJobNotifier::setFinished()
{