summaryrefslogtreecommitdiffstats
path: root/amarok/src/osd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'amarok/src/osd.cpp')
-rw-r--r--amarok/src/osd.cpp230
1 files changed, 115 insertions, 115 deletions
diff --git a/amarok/src/osd.cpp b/amarok/src/osd.cpp
index da50436f..ff9c0cb8 100644
--- a/amarok/src/osd.cpp
+++ b/amarok/src/osd.cpp
@@ -29,26 +29,26 @@
#include <kpixmapeffect.h>
#include <kstandarddirs.h> //locate
-#include <qbitmap.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qvaluevector.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqvaluevector.h>
namespace ShadowEngine
{
- QImage makeShadow( const QPixmap &textPixmap, const QColor &bgColor );
+ TQImage makeShadow( const TQPixmap &textPixmap, const TQColor &bgColor );
}
#define MOODBAR_HEIGHT 20
-OSDWidget::OSDWidget( QWidget *parent, const char *name )
- : QWidget( parent, name, WType_TopLevel | WNoAutoErase | WStyle_Customize | WX11BypassWM | WStyle_StaysOnTop )
+OSDWidget::OSDWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name, WType_TopLevel | WNoAutoErase | WStyle_Customize | WX11BypassWM | WStyle_StaysOnTop )
, m_duration( 2000 )
- , m_timer( new QTimer( this ) )
+ , m_timer( new TQTimer( this ) )
, m_alignment( Middle )
, m_screen( 0 )
, m_y( MARGIN )
@@ -61,16 +61,16 @@ OSDWidget::OSDWidget( QWidget *parent, const char *name )
setBackgroundMode( NoBackground );
unsetColors();
- connect( m_timer, SIGNAL(timeout()), SLOT(hide()) );
- connect( CollectionDB::instance(), SIGNAL( ratingChanged( const QString&, int ) ),
- this, SLOT( ratingChanged( const QString&, int ) ) );
+ connect( m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(hide()) );
+ connect( CollectionDB::instance(), TQT_SIGNAL( ratingChanged( const TQString&, int ) ),
+ this, TQT_SLOT( ratingChanged( const TQString&, int ) ) );
- //or crashes, KWin bug I think, crashes in QWidget::icon()
+ //or crashes, KWin bug I think, crashes in TQWidget::icon()
kapp->setTopWidget( this );
}
void
-OSDWidget::show( const QString &text, QImage newImage )
+OSDWidget::show( const TQString &text, TQImage newImage )
{
#ifdef Q_WS_X11
m_text = text;
@@ -101,7 +101,7 @@ OSDWidget::ratingChanged( const short rating )
}
void
-OSDWidget::ratingChanged( const QString& path, int rating )
+OSDWidget::ratingChanged( const TQString& path, int rating )
{
const MetaBundle &currentTrack = EngineController::instance()->bundle();
if( currentTrack.isFile() && currentTrack.url().path() == path )
@@ -130,21 +130,21 @@ OSDWidget::show() //virtual
const uint M = fontMetrics().width( 'x' );
- const QRect oldGeometry = QRect( pos(), size() );
- const QRect newGeometry = determineMetrics( M );
+ const TQRect oldGeometry = TQRect( pos(), size() );
+ const TQRect newGeometry = determineMetrics( M );
if( m_translucency && !isShown() || !newGeometry.intersects( oldGeometry ) )
- m_screenshot = QPixmap::grabWindow( qt_xrootwin(),
+ m_screenshot = TQPixmap::grabWindow( qt_xrootwin(),
newGeometry.x(), newGeometry.y(),
newGeometry.width(), newGeometry.height() );
else if( m_translucency )
{
- const QRect unite = oldGeometry.unite( newGeometry );
- KPixmap pix = QPixmap::grabWindow( qt_xrootwin(), unite.x(), unite.y(), unite.width(), unite.height() );
+ const TQRect unite = oldGeometry.unite( newGeometry );
+ KPixmap pix = TQPixmap::grabWindow( qt_xrootwin(), unite.x(), unite.y(), unite.width(), unite.height() );
- QPoint p = oldGeometry.topLeft() - unite.topLeft();
+ TQPoint p = oldGeometry.topLeft() - unite.topLeft();
bitBlt( &pix, p, &m_screenshot );
m_screenshot.resize( newGeometry.size() );
@@ -157,7 +157,7 @@ OSDWidget::show() //virtual
{
render( M, newGeometry.size() );
setGeometry( newGeometry );
- QWidget::show();
+ TQWidget::show();
bitBlt( this, 0, 0, &m_buffer );
if( m_duration ) //duration 0 -> stay forever
@@ -172,30 +172,30 @@ QRect
OSDWidget::determineMetrics( const uint M )
{
// sometimes we only have a tiddly cover
- const QSize minImageSize = m_cover.size().boundedTo( QSize(100,100) );
+ const TQSize minImageSize = m_cover.size().boundedTo( TQSize(100,100) );
// determine a sensible maximum size, don't cover the whole desktop or cross the screen
- const QSize margin( (M + MARGIN) * 2, (M + MARGIN) * 2 ); //margins
- const QSize image = m_cover.isNull() ? QSize( 0, 0 ) : minImageSize;
- const QSize max = QApplication::desktop()->screen( m_screen )->size() - margin;
+ const TQSize margin( (M + MARGIN) * 2, (M + MARGIN) * 2 ); //margins
+ const TQSize image = m_cover.isNull() ? TQSize( 0, 0 ) : minImageSize;
+ const TQSize max = TQApplication::desktop()->screen( m_screen )->size() - margin;
// If we don't do that, the boundingRect() might not be suitable for drawText() (Qt issue N67674)
- m_text.replace( QRegExp(" +\n"), "\n" );
+ m_text.replace( TQRegExp(" +\n"), "\n" );
// remove consecutive line breaks
- m_text.replace( QRegExp("\n+"), "\n" );
+ m_text.replace( TQRegExp("\n+"), "\n" );
// The osd cannot be larger than the screen
- QRect rect = fontMetrics().boundingRect( 0, 0,
+ TQRect rect = fontMetrics().boundingRect( 0, 0,
max.width() - image.width(), max.height(),
AlignCenter | WordBreak, m_text );
if( m_volume )
{
- static const QString tmp = QString ("******").insert( 3,
+ static const TQString tmp = TQString ("******").insert( 3,
( i18n("Volume: 100%").length() >= i18n("Mute").length() )?
i18n("Volume: 100%") : i18n("Mute") );
- QRect tmpRect = fontMetrics().boundingRect( 0, 0,
+ TQRect tmpRect = fontMetrics().boundingRect( 0, 0,
max.width() - image.width(), max.height() - fontMetrics().height(),
AlignCenter | WordBreak, tmp );
tmpRect.setHeight( tmpRect.height() + fontMetrics().height() / 2 );
@@ -205,7 +205,7 @@ OSDWidget::determineMetrics( const uint M )
if( m_rating )
{
- QPixmap* star = StarManager::instance()->getStar( 1, true );
+ TQPixmap* star = StarManager::instance()->getStar( 1, true );
if( rect.width() < star->width() * 5 )
rect.setWidth( star->width() * 5 ); //changes right edge position
rect.setHeight( rect.height() + star->height() + M ); //changes bottom edge pos
@@ -221,7 +221,7 @@ OSDWidget::determineMetrics( const uint M )
m_scaledCover = m_cover.smoothScale(
QMIN( availableWidth, m_cover.width() ),
QMIN( rect.height(), m_cover.height() ),
- QImage::ScaleMin ); //this will force us to be with our bounds
+ TQImage::ScaleMin ); //this will force us to be with our bounds
int shadowWidth = 0;
if( m_drawShadow && !m_scaledCover.hasAlpha() &&
@@ -239,9 +239,9 @@ OSDWidget::determineMetrics( const uint M )
// expand in all directions by M
rect.addCoords( -M, -M, M, M );
- const QSize newSize = rect.size();
- const QRect screen = QApplication::desktop()->screenGeometry( m_screen );
- QPoint newPos( MARGIN, m_y );
+ const TQSize newSize = rect.size();
+ const TQRect screen = TQApplication::desktop()->screenGeometry( m_screen );
+ TQPoint newPos( MARGIN, m_y );
switch( m_alignment )
{
@@ -269,34 +269,34 @@ OSDWidget::determineMetrics( const uint M )
// correct for screen position
newPos += screen.topLeft();
- return QRect( newPos, rect.size() );
+ return TQRect( newPos, rect.size() );
}
void
-OSDWidget::render( const uint M, const QSize &size )
+OSDWidget::render( const uint M, const TQSize &size )
{
/// render with margin/spacing @param M and @param size
- QPoint point;
- QRect rect( point, size );
+ TQPoint point;
+ TQRect rect( point, size );
// From qt sources
const uint xround = (M * 200) / size.width();
const uint yround = (M * 200) / size.height();
{ /// apply the mask
- static QBitmap mask;
+ static TQBitmap mask;
mask.resize( size );
mask.fill( Qt::black );
- QPainter p( &mask );
+ TQPainter p( &mask );
p.setBrush( Qt::white );
p.drawRoundRect( rect, xround, yround );
setMask( mask );
}
- QColor shadowColor;
+ TQColor shadowColor;
{
int h,s,v;
foregroundColor().getHsv( &h, &s, &v );
@@ -306,7 +306,7 @@ OSDWidget::render( const uint M, const QSize &size )
int align = Qt::AlignCenter | WordBreak;
m_buffer.resize( rect.size() );
- QPainter p( &m_buffer );
+ TQPainter p( &m_buffer );
if( m_translucency )
{
@@ -324,20 +324,20 @@ OSDWidget::render( const uint M, const QSize &size )
if( !m_cover.isNull() )
{
- QRect r( rect );
+ TQRect r( rect );
r.setTop( (size.height() - m_scaledCover.height()) / 2 );
r.setSize( m_scaledCover.size() );
if( !m_scaledCover.hasAlpha() && m_drawShadow &&
( m_scaledCover.width() > 22 || m_scaledCover.height() > 22 ) ) {
// don't draw a shadow for eg, the Amarok icon
- QImage shadow;
+ TQImage shadow;
const uint shadowSize = static_cast<uint>( m_scaledCover.width() / 100.0 * 6.0 );
- const QString folder = Amarok::saveLocation( "covershadow-cache/" );
- const QString file = QString( "shadow_albumcover%1x%2.png" ).arg( m_scaledCover.width() + shadowSize )
+ const TQString folder = Amarok::saveLocation( "covershadow-cache/" );
+ const TQString file = TQString( "shadow_albumcover%1x%2.png" ).arg( m_scaledCover.width() + shadowSize )
.arg( m_scaledCover.height() + shadowSize );
- if ( QFile::exists( folder + file ) )
+ if ( TQFile::exists( folder + file ) )
shadow.load( folder + file );
else {
shadow.load( locate( "data", "amarok/images/shadow_albumcover.png" ) );
@@ -345,7 +345,7 @@ OSDWidget::render( const uint M, const QSize &size )
shadow.save( folder + file, "PNG" );
}
- QPixmap target;
+ TQPixmap target;
target.convertFromImage( shadow ); //FIXME slow
copyBlt( &target, 0, 0, &m_scaledCover );
m_scaledCover = target;
@@ -360,27 +360,27 @@ OSDWidget::render( const uint M, const QSize &size )
if( m_volume )
{
- QPixmap vol;
- vol = QPixmap( rect.width(), rect.height() + fontMetrics().height() / 4 );
+ TQPixmap vol;
+ vol = TQPixmap( rect.width(), rect.height() + fontMetrics().height() / 4 );
- QPixmap buf( vol.size() );
- QRect r( rect );
+ TQPixmap buf( vol.size() );
+ TQRect r( rect );
r.setLeft( rect.left() + rect.width() / 2 - vol.width() / 2 );
r.setTop( size.height() / 2 - vol.height() / 2);
KPixmap pixmapGradient;
{ // gradient
- QBitmap mask;
+ TQBitmap mask;
mask.resize( vol.size() );
mask.fill( Qt::black );
- QPainter p( &mask );
+ TQPainter p( &mask );
p.setBrush( Qt::white );
p.drawRoundRect ( 3, 3, vol.width() - 6, vol.height() - 6,
M * 300 / vol.width(), 99 );
p.end();
- pixmapGradient = QPixmap( vol.size() );
+ pixmapGradient = TQPixmap( vol.size() );
KPixmapEffect::gradient( pixmapGradient, colorGroup().background(),
colorGroup().highlight(), KPixmapEffect::EllipticGradient );
pixmapGradient.setMask( mask );
@@ -396,11 +396,11 @@ OSDWidget::render( const uint M, const QSize &size )
vol.fill( backgroundColor() );
{ // vol ( bg-alpha )
- static QBitmap mask;
+ static TQBitmap mask;
mask.resize( vol.size() );
mask.fill( Qt::white );
- QPainter p( &mask );
+ TQPainter p( &mask );
p.setBrush( Qt::black );
p.drawRoundRect ( 1, 1, rect.width()-2, rect.height() + fontMetrics().height() / 4 - 2,
M * 300 / vol.width(), 99 );
@@ -421,14 +421,14 @@ OSDWidget::render( const uint M, const QSize &size )
m_volume = false;
}
- QPixmap* star = StarManager::instance()->getStar( m_rating/2, true );
+ TQPixmap* star = StarManager::instance()->getStar( m_rating/2, true );
int graphicsHeight = 0;
if( useMoodbar() )
{
- QPixmap moodbar
+ TQPixmap moodbar
= m_moodbarBundle.moodbar().draw( rect.width(), MOODBAR_HEIGHT );
- QRect r( rect );
+ TQRect r( rect );
r.setTop( rect.bottom() - moodbar.height()
- (m_rating ? star->height() + M : 0) );
graphicsHeight += moodbar.height() + M;
@@ -439,7 +439,7 @@ OSDWidget::render( const uint M, const QSize &size )
if( m_rating > 0 )
{
- QRect r( rect );
+ TQRect r( rect );
//Align to center...
r.setLeft(( rect.left() + rect.width() / 2 ) - star->width() * m_rating / 4 );
@@ -450,7 +450,7 @@ OSDWidget::render( const uint M, const QSize &size )
if( half )
{
- QPixmap* halfStar = StarManager::instance()->getHalfStar( m_rating/2 + 1, true );
+ TQPixmap* halfStar = StarManager::instance()->getHalfStar( m_rating/2 + 1, true );
p.drawPixmap( r.left() + star->width() * ( m_rating / 2 ), r.top(), *halfStar );
star = StarManager::instance()->getStar( m_rating/2 + 1, true );
}
@@ -467,18 +467,18 @@ OSDWidget::render( const uint M, const QSize &size )
if( m_drawShadow )
{
- QPixmap pixmap( rect.size() + QSize(10,10) );
+ TQPixmap pixmap( rect.size() + TQSize(10,10) );
pixmap.fill( Qt::black );
pixmap.setMask( pixmap.createHeuristicMask( true ) );
- QPainter p2( &pixmap );
+ TQPainter p2( &pixmap );
p2.setFont( font() );
p2.setPen( Qt::white );
p2.setBrush( Qt::white );
- p2.drawText( QRect(QPoint(5,5), rect.size()), align , m_text );
+ p2.drawText( TQRect(TQPoint(5,5), rect.size()), align , m_text );
p2.end();
- p.drawImage( rect.topLeft() - QPoint(5,5), ShadowEngine::makeShadow( pixmap, shadowColor ) );
+ p.drawImage( rect.topLeft() - TQPoint(5,5), ShadowEngine::makeShadow( pixmap, shadowColor ) );
}
p.setPen( foregroundColor() );
@@ -488,24 +488,24 @@ OSDWidget::render( const uint M, const QSize &size )
}
bool
-OSDWidget::event( QEvent *e )
+OSDWidget::event( TQEvent *e )
{
switch( e->type() )
{
- case QEvent::ApplicationPaletteChange:
+ case TQEvent::ApplicationPaletteChange:
if( !AmarokConfig::osdUseCustomColors() )
unsetColors(); //use new palette's colours
return true;
- case QEvent::Paint:
+ case TQEvent::Paint:
bitBlt( this, 0, 0, &m_buffer );
return true;
default:
- return QWidget::event( e );
+ return TQWidget::event( e );
}
}
void
-OSDWidget::mousePressEvent( QMouseEvent* )
+OSDWidget::mousePressEvent( TQMouseEvent* )
{
hide();
}
@@ -513,7 +513,7 @@ OSDWidget::mousePressEvent( QMouseEvent* )
void
OSDWidget::unsetColors()
{
- const QColorGroup c = QApplication::palette().active();
+ const TQColorGroup c = TQApplication::palette().active();
setPaletteForegroundColor( c.highlightedText() );
setPaletteBackgroundColor( c.highlight() );
@@ -522,7 +522,7 @@ OSDWidget::unsetColors()
void
OSDWidget::setScreen( int screen )
{
- const int n = QApplication::desktop()->numScreens();
+ const int n = TQApplication::desktop()->numScreens();
m_screen = (screen >= n) ? n-1 : screen;
}
@@ -541,10 +541,10 @@ OSDWidget::useMoodbar( void )
namespace Amarok
{
- QImage icon() { return QImage( KIconLoader().iconPath( "amarok", -KIcon::SizeHuge ) ); }
+ TQImage icon() { return TQImage( KIconLoader().iconPath( "amarok", -KIcon::SizeHuge ) ); }
}
-OSDPreviewWidget::OSDPreviewWidget( QWidget *parent )
+OSDPreviewWidget::OSDPreviewWidget( TQWidget *parent )
: OSDWidget( parent, "osdpreview" )
, m_dragging( false )
{
@@ -553,7 +553,7 @@ OSDPreviewWidget::OSDPreviewWidget( QWidget *parent )
m_cover = Amarok::icon();
}
-void OSDPreviewWidget::mousePressEvent( QMouseEvent *event )
+void OSDPreviewWidget::mousePressEvent( TQMouseEvent *event )
{
m_dragOffset = event->pos();
@@ -564,7 +564,7 @@ void OSDPreviewWidget::mousePressEvent( QMouseEvent *event )
}
-void OSDPreviewWidget::mouseReleaseEvent( QMouseEvent * /*event*/ )
+void OSDPreviewWidget::mouseReleaseEvent( TQMouseEvent * /*event*/ )
{
if( m_dragging )
{
@@ -572,13 +572,13 @@ void OSDPreviewWidget::mouseReleaseEvent( QMouseEvent * /*event*/ )
releaseMouse();
// compute current Position && offset
- QDesktopWidget *desktop = QApplication::desktop();
+ TQDesktopWidget *desktop = TQApplication::desktop();
int currentScreen = desktop->screenNumber( pos() );
if( currentScreen != -1 ) {
// set new data
m_screen = currentScreen;
- m_y = QWidget::y();
+ m_y = TQWidget::y();
emit positionChanged();
}
@@ -586,18 +586,18 @@ void OSDPreviewWidget::mouseReleaseEvent( QMouseEvent * /*event*/ )
}
-void OSDPreviewWidget::mouseMoveEvent( QMouseEvent *e )
+void OSDPreviewWidget::mouseMoveEvent( TQMouseEvent *e )
{
if( m_dragging && this == mouseGrabber() )
{
// Here we implement a "snap-to-grid" like positioning system for the preview widget
- const QRect screen = QApplication::desktop()->screenGeometry( m_screen );
+ const TQRect screen = TQApplication::desktop()->screenGeometry( m_screen );
const uint hcenter = screen.width() / 2;
const uint eGlobalPosX = e->globalPos().x() - screen.left();
const uint snapZone = screen.width() / 24;
- QPoint destination = e->globalPos() - m_dragOffset - screen.topLeft();
+ TQPoint destination = e->globalPos() - m_dragOffset - screen.topLeft();
int maxY = screen.height() - height() - MARGIN;
if( destination.y() < MARGIN ) destination.ry() = MARGIN;
if( destination.y() > maxY ) destination.ry() = maxY;
@@ -636,40 +636,40 @@ void OSDPreviewWidget::mouseMoveEvent( QMouseEvent *e )
#include "enginecontroller.h"
#include "metabundle.h"
-#include <qregexp.h>
+#include <tqregexp.h>
Amarok::OSD::OSD(): OSDWidget( 0 )
{
- connect( CollectionDB::instance(), SIGNAL( coverChanged( const QString&, const QString& ) ),
- this, SLOT( slotCoverChanged( const QString&, const QString& ) ) );
- connect( CollectionDB::instance(), SIGNAL( imageFetched( const QString& ) ),
- this, SLOT( slotImageChanged( const QString& ) ) );
+ connect( CollectionDB::instance(), TQT_SIGNAL( coverChanged( const TQString&, const TQString& ) ),
+ this, TQT_SLOT( slotCoverChanged( const TQString&, const TQString& ) ) );
+ connect( CollectionDB::instance(), TQT_SIGNAL( imageFetched( const TQString& ) ),
+ this, TQT_SLOT( slotImageChanged( const TQString& ) ) );
}
void
Amarok::OSD::show( const MetaBundle &bundle ) //slot
{
#ifdef Q_WS_X11
- QString text = "";
+ TQString text = "";
if( bundle.url().isEmpty() )
text = i18n( "No track playing" );
else
{
- QValueVector<QString> tags;
+ TQValueVector<TQString> tags;
tags.append(bundle.prettyTitle());
for( int i = 0; i < PlaylistItem::NUM_COLUMNS; ++i )
tags.append(bundle.prettyText( i ));
if( bundle.length() <= 0 )
- tags[PlaylistItem::Length+1] = QString::null;
+ tags[PlaylistItem::Length+1] = TQString::null;
if( AmarokConfig::osdUsePlaylistColumns() )
{
- QString tag;
- QValueVector<int> availableTags; //eg, ones that aren't empty
- static const QValueList<int> parens = //display these in parentheses
- QValueList<int>() << PlaylistItem::PlayCount << PlaylistItem::Year << PlaylistItem::Comment
+ TQString tag;
+ TQValueVector<int> availableTags; //eg, ones that aren't empty
+ static const TQValueList<int> parens = //display these in parentheses
+ TQValueList<int>() << PlaylistItem::PlayCount << PlaylistItem::Year << PlaylistItem::Comment
<< PlaylistItem::Genre << PlaylistItem::Length << PlaylistItem::Bitrate
<< PlaylistItem::LastPlayed << PlaylistItem::Score << PlaylistItem::Filesize;
OSDWidget::setMoodbar();
@@ -688,7 +688,7 @@ Amarok::OSD::show( const MetaBundle &bundle ) //slot
for( int n = availableTags.count(), i = 0; i < n; ++i )
{
const int column = availableTags.at( i );
- QString append = ( i == 0 ) ? ""
+ TQString append = ( i == 0 ) ? ""
: ( n > 1 && i == n / 2 ) ? "\n"
: ( parens.contains( column ) || parens.contains( availableTags.at( i - 1 ) ) ) ? " "
: i18n(" - ");
@@ -698,13 +698,13 @@ Amarok::OSD::show( const MetaBundle &bundle ) //slot
}
else
{
- QMap<QString, QString> args;
+ TQMap<TQString, TQString> args;
args["prettytitle"] = bundle.prettyTitle();
for( int i = 0; i < PlaylistItem::NUM_COLUMNS; ++i )
args[bundle.exactColumnName( i ).lower()] = bundle.prettyText( i );
if( bundle.length() <= 0 )
- args["length"] = QString::null;
+ args["length"] = TQString::null;
uint time=EngineController::instance()->engine()->position();
@@ -713,17 +713,17 @@ Amarok::OSD::show( const MetaBundle &bundle ) //slot
uint min=(time/60)%60;
time /= 60;
uint hour=(time/60)%60;
- QString timeformat="";
+ TQString timeformat="";
if(hour!=0)
{
- timeformat += QString::number(hour);
+ timeformat += TQString::number(hour);
timeformat +=":";
}
- timeformat +=QString::number(min);
+ timeformat +=TQString::number(min);
timeformat +=":";
if(sec<10)
timeformat +="0";
- timeformat +=QString::number(sec);
+ timeformat +=TQString::number(sec);
args["elapsed"]=timeformat;
QStringx osd = AmarokConfig::osdText();
@@ -749,7 +749,7 @@ Amarok::OSD::show( const MetaBundle &bundle ) //slot
//avoid showing the generic cover. we can overwrite this by passing an arg.
//get large cover for scaling if big cover needed
- QString location = QString::null;
+ TQString location = TQString::null;
if( bundle.podcastBundle() )
location = CollectionDB::instance()->podcastImage( bundle, false, 0 );
else
@@ -819,12 +819,12 @@ Amarok::OSD::forceToggleOSD()
}
void
-Amarok::OSD::slotCoverChanged( const QString &artist, const QString &album )
+Amarok::OSD::slotCoverChanged( const TQString &artist, const TQString &album )
{
if( AmarokConfig::osdCover() && artist == EngineController::instance()->bundle().artist()
&& album == EngineController::instance()->bundle().album() )
{
- QString location = CollectionDB::instance()->albumImage( artist, album, false, 0 );
+ TQString location = CollectionDB::instance()->albumImage( artist, album, false, 0 );
if( location.find( "nocover" ) != -1 )
setImage( Amarok::icon() );
@@ -834,9 +834,9 @@ Amarok::OSD::slotCoverChanged( const QString &artist, const QString &album )
}
void
-Amarok::OSD::slotImageChanged( const QString &remoteURL )
+Amarok::OSD::slotImageChanged( const TQString &remoteURL )
{
- QString url = EngineController::instance()->bundle().url().url();
+ TQString url = EngineController::instance()->bundle().url().url();
PodcastEpisodeBundle peb;
if( CollectionDB::instance()->getPodcastEpisodeBundle( url, &peb ) )
{
@@ -845,7 +845,7 @@ Amarok::OSD::slotImageChanged( const QString &remoteURL )
{
if( pcb.imageURL().url() == remoteURL )
{
- QString location = CollectionDB::instance()->podcastImage( remoteURL, false, 0 );
+ TQString location = CollectionDB::instance()->podcastImage( remoteURL, false, 0 );
if( location == CollectionDB::instance()->notAvailCover( false, 0 ) )
setImage( Amarok::icon() );
else
@@ -891,11 +891,11 @@ namespace ShadowEngine
// Self explanatory
static const int MAX_OPACITY = 200;
- double decay( QImage&, int, int );
+ double decay( TQImage&, int, int );
- QImage makeShadow( const QPixmap& textPixmap, const QColor &bgColor )
+ TQImage makeShadow( const TQPixmap& textPixmap, const TQColor &bgColor )
{
- QImage result;
+ TQImage result;
const int w = textPixmap.width();
const int h = textPixmap.height();
@@ -906,7 +906,7 @@ namespace ShadowEngine
int alphaShadow;
// This is the source pixmap
- QImage img = textPixmap.convertToImage().convertDepth( 32 );
+ TQImage img = textPixmap.convertToImage().convertDepth( 32 );
result.create( w, h, 32 );
result.fill( 0 ); // fill with black
@@ -925,7 +925,7 @@ namespace ShadowEngine
return result;
}
- double decay( QImage& source, int i, int j )
+ double decay( TQImage& source, int i, int j )
{
//if ((i < 1) || (j < 1) || (i > source.width() - 2) || (j > source.height() - 2))
// return 0;