diff options
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; |