diff options
Diffstat (limited to 'PerlQt/examples/forever')
-rw-r--r-- | PerlQt/examples/forever/forever.pl | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/PerlQt/examples/forever/forever.pl b/PerlQt/examples/forever/forever.pl index bf6d56a..e388e44 100644 --- a/PerlQt/examples/forever/forever.pl +++ b/PerlQt/examples/forever/forever.pl @@ -1,11 +1,11 @@ #!/usr/bin/perl -w use strict; package Forever; -use Qt; -use Qt::isa qw(Qt::Widget); -use Qt::slots +use TQt; +use TQt::isa qw(TQt::Widget); +use TQt::slots updateCaption => []; -use Qt::attributes qw( +use TQt::attributes qw( rectangles colors ); @@ -15,23 +15,23 @@ sub NEW { shift->SUPER::NEW(@_); colors = \my @colors; for(my $a = 0; $a < numColors; $a++) { - push @colors, Qt::Color(rand(255), rand(255), rand(255)); + push @colors, TQt::Color(rand(255), rand(255), rand(255)); } rectangles = 0; startTimer(0); - my $counter = Qt::Timer(this); - this->connect($counter, SIGNAL('timeout()'), SLOT('updateCaption()')); + my $counter = TQt::Timer(this); + this->connect($counter, TQT_SIGNAL('timeout()'), TQT_SLOT('updateCaption()')); $counter->start(1000); } sub updateCaption { - my $s = sprintf "PerlQt Example - Forever - %d rectangles/second", rectangles; + my $s = sprintf "PerlTQt Example - Forever - %d rectangles/second", rectangles; rectangles = 0; setCaption($s); } sub paintEvent { - my $paint = Qt::Painter(this); + my $paint = TQt::Painter(this); my $w = width(); my $h = height(); return if $w <= 0 || $h <= 0; @@ -48,12 +48,12 @@ sub timerEvent { } package main; -use Qt; +use TQt; use Forever; -my $a = Qt::Application(\@ARGV); +my $a = TQt::Application(\@ARGV); my $always = Forever; $a->setMainWidget($always); -$always->setCaption("PerlQt Example - Forever"); +$always->setCaption("PerlTQt Example - Forever"); $always->show; exit $a->exec; |