summaryrefslogtreecommitdiffstats
path: root/PerlQt/tutorials/t9/CannonField.pm
diff options
context:
space:
mode:
Diffstat (limited to 'PerlQt/tutorials/t9/CannonField.pm')
-rw-r--r--PerlQt/tutorials/t9/CannonField.pm20
1 files changed, 10 insertions, 10 deletions
diff --git a/PerlQt/tutorials/t9/CannonField.pm b/PerlQt/tutorials/t9/CannonField.pm
index e12489a..1500480 100644
--- a/PerlQt/tutorials/t9/CannonField.pm
+++ b/PerlQt/tutorials/t9/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 {
@@ -31,18 +31,18 @@ sub setAngle {
}
sub paintEvent {
- my $p = Qt::Painter(this);
+ my $p = TQt::Painter(this);
$p->setBrush(&blue);
$p->setPen(&NoPen);
$p->translate(0, rect()->bottom);
- $p->drawPie(Qt::Rect(-35, -35, 70, 70), 0, 90*16);
+ $p->drawPie(TQt::Rect(-35, -35, 70, 70), 0, 90*16);
$p->rotate(- ang);
- $p->drawRect(Qt::Rect(33, -4, 15, 8));
+ $p->drawRect(TQt::Rect(33, -4, 15, 8));
}
sub sizePolicy {
- Qt::SizePolicy(&Qt::SizePolicy::Expanding, &Qt::SizePolicy::Expanding);
+ TQt::SizePolicy(&TQt::SizePolicy::Expanding, &TQt::SizePolicy::Expanding);
}
1;