summaryrefslogtreecommitdiffstats
path: root/ksnake
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-01-13 12:28:49 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-01-13 12:28:49 +0900
commitc20f4d8f2cf03c69fcecc80d63fe3cbb80f51610 (patch)
tree50b08262da538c5b91f77e83e4b80d7fd6dbe0de /ksnake
parent51f65427771c47f6d34cda56b07d9d82bd0bfd33 (diff)
downloadtdegames-c20f4d8f2cf03c69fcecc80d63fe3cbb80f51610.tar.gz
tdegames-c20f4d8f2cf03c69fcecc80d63fe3cbb80f51610.zip
Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'ksnake')
-rw-r--r--ksnake/basket.cpp4
-rw-r--r--ksnake/game.cpp28
-rw-r--r--ksnake/rattler.cpp40
-rw-r--r--ksnake/startroom.cpp2
4 files changed, 37 insertions, 37 deletions
diff --git a/ksnake/basket.cpp b/ksnake/basket.cpp
index 138336cd..c65695a5 100644
--- a/ksnake/basket.cpp
+++ b/ksnake/basket.cpp
@@ -35,7 +35,7 @@ Kaffee::Kaffee(int pos, int r1, int r2)
p = pos;
t = Red;
r = r2;
- TQTimer::singleShot( r1, this, TQT_SLOT(golden()) );
+ TQTimer::singleShot( r1, this, TQ_SLOT(golden()) );
dirty = true;
}
@@ -43,7 +43,7 @@ void Kaffee::golden()
{
dirty = true;
t = (t == Red ? Golden : Red);
- TQTimer::singleShot( r, this, TQT_SLOT(golden()) );
+ TQTimer::singleShot( r, this, TQ_SLOT(golden()) );
}
Basket::Basket(Board *b, PixServer *p)
diff --git a/ksnake/game.cpp b/ksnake/game.cpp
index a4d61c18..54ea84f9 100644
--- a/ksnake/game.cpp
+++ b/ksnake/game.cpp
@@ -67,14 +67,14 @@ Game::Game(TQWidget *parent, const char *name) : TDEMainWindow(parent,name)
rattler->reloadRoomPixmap();
rattler->setFocus();
- connect(rattler, TQT_SIGNAL(setPoints(int)), this, TQT_SLOT(scoreChanged(int)));
- connect(rattler, TQT_SIGNAL(setTrys(int)), this, TQT_SLOT(setTrys(int)));
- connect(rattler, TQT_SIGNAL(rewind()), view->progress, TQT_SLOT(rewind()));
- connect(rattler, TQT_SIGNAL(advance()), view->progress, TQT_SLOT(advance()));
- connect(view->progress, TQT_SIGNAL(restart()), rattler, TQT_SLOT(restartTimer()));
+ connect(rattler, TQ_SIGNAL(setPoints(int)), this, TQ_SLOT(scoreChanged(int)));
+ connect(rattler, TQ_SIGNAL(setTrys(int)), this, TQ_SLOT(setTrys(int)));
+ connect(rattler, TQ_SIGNAL(rewind()), view->progress, TQ_SLOT(rewind()));
+ connect(rattler, TQ_SIGNAL(advance()), view->progress, TQ_SLOT(advance()));
+ connect(view->progress, TQ_SIGNAL(restart()), rattler, TQ_SLOT(restartTimer()));
- connect(rattler, TQT_SIGNAL(togglePaused()), this, TQT_SLOT(togglePaused()));
- connect(rattler, TQT_SIGNAL(setScore(int)), this, TQT_SLOT(gameEnd(int)));
+ connect(rattler, TQ_SIGNAL(togglePaused()), this, TQ_SLOT(togglePaused()));
+ connect(rattler, TQ_SIGNAL(setScore(int)), this, TQ_SLOT(gameEnd(int)));
setCentralWidget(view);
@@ -120,16 +120,16 @@ void Game::createMenu()
actionCollection()->setAutoConnectShortcuts(true);
rattler->setActionCollection(actionCollection());
- KStdGameAction::gameNew(rattler, TQT_SLOT(restart()), actionCollection());
- pause = KStdGameAction::pause(rattler, TQT_SLOT(pause()), actionCollection());
- KStdGameAction::highscores(this, TQT_SLOT(showHighScores()), actionCollection());
- KStdGameAction::quit( this, TQT_SLOT(close()), actionCollection());
+ KStdGameAction::gameNew(rattler, TQ_SLOT(restart()), actionCollection());
+ pause = KStdGameAction::pause(rattler, TQ_SLOT(pause()), actionCollection());
+ KStdGameAction::highscores(this, TQ_SLOT(showHighScores()), actionCollection());
+ KStdGameAction::quit( this, TQ_SLOT(close()), actionCollection());
- KStdAction::preferences(this, TQT_SLOT(showSettings()), actionCollection());
+ KStdAction::preferences(this, TQ_SLOT(showSettings()), actionCollection());
// TODO change and make custom function that pauses game or
// modify widget to pause when loosing focus and remove this
- KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()),
+ KStdAction::keyBindings(guiFactory(), TQ_SLOT(configureShortcuts()),
actionCollection());
}
@@ -173,7 +173,7 @@ void Game::showSettings(){
dialog->addPage(a, i18n("Appearance"), "style");
dialog->addPage(new StartRoom(0, "StartRoom"), i18n("First Level"), "folder_home");
- connect(dialog, TQT_SIGNAL(settingsChanged()), rattler, TQT_SLOT(loadSettings()));
+ connect(dialog, TQ_SIGNAL(settingsChanged()), rattler, TQ_SLOT(loadSettings()));
dialog->show();
}
diff --git a/ksnake/rattler.cpp b/ksnake/rattler.cpp
index 8c1db1ed..d94307be 100644
--- a/ksnake/rattler.cpp
+++ b/ksnake/rattler.cpp
@@ -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");
@@ -345,7 +345,7 @@ void Rattler::restartDemo()
return;
int r = 50000+ (kapp->random() % 30000);
- TQTimer::singleShot( r, this, TQT_SLOT(restartDemo()) );
+ 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)
@@ -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--;
}
diff --git a/ksnake/startroom.cpp b/ksnake/startroom.cpp
index 725fe690..b2af039e 100644
--- a/ksnake/startroom.cpp
+++ b/ksnake/startroom.cpp
@@ -61,7 +61,7 @@ StartRoom::StartRoom( TQWidget *parent, const char *name)
textLabel->setText(i18n("First level:"));
Form1Layout->addWidget( textLabel, 1, 0 );
- connect( roomRange, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(loadLevel(int)));
+ connect( roomRange, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(loadLevel(int)));
loadLevel(1);
}