summaryrefslogtreecommitdiffstats
path: root/qtruby/rubylib/tutorial/t14
diff options
context:
space:
mode:
Diffstat (limited to 'qtruby/rubylib/tutorial/t14')
-rw-r--r--qtruby/rubylib/tutorial/t14/cannon.rb4
-rw-r--r--qtruby/rubylib/tutorial/t14/gamebrd.rb40
-rw-r--r--qtruby/rubylib/tutorial/t14/lcdrange.rb4
3 files changed, 24 insertions, 24 deletions
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)