summaryrefslogtreecommitdiffstats
path: root/kenolaba/Ball.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:58:26 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:58:26 +0000
commit838baf3f99ec5ab81b063eb5449a3381d860f377 (patch)
treedd31abcfde08ca92e4623b8f50b3d762a87c997a /kenolaba/Ball.cpp
parent2bf598bafa22fac4126fc8842df6b0119aadc0e9 (diff)
downloadtdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.tar.gz
tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.zip
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
Diffstat (limited to 'kenolaba/Ball.cpp')
-rw-r--r--kenolaba/Ball.cpp28
1 files changed, 14 insertions, 14 deletions
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;