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