From ea318d1431c89e647598c510c4245c6571aa5f46 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 26 Jan 2012 23:32:43 -0600 Subject: Update to latest tqt3 automated conversion --- doc/html/t13-gamebrd-cpp.html | 70 +++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'doc/html/t13-gamebrd-cpp.html') diff --git a/doc/html/t13-gamebrd-cpp.html b/doc/html/t13-gamebrd-cpp.html index 41ecdaca3..cde268bbe 100644 --- a/doc/html/t13-gamebrd-cpp.html +++ b/doc/html/t13-gamebrd-cpp.html @@ -40,23 +40,23 @@ body { background: #ffffff; color: black; } #include "gamebrd.h" -#include <qfont.h> -#include <qapplication.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qlcdnumber.h> -#include <qlayout.h> +#include <ntqfont.h> +#include <ntqapplication.h> +#include <ntqlabel.h> +#include <ntqpushbutton.h> +#include <ntqlcdnumber.h> +#include <ntqlayout.h> #include "lcdrange.h" #include "cannon.h" -GameBoard::GameBoard( TQWidget *parent, const char *name ) - : TQWidget( parent, name ) +GameBoard::GameBoard( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { - TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" ); - quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); + TQPushButton *quit = new TQPushButton( "&Quit", this, "quit" ); + quit->setFont( TQFont( "Times", 18, TQFont::Bold ) ); - connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); + connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); LCDRange *angle = new LCDRange( "ANGLE", this, "angle" ); angle->setRange( 5, 70 ); @@ -66,39 +66,39 @@ body { background: #ffffff; color: black; } cannonField = new CannonField( this, "cannonField" ); - connect( angle, SIGNAL(valueChanged(int)), + connect( angle, SIGNAL(valueChanged(int)), cannonField, SLOT(setAngle(int)) ); - connect( cannonField, SIGNAL(angleChanged(int)), + connect( cannonField, SIGNAL(angleChanged(int)), angle, SLOT(setValue(int)) ); - connect( force, SIGNAL(valueChanged(int)), + connect( force, SIGNAL(valueChanged(int)), cannonField, SLOT(setForce(int)) ); - connect( cannonField, SIGNAL(forceChanged(int)), + connect( cannonField, SIGNAL(forceChanged(int)), force, SLOT(setValue(int)) ); - connect( cannonField, SIGNAL(hit()), + connect( cannonField, SIGNAL(hit()), this, SLOT(hit()) ); - connect( cannonField, SIGNAL(missed()), + connect( cannonField, SIGNAL(missed()), this, SLOT(missed()) ); - TQPushButton *shoot = new TQPushButton( "&Shoot", this, "shoot" ); - shoot->setFont( TQFont( "Times", 18, TQFont::Bold ) ); + TQPushButton *shoot = new TQPushButton( "&Shoot", this, "shoot" ); + shoot->setFont( TQFont( "Times", 18, TQFont::Bold ) ); - connect( shoot, SIGNAL(clicked()), SLOT(fire()) ); - connect( cannonField, SIGNAL(canShoot(bool)), - shoot, SLOT(setEnabled(bool)) ); + connect( shoot, SIGNAL(clicked()), SLOT(fire()) ); + connect( cannonField, SIGNAL(canShoot(bool)), + shoot, SLOT(setEnabled(bool)) ); TQPushButton *restart - = new TQPushButton( "&New Game", this, "newgame" ); + = new TQPushButton( "&New Game", this, "newgame" ); restart->setFont( TQFont( "Times", 18, TQFont::Bold ) ); - connect( restart, SIGNAL(clicked()), this, SLOT(newGame()) ); + connect( restart, SIGNAL(clicked()), this, SLOT(newGame()) ); - hits = new TQLCDNumber( 2, this, "hits" ); - shotsLeft = new TQLCDNumber( 2, this, "shotsleft" ); - TQLabel *hitsL = new TQLabel( "HITS", this, "hitsLabel" ); + hits = new TQLCDNumber( 2, this, "hits" ); + shotsLeft = new TQLCDNumber( 2, this, "shotsleft" ); + TQLabel *hitsL = new TQLabel( "HITS", this, "hitsLabel" ); TQLabel *shotsLeftL - = new TQLabel( "SHOTS LEFT", this, "shotsleftLabel" ); + = new TQLabel( "SHOTS LEFT", this, "shotsleftLabel" ); TQGridLayout *grid = new TQGridLayout( this, 2, 2, 10 ); grid->addWidget( quit, 0, 0 ); @@ -122,7 +122,7 @@ body { background: #ffffff; color: black; } angle->setValue( 60 ); force->setValue( 25 ); - angle->setFocus(); + angle->setFocus(); newGame(); } @@ -132,15 +132,15 @@ void GameBoard::fire() { if ( cannonField->gameOver() || cannonField->isShooting() ) return; - shotsLeft->display( shotsLeft->intValue() - 1 ); + shotsLeft->display( shotsLeft->intValue() - 1 ); cannonField->shoot(); } void GameBoard::hit() { - hits->display( hits->intValue() + 1 ); - if ( shotsLeft->intValue() == 0 ) + hits->display( hits->intValue() + 1 ); + if ( shotsLeft->intValue() == 0 ) cannonField->setGameOver(); else cannonField->newTarget(); @@ -149,15 +149,15 @@ void GameBoard::hit() void GameBoard::missed() { - if ( shotsLeft->intValue() == 0 ) + if ( shotsLeft->intValue() == 0 ) cannonField->setGameOver(); } void GameBoard::newGame() { - shotsLeft->display( 15 ); - hits->display( 0 ); + shotsLeft->display( 15 ); + hits->display( 0 ); cannonField->restartGame(); cannonField->newTarget(); } -- cgit v1.2.1