diff options
author | Michele Calgaro <[email protected]> | 2024-01-13 11:29:06 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2024-01-14 20:32:49 +0900 |
commit | 1eb017313b2ebc441dfc81e73a5d6573d03ea08d (patch) | |
tree | 8d37ac85ad8a529697fc81479852a039de534b8e /qtruby/rubylib/tutorial/t12 | |
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 <[email protected]>
(cherry picked from commit faf33629bb6562a6f43f930afafe4b22e9cdb60b)
Diffstat (limited to 'qtruby/rubylib/tutorial/t12')
-rw-r--r-- | qtruby/rubylib/tutorial/t12/cannon.rb | 4 | ||||
-rw-r--r-- | qtruby/rubylib/tutorial/t12/lcdrange.rb | 4 | ||||
-rwxr-xr-x | qtruby/rubylib/tutorial/t12/t12.rb | 20 |
3 files changed, 14 insertions, 14 deletions
diff --git a/qtruby/rubylib/tutorial/t12/cannon.rb b/qtruby/rubylib/tutorial/t12/cannon.rb index 0d17f880..c4c35432 100644 --- a/qtruby/rubylib/tutorial/t12/cannon.rb +++ b/qtruby/rubylib/tutorial/t12/cannon.rb @@ -12,8 +12,8 @@ class CannonField < TQt::Widget @f = 0 @timerCount = 0; @autoShootTimer = TQt::Timer.new( self, 'movement handler' ) - connect( @autoShootTimer, SIGNAL('timeout()'), - self, SLOT('moveShot()') ); + connect( @autoShootTimer, TQ_SIGNAL('timeout()'), + self, TQ_SLOT('moveShot()') ); @shoot_ang = 0 @shoot_f = 0 @target = TQt::Point.new(0, 0) diff --git a/qtruby/rubylib/tutorial/t12/lcdrange.rb b/qtruby/rubylib/tutorial/t12/lcdrange.rb index 54654165..77b81384 100644 --- a/qtruby/rubylib/tutorial/t12/lcdrange.rb +++ b/qtruby/rubylib/tutorial/t12/lcdrange.rb @@ -17,8 +17,8 @@ class LCDRange < TQt::VBox @slider.setValue(0) @label = TQt::Label.new( ' ', self, 'label' ) @label.setAlignment( TQt::AlignCenter ) - connect(@slider, SIGNAL('valueChanged(int)'), lcd, SLOT('display(int)')) - connect(@slider, SIGNAL('valueChanged(int)'), SIGNAL('valueChanged(int)')) + connect(@slider, TQ_SIGNAL('valueChanged(int)'), lcd, TQ_SLOT('display(int)')) + connect(@slider, TQ_SIGNAL('valueChanged(int)'), TQ_SIGNAL('valueChanged(int)')) setFocusProxy(@slider) end diff --git a/qtruby/rubylib/tutorial/t12/t12.rb b/qtruby/rubylib/tutorial/t12/t12.rb index 47f81f3b..c836b750 100755 --- a/qtruby/rubylib/tutorial/t12/t12.rb +++ b/qtruby/rubylib/tutorial/t12/t12.rb @@ -12,7 +12,7 @@ class MyWidget < 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 ) @@ -22,20 +22,20 @@ class MyWidget < 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)') ) shoot = TQt::PushButton.new( '&Shoot', self, 'shoot' ) shoot.setFont( TQt::Font.new( 'Times', 18, TQt::Font::Bold ) ) - connect( shoot, SIGNAL('clicked()'), cannonField, SLOT('shoot()') ) + connect( shoot, TQ_SIGNAL('clicked()'), cannonField, TQ_SLOT('shoot()') ) grid = TQt::GridLayout.new( self, 2, 2, 10 ) grid.addWidget( quit, 0, 0 ) |