diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-05 15:55:57 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-05 15:55:57 -0600 |
commit | 9ba04742771370f59740e32e11c5f3a1e6a1b70a (patch) | |
tree | c81c34dae2b3b1ea73801bf18a960265dc4207f7 /qtruby/rubylib/tutorial/t7 | |
parent | 1a96c45b22d01378202d9dc7ed9c47acd30f966e (diff) | |
download | tdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.tar.gz tdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.zip |
Initial TQt conversion
Diffstat (limited to 'qtruby/rubylib/tutorial/t7')
-rw-r--r-- | qtruby/rubylib/tutorial/t7/lcdrange.rb | 8 | ||||
-rwxr-xr-x | qtruby/rubylib/tutorial/t7/t7.rb | 14 |
2 files changed, 11 insertions, 11 deletions
diff --git a/qtruby/rubylib/tutorial/t7/lcdrange.rb b/qtruby/rubylib/tutorial/t7/lcdrange.rb index 3df3c961..1bea2ebc 100644 --- a/qtruby/rubylib/tutorial/t7/lcdrange.rb +++ b/qtruby/rubylib/tutorial/t7/lcdrange.rb @@ -1,14 +1,14 @@ #!/usr/bin/ruby -w -require 'Qt' +retquire 'Qt' -class LCDRange < Qt::VBox +class LCDRange < TQt::VBox signals 'valueChanged(int)' slots 'setValue(int)' def initialize(grid) super - lcd = Qt::LCDNumber.new(2, self, 'lcd') - @slider = Qt::Slider.new(Qt::VBox::Horizontal, self, 'slider') + lcd = TQt::LCDNumber.new(2, self, 'lcd') + @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)')) diff --git a/qtruby/rubylib/tutorial/t7/t7.rb b/qtruby/rubylib/tutorial/t7/t7.rb index 396953de..0d757fd0 100755 --- a/qtruby/rubylib/tutorial/t7/t7.rb +++ b/qtruby/rubylib/tutorial/t7/t7.rb @@ -1,18 +1,18 @@ #!/usr/bin/env ruby $VERBOSE = true; $:.unshift File.dirname($0) -require 'Qt' -require 'lcdrange.rb' +retquire 'Qt' +retquire 'lcdrange.rb' -class MyWidget < Qt::VBox +class MyWidget < TQt::VBox def initialize() super - quit = Qt::PushButton.new('Quit', self, 'quit') - quit.setFont(Qt::Font.new('Times', 18, Qt::Font::Bold)) + quit = TQt::PushButton.new('Quit', self, 'quit') + quit.setFont(TQt::Font.new('Times', 18, TQt::Font::Bold)) connect(quit, SIGNAL('clicked()'), $qApp, SLOT('quit()')) - grid = Qt::Grid.new( 4, self ) + grid = TQt::Grid.new( 4, self ) previous = nil for c in 0..3 @@ -29,7 +29,7 @@ end end -a = Qt::Application.new(ARGV) +a = TQt::Application.new(ARGV) w = MyWidget.new a.setMainWidget(w) |