diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-01-13 11:29:06 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-01-14 20:32:49 +0900 |
commit | 1eb017313b2ebc441dfc81e73a5d6573d03ea08d (patch) | |
tree | 8d37ac85ad8a529697fc81479852a039de534b8e /qtruby/rubylib/tutorial/t13/gamebrd.rb | |
parent | 673e65a4a15e713643f4bb804f7af6dfdaa0d6d6 (diff) | |
download | tdebindings-1eb017313b2ebc441dfc81e73a5d6573d03ea08d.tar.gz tdebindings-1eb017313b2ebc441dfc81e73a5d6573d03ea08d.zip |
Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit faf33629bb6562a6f43f930afafe4b22e9cdb60b)
Diffstat (limited to 'qtruby/rubylib/tutorial/t13/gamebrd.rb')
-rw-r--r-- | qtruby/rubylib/tutorial/t13/gamebrd.rb | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/qtruby/rubylib/tutorial/t13/gamebrd.rb b/qtruby/rubylib/tutorial/t13/gamebrd.rb index 938dfd49..9a2f475a 100644 --- a/qtruby/rubylib/tutorial/t13/gamebrd.rb +++ b/qtruby/rubylib/tutorial/t13/gamebrd.rb @@ -11,7 +11,7 @@ class GameBoard < TQt::Widget quit = TQt::PushButton.new('&Quit', self, 'quit') quit.setFont(TQt::Font.new('Times', 18, TQt::Font::Bold)) - connect(quit, SIGNAL('clicked()'), $qApp, SLOT('quit()')) + connect(quit, TQ_SIGNAL('clicked()'), $qApp, TQ_SLOT('quit()')) angle = LCDRange.new( 'ANGLE', self, 'angle' ) angle.setRange( 5, 70 ) @@ -21,32 +21,32 @@ class GameBoard < TQt::Widget @cannonField = CannonField.new( self, '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()'), - self, SLOT('hit()') ) - connect( @cannonField, SIGNAL('missed()'), - self, SLOT('missed()') ) + connect( @cannonField, TQ_SIGNAL('hit()'), + self, TQ_SLOT('hit()') ) + connect( @cannonField, TQ_SIGNAL('missed()'), + self, TQ_SLOT('missed()') ) shoot = TQt::PushButton.new( '&Shoot', self, 'shoot' ) shoot.setFont( TQt::Font.new( 'Times', 18, TQt::Font::Bold ) ) - connect( shoot, SIGNAL('clicked()'), SLOT('fire()') ) - connect( @cannonField, SIGNAL('canShoot(bool)'), - shoot, SLOT('setEnabled(bool)') ) + connect( shoot, TQ_SIGNAL('clicked()'), TQ_SLOT('fire()') ) + connect( @cannonField, TQ_SIGNAL('canShoot(bool)'), + shoot, TQ_SLOT('setEnabled(bool)') ) restart = TQt::PushButton.new( '&New Game', self, 'newgame' ) restart.setFont( TQt::Font.new( 'Times', 18, TQt::Font::Bold ) ) - connect( restart, SIGNAL('clicked()'), self, SLOT('newGame()') ) + connect( restart, TQ_SIGNAL('clicked()'), self, TQ_SLOT('newGame()') ) @hits = TQt::LCDNumber.new( 2, self, 'hits' ) @shotsLeft = TQt::LCDNumber.new( 2, self, 'shotsleft' ) |