diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-18 03:28:57 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-18 03:28:57 +0000 |
commit | 1d9d9f5ce46f0220f7b1b350f5ad4e6dc5079ac6 (patch) | |
tree | 728d80ad748a95d7aa27ee020706dbe985e0e8cb /amarok/src/systray.cpp | |
parent | e9db3e45ed0189bbe18125b120da394a5bc8a832 (diff) | |
download | amarok-1d9d9f5ce46f0220f7b1b350f5ad4e6dc5079ac6.tar.gz amarok-1d9d9f5ce46f0220f7b1b350f5ad4e6dc5079ac6.zip |
Finish TQt4 porting of Amarok
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/amarok@1228394 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'amarok/src/systray.cpp')
-rw-r--r-- | amarok/src/systray.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/amarok/src/systray.cpp b/amarok/src/systray.cpp index 98c591f5..0f7331ba 100644 --- a/amarok/src/systray.cpp +++ b/amarok/src/systray.cpp @@ -23,10 +23,10 @@ namespace Amarok { - static QPixmap + static TQPixmap loadOverlay( const char *iconName, int iconWidth ) { - return TQImage( locate( "data", TQString( "amarok/images/b_%1.png" ).arg( iconName ) ), "PNG" ).smoothScale( ((iconWidth/2)-(iconWidth/20)), ((iconWidth/2)-(iconWidth/20)) ); + return TQImage( locate( "data", TQString( "amarok/images/b_%1.png" ).tqarg( iconName ) ), "PNG" ).smoothScale( ((iconWidth/2)-(iconWidth/20)), ((iconWidth/2)-(iconWidth/20)) ); } } @@ -75,7 +75,7 @@ Amarok::TrayIcon::event( TQEvent *e ) return Amarok::genericEventHandler( this, e ); case TQEvent::Timer: - if( static_cast<TQTimerEvent*>(e)->timerId() != blinkTimerID ) + if( TQT_TQTIMEREVENT(e)->timerId() != blinkTimerID ) return KSystemTray::event( e ); // if we're playing, blink icon @@ -88,7 +88,7 @@ Amarok::TrayIcon::event( TQEvent *e ) return true; case TQEvent::MouseButtonPress: - if( static_cast<TQMouseEvent*>(e)->button() == Qt::MidButton ) + if( TQT_TQMOUSEEVENT(e)->button() == Qt::MidButton ) { EngineController::instance()->playPause(); @@ -146,12 +146,12 @@ Amarok::TrayIcon::engineStateChanged( Engine::State state, Engine::State /*oldSt if( AmarokConfig::animateTrayIcon() ) blinkTimerID = startTimer( 1500 ); // start 'blink' timer - paintIcon( mergeLevel, true ); // repaint the icon + paintIcon( mergeLevel, true ); // tqrepaint the icon break; case Engine::Empty: overlayVisible = false; - paintIcon( -1, true ); // repaint the icon + paintIcon( -1, true ); // tqrepaint the icon // fall through to default: default: setLastFm( false ); @@ -175,7 +175,7 @@ Amarok::TrayIcon::engineTrackPositionChanged( long position, bool /*userSeek*/ ) void Amarok::TrayIcon::paletteChange( const TQPalette & op ) { - if ( palette().active().highlight() == op.active().highlight() || alternateIcon.isNull() ) + if ( tqpalette().active().highlight() == op.active().highlight() || alternateIcon.isNull() ) return; alternateIcon.resize( 0, 0 ); @@ -209,11 +209,11 @@ Amarok::TrayIcon::paintIcon( int mergePixels, bool force ) // eros: this looks cool with dark red blue or green but sucks with // other colors (such as kde default's pale pink..). maybe the effect // or the blended color has to be changed.. - TQColor saturatedColor = palette().active().highlight(); + TQColor saturatedColor = tqpalette().active().highlight(); int hue, sat, value; saturatedColor.getHsv( &hue, &sat, &value ); saturatedColor.setHsv( hue, sat > 200 ? 200 : sat, value < 100 ? 100 : value ); - KIconEffect::colorize( tmpTrayIcon, saturatedColor/* Qt::blue */, 0.9 ); + KIconEffect::colorize( tmpTrayIcon, saturatedColor/* TQt::blue */, 0.9 ); alternateIcon = tmpTrayIcon; } |