|
|
@ -45,6 +45,8 @@ email : markey@web.de
|
|
|
|
#include <kurldrag.h>
|
|
|
|
#include <kurldrag.h>
|
|
|
|
#include <kwin.h> //eventFilter()
|
|
|
|
#include <kwin.h> //eventFilter()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <kimageeffect.h>
|
|
|
|
|
|
|
|
|
|
|
|
//simple function for fetching amarok images
|
|
|
|
//simple function for fetching amarok images
|
|
|
|
namespace Amarok
|
|
|
|
namespace Amarok
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -54,14 +56,22 @@ namespace Amarok
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQString file = !filename.tqendsWith( ".png", false ) ? "amarok/images/%1.png" : "amarok/images/%1";
|
|
|
|
TQString file = !filename.tqendsWith( ".png", false ) ? "amarok/images/%1.png" : "amarok/images/%1";
|
|
|
|
|
|
|
|
|
|
|
|
return TQPixmap( locate( "data", file.tqarg( filename ) ), "PNG" );
|
|
|
|
TQPixmap pix;
|
|
|
|
|
|
|
|
TQImage img( locate( "data", file.tqarg( filename ) ), "PNG" );
|
|
|
|
|
|
|
|
if (TQPaintDevice::x11AppDepth() == 32) pix.convertFromImage(KImageEffect::convertToPremultipliedAlpha( img ));
|
|
|
|
|
|
|
|
else pix.convertFromImage( img );
|
|
|
|
|
|
|
|
return pix;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TQPixmap getJPG( const TQString &filename )
|
|
|
|
TQPixmap getJPG( const TQString &filename )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQString file = !filename.tqendsWith( ".jpg", false ) ? "amarok/images/%1.jpg" : "amarok/images/%1";
|
|
|
|
TQString file = !filename.tqendsWith( ".jpg", false ) ? "amarok/images/%1.jpg" : "amarok/images/%1";
|
|
|
|
|
|
|
|
|
|
|
|
return TQPixmap( locate( "data", TQString( "amarok/images/%1.jpg" ).tqarg( filename ) ), "JPEG" );
|
|
|
|
TQPixmap pix;
|
|
|
|
|
|
|
|
TQImage img( locate( "data", TQString( "amarok/images/%1.jpg" ).tqarg( filename ) ), "JPEG" );
|
|
|
|
|
|
|
|
if (TQPaintDevice::x11AppDepth() == 32) pix.convertFromImage(KImageEffect::convertToPremultipliedAlpha( img ));
|
|
|
|
|
|
|
|
else pix.convertFromImage( img );
|
|
|
|
|
|
|
|
return pix;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|