From 2cbcca0db1343e1c40e52af729a5eb34ca8a7e37 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 27 Jun 2024 21:53:17 +0900 Subject: Rename date and time nt* related files to equivalent tq* Signed-off-by: Michele Calgaro --- doc/html/t14-cannon-cpp.html | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'doc/html/t14-cannon-cpp.html') diff --git a/doc/html/t14-cannon-cpp.html b/doc/html/t14-cannon-cpp.html index 625040533..e51955539 100644 --- a/doc/html/t14-cannon-cpp.html +++ b/doc/html/t14-cannon-cpp.html @@ -39,10 +39,10 @@ body { background: #ffffff; color: black; } ****************************************************************/ #include "cannon.h" -#include <ntqtimer.h> +#include <tqtimer.h> #include <ntqpainter.h> #include <ntqpixmap.h> -#include <ntqdatetime.h> +#include <tqdatetime.h> #include <math.h> #include <stdlib.h> @@ -54,8 +54,8 @@ body { background: #ffffff; color: black; } ang = 45; f = 0; timerCount = 0; - autoShootTimer = new TQTimer( this, "movement handler" ); - connect( autoShootTimer, TQ_SIGNAL(timeout()), + autoShootTimer = new TQTimer( this, "movement handler" ); + connect( autoShootTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(moveShot()) ); shoot_ang = 0; shoot_f = 0; @@ -99,7 +99,7 @@ void CannonField::shoot() timerCount = 0; shoot_ang = ang; shoot_f = f; - autoShootTimer->start( 50 ); + autoShootTimer->start( 50 ); emit canShoot( FALSE ); } @@ -109,8 +109,8 @@ void CannonField::newTarget() static bool first_time = TRUE; if ( first_time ) { first_time = FALSE; - TQTime midnight( 0, 0, 0 ); - srand( midnight.secsTo(TQTime::currentTime()) ); + TQTime midnight( 0, 0, 0 ); + srand( midnight.secsTo(TQTime::currentTime()) ); } TQRegion r( targetRect() ); target = TQPoint( 200 + rand() % 190, @@ -123,7 +123,7 @@ void CannonField::setGameOver() if ( gameEnded ) return; if ( isShooting() ) - autoShootTimer->stop(); + autoShootTimer->stop(); gameEnded = TRUE; repaint(); } @@ -131,7 +131,7 @@ void CannonField::setGameOver() void CannonField::restartGame() { if ( isShooting() ) - autoShootTimer->stop(); + autoShootTimer->stop(); gameEnded = FALSE; repaint(); emit canShoot( TRUE ); @@ -145,12 +145,12 @@ void CannonField::moveShot() TQRect shotR = shotRect(); if ( shotR.intersects( targetRect() ) ) { - autoShootTimer->stop(); + autoShootTimer->stop(); emit hit(); emit canShoot( TRUE ); } else if ( shotR.x() > width() || shotR.y() > height() || shotR.intersects(barrierRect()) ) { - autoShootTimer->stop(); + autoShootTimer->stop(); emit missed(); emit canShoot( TRUE ); } else { @@ -310,7 +310,7 @@ bool CannonField::barrelHit( const TQ bool CannonField::isShooting() const { - return autoShootTimer->isActive(); + return autoShootTimer->isActive(); } -- cgit v1.2.3