diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-01-01 18:24:37 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-01-01 18:24:37 -0600 |
commit | 4e997a9c6e25689dca65a2ec573a599699ef8170 (patch) | |
tree | fdb5ecac42fb8204df9fc8c9abe1c784d4719e0e /PerlQt/tutorials/t10/t10.pl | |
parent | bfa107694b2507a7116f8856cafe4ab1375da8a9 (diff) | |
download | libtqt-perl-4e997a9c6e25689dca65a2ec573a599699ef8170.tar.gz libtqt-perl-4e997a9c6e25689dca65a2ec573a599699ef8170.zip |
Initial TQt conversion
Diffstat (limited to 'PerlQt/tutorials/t10/t10.pl')
-rw-r--r-- | PerlQt/tutorials/t10/t10.pl | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/PerlQt/tutorials/t10/t10.pl b/PerlQt/tutorials/t10/t10.pl index d9b825e..7056680 100644 --- a/PerlQt/tutorials/t10/t10.pl +++ b/PerlQt/tutorials/t10/t10.pl @@ -4,8 +4,8 @@ use blib; package MyWidget; use strict; -use Qt; -use Qt::isa qw(Qt::Widget); +use TQt; +use TQt::isa qw(TQt::Widget); use LCDRange; use CannonField; @@ -13,10 +13,10 @@ use CannonField; sub NEW { shift->SUPER::NEW(@_); - my $quit = Qt::PushButton("&Quit", this, "quit"); - $quit->setFont(Qt::Font("Times", 18, &Qt::Font::Bold)); + my $quit = TQt::PushButton("&Quit", this, "quit"); + $quit->setFont(TQt::Font("Times", 18, &TQt::Font::Bold)); - Qt::app->connect($quit, SIGNAL('clicked()'), SLOT('quit()')); + TQt::app->connect($quit, TQT_SIGNAL('clicked()'), TQT_SLOT('quit()')); my $angle = LCDRange(this, "angle"); $angle->setRange(5, 70); @@ -26,18 +26,18 @@ sub NEW { my $cannonField = CannonField(this, "cannonField"); - $cannonField->connect($angle, SIGNAL('valueChanged(int)'), SLOT('setAngle(int)')); - $angle->connect($cannonField, SIGNAL('angleChanged(int)'), SLOT('setValue(int)')); + $cannonField->connect($angle, TQT_SIGNAL('valueChanged(int)'), TQT_SLOT('setAngle(int)')); + $angle->connect($cannonField, TQT_SIGNAL('angleChanged(int)'), TQT_SLOT('setValue(int)')); - $cannonField->connect($force, SIGNAL('valueChanged(int)'), SLOT('setForce(int)')); - $force->connect($cannonField, SIGNAL('forceChanged(int)'), SLOT('setValue(int)')); + $cannonField->connect($force, TQT_SIGNAL('valueChanged(int)'), TQT_SLOT('setForce(int)')); + $force->connect($cannonField, TQT_SIGNAL('forceChanged(int)'), TQT_SLOT('setValue(int)')); - my $grid = Qt::GridLayout(this, 2, 2, 10); + my $grid = TQt::GridLayout(this, 2, 2, 10); $grid->addWidget($quit, 0, 0); $grid->addWidget($cannonField, 1, 1); $grid->setColStretch(1, 10); - my $leftBox = Qt::VBoxLayout; + my $leftBox = TQt::VBoxLayout; $grid->addLayout($leftBox, 1, 0); $leftBox->addWidget($angle); $leftBox->addWidget($force); @@ -48,11 +48,11 @@ sub NEW { } package main; -use Qt; +use TQt; use MyWidget; -Qt::Application::setColorSpec(&Qt::Application::CustomColor); -my $a = Qt::Application(\@ARGV); +TQt::Application::setColorSpec(&TQt::Application::CustomColor); +my $a = TQt::Application(\@ARGV); my $w = MyWidget; $w->setGeometry(100, 100, 500, 355); |