diff options
Diffstat (limited to 'PerlQt/examples/drawlines/drawlines.pl')
-rw-r--r-- | PerlQt/examples/drawlines/drawlines.pl | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/PerlQt/examples/drawlines/drawlines.pl b/PerlQt/examples/drawlines/drawlines.pl index 7297fa2..1d7575f 100644 --- a/PerlQt/examples/drawlines/drawlines.pl +++ b/PerlQt/examples/drawlines/drawlines.pl @@ -1,9 +1,9 @@ #!/usr/bin/perl -w use strict; package ConnectWidget; -use Qt; -use Qt::isa qw(Qt::Widget); -use Qt::attributes qw( +use TQt; +use TQt::isa qw(TQt::Widget); +use TQt::attributes qw( points colors count @@ -25,13 +25,13 @@ sub NEW { points = []; my @colors; for(1 .. MAXCOLORS) { - push @colors, Qt::Color(rand(255), rand(255), rand(255)); + push @colors, TQt::Color(rand(255), rand(255), rand(255)); } colors = \@colors; } sub paintEvent { - my $paint = Qt::Painter(this); + my $paint = TQt::Painter(this); for(my $i = 0; $i < count-1; $i++) { for(my $j = $i+1; $j < count; $j++) { $paint->setPen(colors->[rand(MAXCOLORS)]); @@ -55,20 +55,20 @@ sub mouseReleaseEvent { sub mouseMoveEvent { my $e = shift; if(down && count < MAXPOINTS) { - my $paint = Qt::Painter(this); - push @{this->points}, Qt::Point($e->pos); + my $paint = TQt::Painter(this); + push @{this->points}, TQt::Point($e->pos); count++; $paint->drawPoint($e->pos); } } package main; -use Qt; +use TQt; use ConnectWidget; -my $a = Qt::Application(\@ARGV); +my $a = TQt::Application(\@ARGV); my $connect = ConnectWidget; -$connect->setCaption("PerlQt Example - Draw lines"); +$connect->setCaption("PerlTQt Example - Draw lines"); $a->setMainWidget($connect); $connect->show; exit $a->exec; |