diff options
Diffstat (limited to 'qtjava/javalib/tutorial/t14/GameBoard.java')
-rw-r--r-- | qtjava/javalib/tutorial/t14/GameBoard.java | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/qtjava/javalib/tutorial/t14/GameBoard.java b/qtjava/javalib/tutorial/t14/GameBoard.java index f44af538..6bc66b17 100644 --- a/qtjava/javalib/tutorial/t14/GameBoard.java +++ b/qtjava/javalib/tutorial/t14/GameBoard.java @@ -10,7 +10,7 @@ public class GameBoard extends TQWidget { TQPushButton quit = new TQPushButton("&Quit", this, "quit"); quit.setFont(new TQFont("Times", 18, TQFont.Bold, false)); - connect(quit, SIGNAL("clicked()"), tqApp(), SLOT("quit()")); + connect(quit, TQ_SIGNAL("clicked()"), tqApp(), TQ_SLOT("quit()")); LCDRange angle = new LCDRange("ANGLE", this, "angle"); angle.setRange(5, 70); @@ -23,30 +23,30 @@ public class GameBoard extends TQWidget { cannonField = new CannonField(box, "cannonField"); - connect(angle, SIGNAL("valueChanged(int)"), - cannonField, SLOT("setAngle(int)")); - connect(cannonField, SIGNAL("angleChanged(int)"), - angle, SLOT("setValue(int)")); + connect(angle, TQ_SIGNAL("valueChanged(int)"), + cannonField, TQ_SLOT("setAngle(int)")); + connect(cannonField, TQ_SIGNAL("angleChanged(int)"), + angle, TQ_SLOT("setValue(int)")); - connect(force, SIGNAL("valueChanged(int)"), - cannonField, SLOT("setForce(int)")); - connect(cannonField, SIGNAL("forceChanged(int)"), - force, SLOT("setValue(int)")); + connect(force, TQ_SIGNAL("valueChanged(int)"), + cannonField, TQ_SLOT("setForce(int)")); + connect(cannonField, TQ_SIGNAL("forceChanged(int)"), + force, TQ_SLOT("setValue(int)")); - connect(cannonField, SIGNAL("hit()"), - this, SLOT("hit()")); - connect(cannonField, SIGNAL("missed()"), - this, SLOT("missed()")); + connect(cannonField, TQ_SIGNAL("hit()"), + this, TQ_SLOT("hit()")); + connect(cannonField, TQ_SIGNAL("missed()"), + this, TQ_SLOT("missed()")); TQPushButton shoot = new TQPushButton("&Shoot", this, "shoot"); shoot.setFont(new TQFont("Times", 18, TQFont.Bold, false)); - connect(shoot, SIGNAL("clicked()"), SLOT("fire()")); + connect(shoot, TQ_SIGNAL("clicked()"), TQ_SLOT("fire()")); TQPushButton restart = new TQPushButton("&New Game", this, "newgame"); restart.setFont(new TQFont("Times", 18, TQFont.Bold, false)); - connect(restart, SIGNAL("clicked()"), this, SLOT("newGame()")); + connect(restart, TQ_SIGNAL("clicked()"), this, TQ_SLOT("newGame()")); hits = new TQLCDNumber(2, this, "hits"); shotsLeft = new TQLCDNumber(2, this, "shotsleft"); @@ -54,13 +54,13 @@ public class GameBoard extends TQWidget { TQLabel shotsLeftL = new TQLabel("SHOTS LEFT", this, "shotsleftLabel", 0); TQAccel accel = new TQAccel(this); - accel.connectItem(accel.insertItem(new TQKeySequence(Key_Enter)), this, SLOT("fire()")); - accel.connectItem(accel.insertItem(new TQKeySequence(Key_Return)), this, SLOT("fire()")); - accel.connectItem(accel.insertItem(new TQKeySequence(CTRL+Key_Q)), tqApp(), SLOT("quit()")); + accel.connectItem(accel.insertItem(new TQKeySequence(Key_Enter)), this, TQ_SLOT("fire()")); + accel.connectItem(accel.insertItem(new TQKeySequence(Key_Return)), this, TQ_SLOT("fire()")); + accel.connectItem(accel.insertItem(new TQKeySequence(CTRL+Key_Q)), tqApp(), TQ_SLOT("quit()")); /*** - accel.connectItem(accel.insertItem(Key_Enter), this, SLOT("fire()")); - accel.connectItem(accel.insertItem(Key_Return), this, SLOT("fire()")); - accel.connectItem(accel.insertItem(CTRL+Key_Q), tqApp(), SLOT("quit()")); + accel.connectItem(accel.insertItem(Key_Enter), this, TQ_SLOT("fire()")); + accel.connectItem(accel.insertItem(Key_Return), this, TQ_SLOT("fire()")); + accel.connectItem(accel.insertItem(CTRL+Key_Q), tqApp(), TQ_SLOT("quit()")); ***/ TQGridLayout grid = new TQGridLayout(this, 2, 2, 10, -1, null); grid.addWidget(quit, 0, 0); |