summaryrefslogtreecommitdiffstats
path: root/ksnake/rattler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ksnake/rattler.cpp')
-rw-r--r--ksnake/rattler.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/ksnake/rattler.cpp b/ksnake/rattler.cpp
index 1085d6f8..8fc0999f 100644
--- a/ksnake/rattler.cpp
+++ b/ksnake/rattler.cpp
@@ -43,10 +43,10 @@ TQBitArray gameState(5);
TQLabel *label = 0;
int speed[4] = { 130, 95, 55, 40 };
-Rattler::Rattler( TQWidget *parent, const char *name )
- : TQWidget( parent, name )
+Rattler::Rattler( TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name )
{
- setFocusPolicy(TQWidget::StrongFocus);
+ setFocusPolicy(TQ_StrongFocus);
numBalls = Settings::balls();
ballsAI = Settings::ballsAI();
@@ -114,7 +114,7 @@ void Rattler::paintEvent( TQPaintEvent *e)
return;
TQPixmap levelPix = pix->levelPix();
- basket->repaint(true);
+ basket->tqrepaint(true);
bitBlt(this, rect.x(), rect.y(),
&levelPix, rect.x(), rect.y(), rect.width(), rect.height());
@@ -130,14 +130,14 @@ void Rattler::timerEvent( TQTimerEvent * )
for (CompuSnake *c = computerSnakes->first(); c != 0; c = computerSnakes->next()){
if(c) {
c->nextMove();
- c->repaint(false);
+ c->tqrepaint(false);
}
}
for (Ball *b = balls->first(); b != 0; b = balls->next()){
if (b) {
b->nextMove();
- b->repaint();
+ b->tqrepaint();
}
}
@@ -147,10 +147,10 @@ void Rattler::timerEvent( TQTimerEvent * )
if(!gameState.testBit(Demo))
{
state = samy->nextMove(direction);
- samy->repaint( false );
+ samy->tqrepaint( false );
}
- basket->repaint( false);
+ basket->tqrepaint( false);
if (state == ko)
newTry();
@@ -313,8 +313,8 @@ void Rattler::pause()
label = new TQLabel(this);
label->setFont( TQFont( "Times", 14, TQFont::Bold ) );
label->setText(i18n("Game Paused\n Press %1 to resume\n")
- .arg(tempPauseAction->shortcutText()));
- label->setAlignment( AlignCenter );
+ .tqarg(tempPauseAction->shortcutText()));
+ label->tqsetAlignment( AlignCenter );
label->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
label->setGeometry(182, 206, 198, 80);
label->show();
@@ -351,7 +351,7 @@ void Rattler::restartDemo()
level->create(Intro);
pix->initRoomPixmap();
init(false);
- repaint();
+ tqrepaint();
start();
}
@@ -374,7 +374,7 @@ void Rattler::demo()
level->create(Intro);
pix->initRoomPixmap();
}
- repaint(rect(), false);
+ tqrepaint(rect(), false);
init(false);
run();
first_time = false;
@@ -413,7 +413,7 @@ void Rattler::restart()
cleanLabel();
- repaint();
+ tqrepaint();
TQTimer::singleShot( 2000, this, TQT_SLOT(showRoom()) );
}
@@ -426,7 +426,7 @@ void Rattler::newTry()
gameState.setBit(Over);
level->create(GameOver);
pix->initRoomPixmap();
- repaint();
+ tqrepaint();
TQTimer::singleShot( 5000, this, TQT_SLOT(demo()) );
emit setScore(points);
return;
@@ -439,7 +439,7 @@ void Rattler::newTry()
level->create(Room);
pix->initRoomPixmap();
init(true);
- repaint();
+ tqrepaint();
TQTimer::singleShot( 1000, this, TQT_SLOT(run()) );
}
@@ -456,7 +456,7 @@ void Rattler::levelUp()
level->nextLevel();
level->create(Banner);
pix->initRoomPixmap();
- repaint();
+ tqrepaint();
TQTimer::singleShot( 2000, this, TQT_SLOT(showRoom()) );
}
@@ -493,7 +493,7 @@ void Rattler::showRoom()
level->create(Room);
pix->initRoomPixmap();
init(true);
- repaint();
+ tqrepaint();
TQTimer::singleShot( 1000, this, TQT_SLOT(run()) );
}
@@ -534,7 +534,7 @@ void Rattler::start(int t)
void Rattler::stop()
{
- killTimers();
+ TQT_TQOBJECT(this)->killTimers();
}
void Rattler::restartComputerSnakes(bool play)