diff options
author | Timothy Pearson <[email protected]> | 2012-01-01 18:24:37 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-01-01 18:24:37 -0600 |
commit | 4e997a9c6e25689dca65a2ec573a599699ef8170 (patch) | |
tree | fdb5ecac42fb8204df9fc8c9abe1c784d4719e0e /PerlQt/tutorials/t8/CannonField.pm | |
parent | bfa107694b2507a7116f8856cafe4ab1375da8a9 (diff) | |
download | libtqt-perl-4e997a9c6e25689dca65a2ec573a599699ef8170.tar.gz libtqt-perl-4e997a9c6e25689dca65a2ec573a599699ef8170.zip |
Initial TQt conversion
Diffstat (limited to 'PerlQt/tutorials/t8/CannonField.pm')
-rw-r--r-- | PerlQt/tutorials/t8/CannonField.pm | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/PerlQt/tutorials/t8/CannonField.pm b/PerlQt/tutorials/t8/CannonField.pm index 28e4986..1c23244 100644 --- a/PerlQt/tutorials/t8/CannonField.pm +++ b/PerlQt/tutorials/t8/CannonField.pm @@ -1,12 +1,12 @@ package CannonField; use strict; -use Qt; -use Qt::isa qw(Qt::Widget); -use Qt::signals +use TQt; +use TQt::isa qw(TQt::Widget); +use TQt::signals angleChanged => ['int']; -use Qt::slots +use TQt::slots setAngle => ['int']; -use Qt::attributes qw( +use TQt::attributes qw( ang ); use POSIX qw(atan); @@ -17,7 +17,7 @@ sub NEW { shift->SUPER::NEW(@_); ang = 45; - setPalette(Qt::Palette(Qt::Color(250, 250, 200))); + setPalette(TQt::Palette(TQt::Color(250, 250, 200))); } sub setAngle { @@ -32,12 +32,12 @@ sub setAngle { sub paintEvent { my $s = "Angle = " . ang; - my $p = Qt::Painter(this); + my $p = TQt::Painter(this); $p->drawText(200, 200, $s); } sub sizePolicy { - Qt::SizePolicy(&Qt::SizePolicy::Expanding, &Qt::SizePolicy::Expanding); + TQt::SizePolicy(&TQt::SizePolicy::Expanding, &TQt::SizePolicy::Expanding); } 1; |