From fb401a891f1b426e9419c0cb16403df407138611 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 27 Dec 2023 19:25:43 +0900 Subject: Rename METHOD, SIGNAL, SLOT to TQ_METHOD, TQ_SIGNAL, TQ_SLOT Signed-off-by: Michele Calgaro --- doc/html/tutorial1-13.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'doc/html/tutorial1-13.html') diff --git a/doc/html/tutorial1-13.html b/doc/html/tutorial1-13.html index 102d237b4..4e92f4642 100644 --- a/doc/html/tutorial1-13.html +++ b/doc/html/tutorial1-13.html @@ -256,15 +256,15 @@ class, which was last seen as MyWidget. constructor to use it. (The good programmers at Trolltech never forget this, but I do. Caveat programmor - if "programmor" is Latin, at least. Anyway, back to the code.) -

        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()) );
 

This time we want to do something when the shot has hit or missed the target. Thus we connect the hit() and missed() signals of the CannonField to two protected slots with the same names in this class. -

        connect( shoot, SIGNAL(clicked()), SLOT(fire()) );
+

        connect( shoot, TQ_SIGNAL(clicked()), TQ_SLOT(fire()) );
 

Previously we connected the Shoot button's clicked() signal directly to the CannonField's shoot() slot. This time we want to keep track of @@ -272,8 +272,8 @@ the number of shots fired, so we connect it to a protected slot in this class instead.

Notice how easy it is to change the behavior of a program when you are working with self-contained components. -

        connect( cannonField, SIGNAL(canShoot(bool)),
-                 shoot, SLOT(setEnabled(bool)) );
+

        connect( cannonField, TQ_SIGNAL(canShoot(bool)),
+                 shoot, TQ_SLOT(setEnabled(bool)) );
 

We also use the cannonField's canShoot() signal to enable or disable the Shoot button appropriately. @@ -281,7 +281,7 @@ the Shoot button appropriately. = new TQPushButton( "&New Game", this, "newgame" ); restart->setFont( TQFont( "Times", 18, TQFont::Bold ) ); - connect( restart, SIGNAL(clicked()), this, SLOT(newGame()) ); + connect( restart, TQ_SIGNAL(clicked()), this, TQ_SLOT(newGame()) );

We create, set up, and connect the New Game button as we have done with the other buttons. Clicking this button will activate the -- cgit v1.2.1