diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-01-08 11:54:27 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-01-11 10:03:08 +0900 |
commit | 27f46d6031d41aa6ce071885a7e280e1097680e1 (patch) | |
tree | dbb592ad2f606c9a8e56ed6aa4f4f562c8928002 /examples/tut14.py | |
parent | a131499f339ae27686e9effc8088ebdf7bb77dde (diff) | |
download | pytqt-27f46d6031d41aa6ce071885a7e280e1097680e1.tar.gz pytqt-27f46d6031d41aa6ce071885a7e280e1097680e1.zip |
Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 7d5aea7e8497095f76841f3dd8f2eab9c4cb58aa)
Diffstat (limited to 'examples/tut14.py')
-rwxr-xr-x | examples/tut14.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/tut14.py b/examples/tut14.py index 11da6fa..a9bf1c9 100755 --- a/examples/tut14.py +++ b/examples/tut14.py @@ -20,8 +20,8 @@ class LCDRange(tqt.TQWidget): self.label = tqt.TQLabel(" ", self, "label") self.label.setAlignment(tqt.TQt.AlignCenter) - self.connect(self.slider, tqt.SIGNAL("valueChanged(int)"), lcd, tqt.SLOT("display(int)")) - self.connect(self.slider, tqt.SIGNAL("valueChanged(int)"), self, tqt.PYSIGNAL("valueChanged(int)")) + self.connect(self.slider, tqt.TQ_SIGNAL("valueChanged(int)"), lcd, tqt.TQ_SLOT("display(int)")) + self.connect(self.slider, tqt.TQ_SIGNAL("valueChanged(int)"), self, tqt.PYSIGNAL("valueChanged(int)")) self.setFocusProxy(self.slider) @@ -61,7 +61,7 @@ class CannonField(tqt.TQWidget): self.timerCount = 0 self.autoShootTimer = tqt.TQTimer(self, "movement handler") - self.connect(self.autoShootTimer, tqt.SIGNAL("timeout()"), self.moveShot) + self.connect(self.autoShootTimer, tqt.TQ_SIGNAL("timeout()"), self.moveShot) self.shoot_ang = 0 self.shoot_f = 0 @@ -277,7 +277,7 @@ class GameBoard(tqt.TQWidget): quit = tqt.TQPushButton("&Quit", self, "quit") quit.setFont(tqt.TQFont("Times", 18, tqt.TQFont.Bold)) - self.connect(quit, tqt.SIGNAL("clicked()"), tqt.tqApp, tqt.SLOT("quit()")) + self.connect(quit, tqt.TQ_SIGNAL("clicked()"), tqt.tqApp, tqt.TQ_SLOT("quit()")) self.angle = LCDRange("ANGLE", self, "angle") self.angle.setRange(5, 70) @@ -301,12 +301,12 @@ class GameBoard(tqt.TQWidget): self.shoot = tqt.TQPushButton("&Shoot", self, "shoot") self.shoot.setFont(tqt.TQFont("Times", 18, tqt.TQFont.Bold)) - self.connect(self.shoot, tqt.SIGNAL("clicked()"), self.fire) - self.connect(self.cannonField, tqt.PYSIGNAL("canShoot(bool)"), self.shoot, tqt.SLOT("setEnabled(bool)")) + self.connect(self.shoot, tqt.TQ_SIGNAL("clicked()"), self.fire) + self.connect(self.cannonField, tqt.PYSIGNAL("canShoot(bool)"), self.shoot, tqt.TQ_SLOT("setEnabled(bool)")) restart = tqt.TQPushButton("&New Game", self, "newgame") restart.setFont(tqt.TQFont("Times", 18, tqt.TQFont.Bold)) - self.connect(restart, tqt.SIGNAL("clicked()"), self.newGame) + self.connect(restart, tqt.TQ_SIGNAL("clicked()"), self.newGame) self.hits = tqt.TQLCDNumber(2, self, "hits") self.shotsLeft = tqt.TQLCDNumber(2, self, "shotsleft") @@ -316,7 +316,7 @@ class GameBoard(tqt.TQWidget): accel = tqt.TQAccel(self) accel.connectItem(accel.insertItem(tqt.TQt.Key_Enter), self.fire) accel.connectItem(accel.insertItem(tqt.TQt.Key_Return), self.fire) - accel.connectItem(accel.insertItem(tqt.TQt.CTRL + tqt.TQt.Key_Q), tqt.tqApp, tqt.SLOT("quit()")) + accel.connectItem(accel.insertItem(tqt.TQt.CTRL + tqt.TQt.Key_Q), tqt.tqApp, tqt.TQ_SLOT("quit()")) grid = tqt.TQGridLayout(self, 2, 2, 10) grid.addWidget(quit, 0, 0) |