From 838baf3f99ec5ab81b063eb5449a3381d860f377 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 11 Jun 2011 04:58:26 +0000 Subject: TQt4 port kdegames This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1236074 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kenolaba/Ball.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'kenolaba/Ball.cpp') diff --git a/kenolaba/Ball.cpp b/kenolaba/Ball.cpp index 525f919b..b0584287 100644 --- a/kenolaba/Ball.cpp +++ b/kenolaba/Ball.cpp @@ -21,14 +21,14 @@ void Ball::setSize(int x, int y) sizeX = x; sizeY = y; - invalidate(); + tqinvalidate(); } -void Ball::invalidate() +void Ball::tqinvalidate() { Ball *b; - /* invalidate all Balls... */ + /* tqinvalidate all Balls... */ for(b=first;b!=0;b=b->next) b->pm.resize(0,0); } @@ -43,7 +43,7 @@ void Ball::setLight(int x, int y, int z, const TQColor& c) lightColor = c; - invalidate(); + tqinvalidate(); } @@ -52,7 +52,7 @@ void Ball::setTexture(double c, double d) rippleCount = c; rippleDepth = d; - invalidate(); + tqinvalidate(); } @@ -155,13 +155,13 @@ void Ball::render() green = .2 * bColor.green() + .8 * ll * green; blue = .2 * bColor.blue() + .8 * ll * blue; - image.setPixel(x,y, qRgb( (int)red, (int)green, (int)blue )); + image.setPixel(x,y, tqRgb( (int)red, (int)green, (int)blue )); } } } const TQImage iMask = image.createHeuristicMask(); TQBitmap bMask; - bMask = iMask; + bMask.convertFromImage(iMask); pm.convertFromImage( image, 0 ); pm.setMask(bMask); } @@ -213,8 +213,8 @@ BallPosition::BallPosition(int xp,int yp, Ball* d) /* Class BallWidget */ -BallWidget::BallWidget( int _freq, int bFr, TQWidget *parent, const char *name ) - : TQWidget(parent,name), positions(MAX_POSITION), animations(MAX_ANIMATION) +BallWidget::BallWidget( int _freq, int bFr, TQWidget *tqparent, const char *name ) + : TQWidget(tqparent,name), positions(MAX_POSITION), animations(MAX_ANIMATION) { int i; @@ -309,12 +309,12 @@ void BallWidget::resizeEvent(TQResizeEvent *) realSize = (w>h) ? h:w; Ball::setSize( realSize/ballFraction, realSize/ballFraction ); - repaint(); + tqrepaint(); } void BallWidget::paintEvent(TQPaintEvent *) { - paint(this); + paint(TQT_TQPAINTDEVICE(this)); } @@ -414,15 +414,15 @@ void BallWidget::animate() timer->start(1000/freq,true); } - // repaint( false ); + // tqrepaint( false ); } /* Ball Test */ -BallTest::BallTest( TQWidget *parent, const char *name ) - : BallWidget(10,2,parent,name) +BallTest::BallTest( TQWidget *tqparent, const char *name ) + : BallWidget(10,2,tqparent,name) { int w,h; -- cgit v1.2.1