diff options
Diffstat (limited to 'PerlQt/examples/network/httpd/httpd.pl')
-rw-r--r-- | PerlQt/examples/network/httpd/httpd.pl | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/PerlQt/examples/network/httpd/httpd.pl b/PerlQt/examples/network/httpd/httpd.pl index 3f46041..a9aa0fd 100644 --- a/PerlQt/examples/network/httpd/httpd.pl +++ b/PerlQt/examples/network/httpd/httpd.pl @@ -1,28 +1,28 @@ #!/usr/bin/perl -w -## This program is based on an example program for Qt. It +## This program is based on an example program for TQt. It ## may be used, distributed and modified without limitation. ## ## Copyright (C) 1992-2000 Trolltech AS. All rights reserved. -# When a new client connects, the server constructs a Qt::Socket and all -# communication with the client is done over this Socket object. Qt::Socket +# When a new client connects, the server constructs a TQt::Socket and all +# communication with the client is done over this Socket object. TQt::Socket # works asynchronously - this means that all the communication is done # through the two slots readClient() and discardClient(). package HttpDaemon; -use Qt; -use Qt::isa qw(Qt::ServerSocket); -use Qt::signals +use TQt; +use TQt::isa qw(TQt::ServerSocket); +use TQt::signals newConnect => [], endConnect => [], wroteToClient => []; -use Qt::slots +use TQt::slots readClient => [], discardClient => []; -use Qt::attributes qw( +use TQt::attributes qw( sockets ); @@ -38,9 +38,9 @@ sub NEW sub newConnection { - my $s = Qt::Socket( this ); - this->connect( $s, SIGNAL 'readyRead()', this, SLOT 'readClient()' ); - this->connect( $s, SIGNAL 'delayedCloseFinished()', this, SLOT 'discardClient()' ); + my $s = TQt::Socket( this ); + this->connect( $s, TQT_SIGNAL 'readyRead()', this, TQT_SLOT 'readClient()' ); + this->connect( $s, TQT_SIGNAL 'delayedCloseFinished()', this, TQT_SLOT 'discardClient()' ); $s->setSocket( shift ); sockets->{ $s } = $s; emit newConnect(); @@ -81,13 +81,13 @@ sub discardClient package HttpInfo; -use Qt; -use Qt::isa qw(Qt::VBox); -use Qt::slots +use TQt; +use TQt::isa qw(TQt::VBox); +use TQt::slots newConnect => [], endConnect => [], wroteToClient => []; -use Qt::attributes qw( +use TQt::attributes qw( httpd infoText ); @@ -106,10 +106,10 @@ sub NEW $lb->setAlignment( &AlignHCenter ); infoText = TextView( this ); my $quit = PushButton( "quit" , this ); - this->connect( httpd, SIGNAL 'newConnect()', SLOT 'newConnect()' ); - this->connect( httpd, SIGNAL 'endConnect()', SLOT 'endConnect()' ); - this->connect( httpd, SIGNAL 'wroteToClient()', SLOT 'wroteToClient()' ); - this->connect( $quit, SIGNAL 'pressed()', Qt::app(), SLOT 'quit()' ); + this->connect( httpd, TQT_SIGNAL 'newConnect()', TQT_SLOT 'newConnect()' ); + this->connect( httpd, TQT_SIGNAL 'endConnect()', TQT_SLOT 'endConnect()' ); + this->connect( httpd, TQT_SIGNAL 'wroteToClient()', TQT_SLOT 'wroteToClient()' ); + this->connect( $quit, TQT_SIGNAL 'pressed()', TQt::app(), TQT_SLOT 'quit()' ); } sub newConnect @@ -130,10 +130,10 @@ sub wroteToClient 1; package main; -use Qt; +use TQt; use HttpInfo; -my $app = Qt::Application(\@ARGV); +my $app = TQt::Application(\@ARGV); my $info = HttpInfo; $app->setMainWidget($info); $info->show; |