From faf33629bb6562a6f43f930afafe4b22e9cdb60b Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 13 Jan 2024 11:29:06 +0900 Subject: Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines Signed-off-by: Michele Calgaro --- qtruby/rubylib/tutorial/t10/lcdrange.rb | 4 ++-- qtruby/rubylib/tutorial/t10/t10.rb | 18 +++++++-------- qtruby/rubylib/tutorial/t11/cannon.rb | 4 ++-- qtruby/rubylib/tutorial/t11/lcdrange.rb | 4 ++-- qtruby/rubylib/tutorial/t11/t11.rb | 20 ++++++++--------- qtruby/rubylib/tutorial/t12/cannon.rb | 4 ++-- qtruby/rubylib/tutorial/t12/lcdrange.rb | 4 ++-- qtruby/rubylib/tutorial/t12/t12.rb | 20 ++++++++--------- qtruby/rubylib/tutorial/t13/cannon.rb | 4 ++-- qtruby/rubylib/tutorial/t13/gamebrd.rb | 34 ++++++++++++++-------------- qtruby/rubylib/tutorial/t13/lcdrange.rb | 4 ++-- qtruby/rubylib/tutorial/t14/cannon.rb | 4 ++-- qtruby/rubylib/tutorial/t14/gamebrd.rb | 40 ++++++++++++++++----------------- qtruby/rubylib/tutorial/t14/lcdrange.rb | 4 ++-- qtruby/rubylib/tutorial/t2/t2.rb | 2 +- qtruby/rubylib/tutorial/t3/t3.rb | 2 +- qtruby/rubylib/tutorial/t4/t4.rb | 2 +- qtruby/rubylib/tutorial/t5/t5.rb | 4 ++-- qtruby/rubylib/tutorial/t6/t6.rb | 4 ++-- qtruby/rubylib/tutorial/t7/lcdrange.rb | 4 ++-- qtruby/rubylib/tutorial/t7/t7.rb | 6 ++--- qtruby/rubylib/tutorial/t8/lcdrange.rb | 4 ++-- qtruby/rubylib/tutorial/t8/t8.rb | 10 ++++----- qtruby/rubylib/tutorial/t9/lcdrange.rb | 4 ++-- qtruby/rubylib/tutorial/t9/t9.rb | 10 ++++----- 25 files changed, 110 insertions(+), 110 deletions(-) (limited to 'qtruby/rubylib/tutorial') diff --git a/qtruby/rubylib/tutorial/t10/lcdrange.rb b/qtruby/rubylib/tutorial/t10/lcdrange.rb index 85ed3c0b..98e80fbd 100644 --- a/qtruby/rubylib/tutorial/t10/lcdrange.rb +++ b/qtruby/rubylib/tutorial/t10/lcdrange.rb @@ -10,8 +10,8 @@ class LCDRange < TQt::VBox @slider = TQt::Slider.new(TQt::VBox::Horizontal, self, 'slider') @slider.setRange(0, 99) @slider.setValue(0) - 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/t10/t10.rb b/qtruby/rubylib/tutorial/t10/t10.rb index b86c9e1b..99b0cd96 100755 --- a/qtruby/rubylib/tutorial/t10/t10.rb +++ b/qtruby/rubylib/tutorial/t10/t10.rb @@ -11,7 +11,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( self, 'angle' ) angle.setRange( 5, 70 ) @@ -21,15 +21,15 @@ 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)') ) grid = TQt::GridLayout.new( self, 2, 2, 10 ) grid.addWidget( quit, 0, 0 ) diff --git a/qtruby/rubylib/tutorial/t11/cannon.rb b/qtruby/rubylib/tutorial/t11/cannon.rb index 89a2ca24..8429159b 100644 --- a/qtruby/rubylib/tutorial/t11/cannon.rb +++ b/qtruby/rubylib/tutorial/t11/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 setPalette( TQt::Palette.new( TQt::Color.new( 250, 250, 200) ) ) diff --git a/qtruby/rubylib/tutorial/t11/lcdrange.rb b/qtruby/rubylib/tutorial/t11/lcdrange.rb index 85ed3c0b..98e80fbd 100644 --- a/qtruby/rubylib/tutorial/t11/lcdrange.rb +++ b/qtruby/rubylib/tutorial/t11/lcdrange.rb @@ -10,8 +10,8 @@ class LCDRange < TQt::VBox @slider = TQt::Slider.new(TQt::VBox::Horizontal, self, 'slider') @slider.setRange(0, 99) @slider.setValue(0) - 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/t11/t11.rb b/qtruby/rubylib/tutorial/t11/t11.rb index 4b400026..d7ed74c9 100755 --- a/qtruby/rubylib/tutorial/t11/t11.rb +++ b/qtruby/rubylib/tutorial/t11/t11.rb @@ -11,7 +11,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( self, 'angle' ) angle.setRange( 5, 70 ) @@ -21,20 +21,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 ) 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 ) diff --git a/qtruby/rubylib/tutorial/t13/cannon.rb b/qtruby/rubylib/tutorial/t13/cannon.rb index 315760f0..75b637f9 100644 --- a/qtruby/rubylib/tutorial/t13/cannon.rb +++ b/qtruby/rubylib/tutorial/t13/cannon.rb @@ -16,8 +16,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/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' ) diff --git a/qtruby/rubylib/tutorial/t13/lcdrange.rb b/qtruby/rubylib/tutorial/t13/lcdrange.rb index 39eb9b1d..50f9a6fb 100644 --- a/qtruby/rubylib/tutorial/t13/lcdrange.rb +++ b/qtruby/rubylib/tutorial/t13/lcdrange.rb @@ -19,8 +19,8 @@ class LCDRange < TQt::Widget @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) diff --git a/qtruby/rubylib/tutorial/t14/cannon.rb b/qtruby/rubylib/tutorial/t14/cannon.rb index c2147714..33d0478d 100644 --- a/qtruby/rubylib/tutorial/t14/cannon.rb +++ b/qtruby/rubylib/tutorial/t14/cannon.rb @@ -15,8 +15,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/t14/gamebrd.rb b/qtruby/rubylib/tutorial/t14/gamebrd.rb index 27c403b0..e8ed3096 100644 --- a/qtruby/rubylib/tutorial/t14/gamebrd.rb +++ b/qtruby/rubylib/tutorial/t14/gamebrd.rb @@ -10,7 +10,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 ) @@ -22,32 +22,32 @@ class GameBoard < TQt::Widget box.setFrameStyle( TQt::Frame::WinPanel | TQt::Frame::Sunken ) @cannonField = CannonField.new( 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()'), - 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' ) @@ -56,11 +56,11 @@ class GameBoard < TQt::Widget accel = TQt::Accel.new( self ) accel.connectItem( accel.insertItem( TQt::KeySequence.new(Key_Enter) ), - self, SLOT('fire()') ) + self, TQ_SLOT('fire()') ) accel.connectItem( accel.insertItem( TQt::KeySequence.new(Key_Return) ), - self, SLOT('fire()') ) + self, TQ_SLOT('fire()') ) accel.connectItem( accel.insertItem( TQt::KeySequence.new(CTRL+Key_Q) ), - $qApp, SLOT('quit()') ) + $qApp, TQ_SLOT('quit()') ) grid = TQt::GridLayout.new( self, 2, 2, 10 ) grid.addWidget( quit, 0, 0 ) diff --git a/qtruby/rubylib/tutorial/t14/lcdrange.rb b/qtruby/rubylib/tutorial/t14/lcdrange.rb index 9cb54b39..e0817103 100644 --- a/qtruby/rubylib/tutorial/t14/lcdrange.rb +++ b/qtruby/rubylib/tutorial/t14/lcdrange.rb @@ -19,8 +19,8 @@ class LCDRange < TQt::Widget @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) diff --git a/qtruby/rubylib/tutorial/t2/t2.rb b/qtruby/rubylib/tutorial/t2/t2.rb index b5e62bca..813eb78f 100755 --- a/qtruby/rubylib/tutorial/t2/t2.rb +++ b/qtruby/rubylib/tutorial/t2/t2.rb @@ -9,7 +9,7 @@ quit = TQt::PushButton.new('Quit', nil) quit.resize(75, 30) quit.setFont(TQt::Font.new('Times', 18, TQt::Font::Bold)) -TQt::Object.connect(quit, SIGNAL('clicked()'), a, SLOT('quit()')) +TQt::Object.connect(quit, TQ_SIGNAL('clicked()'), a, TQ_SLOT('quit()')) a.setMainWidget(quit) quit.show diff --git a/qtruby/rubylib/tutorial/t3/t3.rb b/qtruby/rubylib/tutorial/t3/t3.rb index 9a6b32d2..2c1d6b76 100755 --- a/qtruby/rubylib/tutorial/t3/t3.rb +++ b/qtruby/rubylib/tutorial/t3/t3.rb @@ -11,7 +11,7 @@ box.resize(200, 120) quit = TQt::PushButton.new('Quit', box) quit.setFont(TQt::Font.new('Times', 18, TQt::Font::Bold)) -a.connect(quit, SIGNAL('clicked()'), SLOT('quit()')) +a.connect(quit, TQ_SIGNAL('clicked()'), TQ_SLOT('quit()')) a.setMainWidget(box) box.show diff --git a/qtruby/rubylib/tutorial/t4/t4.rb b/qtruby/rubylib/tutorial/t4/t4.rb index dc254a8d..b4f36b78 100755 --- a/qtruby/rubylib/tutorial/t4/t4.rb +++ b/qtruby/rubylib/tutorial/t4/t4.rb @@ -13,7 +13,7 @@ def initialize(parent = nil, name = nil) quit = TQt::PushButton.new('Quit', self, 'quit') quit.setGeometry(62, 40, 75, 30) 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()')) end end diff --git a/qtruby/rubylib/tutorial/t5/t5.rb b/qtruby/rubylib/tutorial/t5/t5.rb index 56b50d17..72625321 100755 --- a/qtruby/rubylib/tutorial/t5/t5.rb +++ b/qtruby/rubylib/tutorial/t5/t5.rb @@ -10,7 +10,7 @@ def initialize() 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()')) lcd = TQt::LCDNumber.new(2, self, 'lcd') @@ -18,7 +18,7 @@ def initialize() slider.setRange(0, 99) slider.setValue(0) - connect(slider, SIGNAL('valueChanged(int)'), lcd, SLOT('display(int)')) + connect(slider, TQ_SIGNAL('valueChanged(int)'), lcd, TQ_SLOT('display(int)')) end end diff --git a/qtruby/rubylib/tutorial/t6/t6.rb b/qtruby/rubylib/tutorial/t6/t6.rb index 7d6b4b42..f0bd1afb 100755 --- a/qtruby/rubylib/tutorial/t6/t6.rb +++ b/qtruby/rubylib/tutorial/t6/t6.rb @@ -13,7 +13,7 @@ def initialize(grid) slider.setRange(0, 99) slider.setValue(0) - lcd.connect(slider, SIGNAL('valueChanged(int)'), SLOT('display(int)')) + lcd.connect(slider, TQ_SIGNAL('valueChanged(int)'), TQ_SLOT('display(int)')) end end @@ -25,7 +25,7 @@ def initialize() 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()')) grid = TQt::Grid.new( 4, self ) for c in 0..3 diff --git a/qtruby/rubylib/tutorial/t7/lcdrange.rb b/qtruby/rubylib/tutorial/t7/lcdrange.rb index 0c673284..4e9e7616 100644 --- a/qtruby/rubylib/tutorial/t7/lcdrange.rb +++ b/qtruby/rubylib/tutorial/t7/lcdrange.rb @@ -11,8 +11,8 @@ class LCDRange < TQt::VBox @slider = TQt::Slider.new(TQt::VBox::Horizontal, self, 'slider') @slider.setRange(0, 99) @slider.setValue(0) - 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)')) end def value() diff --git a/qtruby/rubylib/tutorial/t7/t7.rb b/qtruby/rubylib/tutorial/t7/t7.rb index f1d56b20..97cfe8d0 100755 --- a/qtruby/rubylib/tutorial/t7/t7.rb +++ b/qtruby/rubylib/tutorial/t7/t7.rb @@ -11,7 +11,7 @@ def initialize() 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()')) grid = TQt::Grid.new( 4, self ) previous = nil @@ -19,8 +19,8 @@ def initialize() for r in 0..3 lr = LCDRange.new(grid) if previous != nil - connect( lr, SIGNAL('valueChanged(int)'), - previous, SLOT('setValue(int)') ) + connect( lr, TQ_SIGNAL('valueChanged(int)'), + previous, TQ_SLOT('setValue(int)') ) end previous = lr end diff --git a/qtruby/rubylib/tutorial/t8/lcdrange.rb b/qtruby/rubylib/tutorial/t8/lcdrange.rb index 4e3d856f..32481913 100644 --- a/qtruby/rubylib/tutorial/t8/lcdrange.rb +++ b/qtruby/rubylib/tutorial/t8/lcdrange.rb @@ -10,8 +10,8 @@ class LCDRange < TQt::VBox @slider = TQt::Slider.new(TQt::VBox::Horizontal, self, 'slider') @slider.setRange(0, 99) @slider.setValue(0) - 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/t8/t8.rb b/qtruby/rubylib/tutorial/t8/t8.rb index fad11dd0..bc6a468a 100755 --- a/qtruby/rubylib/tutorial/t8/t8.rb +++ b/qtruby/rubylib/tutorial/t8/t8.rb @@ -11,17 +11,17 @@ 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( self, 'angle' ) angle.setRange( 5, 70 ) 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)') ) grid = TQt::GridLayout.new( self, 2, 2, 10 ) # 2x2, 10 pixel border diff --git a/qtruby/rubylib/tutorial/t9/lcdrange.rb b/qtruby/rubylib/tutorial/t9/lcdrange.rb index 208650f3..dddbc381 100644 --- a/qtruby/rubylib/tutorial/t9/lcdrange.rb +++ b/qtruby/rubylib/tutorial/t9/lcdrange.rb @@ -10,8 +10,8 @@ class LCDRange < TQt::VBox @slider = TQt::Slider.new(TQt::VBox::Horizontal, self, 'slider') @slider.setRange(0, 99) @slider.setValue(0) - 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/t9/t9.rb b/qtruby/rubylib/tutorial/t9/t9.rb index 8a9cf81d..090fc9b0 100755 --- a/qtruby/rubylib/tutorial/t9/t9.rb +++ b/qtruby/rubylib/tutorial/t9/t9.rb @@ -11,17 +11,17 @@ 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( self, 'angle' ) angle.setRange( 5, 70 ) 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)') ) grid = TQt::GridLayout.new( self, 2, 2, 10 ) # 2x2, 10 pixel border -- cgit v1.2.1