From 4e997a9c6e25689dca65a2ec573a599699ef8170 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 1 Jan 2012 18:24:37 -0600 Subject: Initial TQt conversion --- PerlQt/tutorials/t8/CannonField.pm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'PerlQt/tutorials/t8/CannonField.pm') 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; -- cgit v1.2.1