diff options
Diffstat (limited to 'ksnake/rattler.cpp')
-rw-r--r-- | ksnake/rattler.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/ksnake/rattler.cpp b/ksnake/rattler.cpp index 94c467fe..f589b9ae 100644 --- a/ksnake/rattler.cpp +++ b/ksnake/rattler.cpp @@ -33,7 +33,7 @@ #include <tdelocale.h> #include <tdemessagebox.h> #include <tqbitarray.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include "level.h" #include "basket.h" @@ -46,7 +46,7 @@ int speed[4] = { 130, 95, 55, 40 }; Rattler::Rattler( TQWidget *parent, const char *name ) : TQWidget( parent, name ) { - setFocusPolicy(TQ_StrongFocus); + setFocusPolicy(TQWidget::StrongFocus); numBalls = Settings::balls(); ballsAI = Settings::ballsAI(); @@ -67,16 +67,16 @@ Rattler::Rattler( TQWidget *parent, const char *name ) balls = new TQPtrList<Ball>; balls->setAutoDelete( true ); - connect( samy, TQT_SIGNAL(closeGate(int)), this, TQT_SLOT(closeGate(int))); - connect( samy, TQT_SIGNAL(score(bool, int)), this, TQT_SLOT(scoring(bool,int))); - connect( samy, TQT_SIGNAL(goingOut()), this, TQT_SLOT(speedUp())); - connect( basket, TQT_SIGNAL(openGate()), this, TQT_SLOT(openGate())); + connect( samy, TQ_SIGNAL(closeGate(int)), this, TQ_SLOT(closeGate(int))); + connect( samy, TQ_SIGNAL(score(bool, int)), this, TQ_SLOT(scoring(bool,int))); + connect( samy, TQ_SIGNAL(goingOut()), this, TQ_SLOT(speedUp())); + connect( basket, TQ_SIGNAL(openGate()), this, TQ_SLOT(openGate())); gameState.fill(false); gameState.setBit(Demo); timerCount = 0; - TQTimer::singleShot( 2000, this, TQT_SLOT(demo()) ); // Why wait? + TQTimer::singleShot( 2000, this, TQ_SLOT(demo()) ); // Why wait? backgroundPixmaps = TDEGlobal::dirs()->findAllResources("appdata", "backgrounds/*.png"); @@ -196,7 +196,7 @@ void Rattler::mousePressEvent( TQMouseEvent *e ) return; uint button = e->button(); - if (button == Qt::RightButton) + if (button == TQt::RightButton) { switch (direction) { @@ -211,7 +211,7 @@ void Rattler::mousePressEvent( TQMouseEvent *e ) } e->accept(); } - else if (button == Qt::LeftButton) + else if (button == TQt::LeftButton) { switch (direction) { @@ -344,8 +344,8 @@ void Rattler::restartDemo() if (!gameState.testBit(Demo)) return; - int r = 50000+ (kapp->random() % 30000); - TQTimer::singleShot( r, this, TQT_SLOT(restartDemo()) ); + int r = 50000+ (tdeApp->random() % 30000); + TQTimer::singleShot( r, this, TQ_SLOT(restartDemo()) ); stop(); level->create(Intro); @@ -364,7 +364,7 @@ void Rattler::demo() stop(); - TQTimer::singleShot( 60000, this, TQT_SLOT(restartDemo()) ); + TQTimer::singleShot( 60000, this, TQ_SLOT(restartDemo()) ); gameState.fill(false); gameState.setBit(Init); gameState.setBit(Demo); @@ -414,7 +414,7 @@ void Rattler::restart() cleanLabel(); repaint(); - TQTimer::singleShot( 2000, this, TQT_SLOT(showRoom()) ); + TQTimer::singleShot( 2000, this, TQ_SLOT(showRoom()) ); } void Rattler::newTry() @@ -427,7 +427,7 @@ void Rattler::newTry() level->create(GameOver); pix->initRoomPixmap(); repaint(); - TQTimer::singleShot( 5000, this, TQT_SLOT(demo()) ); + TQTimer::singleShot( 5000, this, TQ_SLOT(demo()) ); emit setScore(points); return; } @@ -440,7 +440,7 @@ void Rattler::newTry() pix->initRoomPixmap(); init(true); repaint(); - TQTimer::singleShot( 1000, this, TQT_SLOT(run()) ); + TQTimer::singleShot( 1000, this, TQ_SLOT(run()) ); } void Rattler::levelUp() @@ -458,7 +458,7 @@ void Rattler::levelUp() pix->initRoomPixmap(); repaint(); - TQTimer::singleShot( 2000, this, TQT_SLOT(showRoom()) ); + TQTimer::singleShot( 2000, this, TQ_SLOT(showRoom()) ); } /* this slot is called by the progressBar when value() == 0 @@ -494,7 +494,7 @@ void Rattler::showRoom() pix->initRoomPixmap(); init(true); repaint(); - TQTimer::singleShot( 1000, this, TQT_SLOT(run()) ); + TQTimer::singleShot( 1000, this, TQ_SLOT(run()) ); } void Rattler::init(bool play) @@ -534,7 +534,7 @@ void Rattler::start(int t) void Rattler::stop() { - TQT_TQOBJECT(this)->killTimers(); + this->killTimers(); } void Rattler::restartComputerSnakes(bool play) @@ -557,10 +557,10 @@ void Rattler::restartComputerSnakes(bool play) as = new KillerCompuSnake(board, pix); break; } - connect( as, TQT_SIGNAL(closeGate(int)), this, TQT_SLOT(closeGate(int))); - connect( as, TQT_SIGNAL(restartTimer()), this, TQT_SLOT(restartTimer())); - connect( as, TQT_SIGNAL(score(bool, int)), this, TQT_SLOT(scoring(bool,int))); - connect( as, TQT_SIGNAL(killed()), this, TQT_SLOT(killedComputerSnake())); + connect( as, TQ_SIGNAL(closeGate(int)), this, TQ_SLOT(closeGate(int))); + connect( as, TQ_SIGNAL(restartTimer()), this, TQ_SLOT(restartTimer())); + connect( as, TQ_SIGNAL(score(bool, int)), this, TQ_SLOT(scoring(bool,int))); + connect( as, TQ_SIGNAL(killed()), this, TQ_SLOT(killedComputerSnake())); computerSnakes->append(as); } } @@ -643,10 +643,10 @@ void Rattler::setCompuSnakes(int i) as = new KillerCompuSnake(board, pix); break; } - connect( as, TQT_SIGNAL(closeGate(int)), this, TQT_SLOT(closeGate(int))); - connect( as, TQT_SIGNAL(restartTimer()), this, TQT_SLOT(restartTimer())); - connect( as, TQT_SIGNAL(score(bool, int)), this, TQT_SLOT(scoring(bool,int))); - connect( as, TQT_SIGNAL(killed()), this, TQT_SLOT(killedComputerSnake())); + connect( as, TQ_SIGNAL(closeGate(int)), this, TQ_SLOT(closeGate(int))); + connect( as, TQ_SIGNAL(restartTimer()), this, TQ_SLOT(restartTimer())); + connect( as, TQ_SIGNAL(score(bool, int)), this, TQ_SLOT(scoring(bool,int))); + connect( as, TQ_SIGNAL(killed()), this, TQ_SLOT(killedComputerSnake())); computerSnakes->append(as); i--; } |