Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 301b538079)
r14.1.x
Michele Calgaro 11 months ago
parent bb06ec3586
commit 947bc2dba5
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -849,7 +849,7 @@ sub MODIFY_CODE_ATTRIBUTES
my @reject;
foreach my $attr( @attrs )
{
if( $attr !~ /^ (SIGNAL|SLOT|DCOP) \(( .* )\) $/x )
if( $attr !~ /^ (TQ_SIGNAL|TQ_SLOT|DCOP) \(( .* )\) $/x )
{
push @reject, $attr;
next;
@ -877,7 +877,7 @@ require Exporter;
our $VERSION = '3.008';
our @EXPORT = qw(&TQT_SIGNAL &TQT_SLOT &CAST &emit &min &max);
our @EXPORT = qw(&TQ_SIGNAL &TQ_SLOT &CAST &emit &min &max);
XSLoader::load 'TQt', $VERSION;
@ -891,8 +891,8 @@ TQt::_internal::init();
# In general, I'm not a fan of prototypes.
# However, I'm also not a fan of parentheses
sub TQT_SIGNAL ($) { '2' . $_[0] }
sub TQT_SLOT ($) { '1' . $_[0] }
sub TQ_SIGNAL ($) { '2' . $_[0] }
sub TQ_SLOT ($) { '1' . $_[0] }
sub CAST ($$) { bless $_[0], " $_[1]" }
sub emit (@) { pop @_ }
sub min ($$) { $_[0] < $_[1] ? $_[0] : $_[1] }

@ -326,13 +326,13 @@ sub NEW
helpExampleAction->addTo(helpMenu);
menubar->insertItem(trUtf8("&Help"), helpMenu);
# TQt::Object::connect(fileNewAction, TQT_SIGNAL "activated()", this, TQT_SLOT "fileNew()");
TQt::Object::connect(fileOpenAction, TQT_SIGNAL "activated()", this, TQT_SLOT "fileOpen()");
TQt::Object::connect(fileSaveAction, TQT_SIGNAL "activated()", this, TQT_SLOT "fileSave()");
TQt::Object::connect(fileSaveAsAction, TQT_SIGNAL "activated()", this, TQT_SLOT "fileSaveAs()");
TQt::Object::connect(filePrintAction, TQT_SIGNAL "activated()", this, TQT_SLOT "filePrint()");
TQt::Object::connect(fileExitAction, TQT_SIGNAL "activated()", this, TQT_SLOT "fileExit()");
TQt::Object::connect(helpExampleAction, TQT_SIGNAL "activated()", this, TQT_SLOT "helpExample()");
# TQt::Object::connect(fileNewAction, TQ_SIGNAL "activated()", this, TQ_SLOT "fileNew()");
TQt::Object::connect(fileOpenAction, TQ_SIGNAL "activated()", this, TQ_SLOT "fileOpen()");
TQt::Object::connect(fileSaveAction, TQ_SIGNAL "activated()", this, TQ_SLOT "fileSave()");
TQt::Object::connect(fileSaveAsAction, TQ_SIGNAL "activated()", this, TQ_SLOT "fileSaveAs()");
TQt::Object::connect(filePrintAction, TQ_SIGNAL "activated()", this, TQ_SLOT "filePrint()");
TQt::Object::connect(fileExitAction, TQ_SIGNAL "activated()", this, TQ_SLOT "fileExit()");
TQt::Object::connect(helpExampleAction, TQ_SIGNAL "activated()", this, TQ_SLOT "helpExample()");
executedLines = [];
@ -542,11 +542,11 @@ sub NEW
shellWindow->show;
this->connect(shellWindow->comboBox->lineEdit, TQT_SIGNAL 'returnPressed()', TQT_SLOT 'evalInput()');
this->connect(shellWindow->comboBox->lineEdit, TQ_SIGNAL 'returnPressed()', TQ_SLOT 'evalInput()');
this->{'prompt'} = '<b><font color="blue">$&gt;</font></b>';
setCaption("MainWindow - this");
shellWindow->sessionLog->setText("Ready.<br>");
TQt::Object::connect(shellWindow, TQT_SIGNAL 'fileNeedsEval(TQString)', this, TQT_SLOT 'evalFile(TQString)');
TQt::Object::connect(shellWindow, TQ_SIGNAL 'fileNeedsEval(TQString)', this, TQ_SLOT 'evalFile(TQString)');
}
sub logAppend
@ -670,6 +670,6 @@ resize(220,240);
vbox->show;
sample = TQt::PopupMenu( this );
use TQt::slots 'there' => [];
sample->insertItem("&There", this, TQT_SLOT 'there()');
sample->insertItem("&There", this, TQ_SLOT 'there()');
menuBar()->insertItem("&Here", sample);
sub there { statusBar()->message("There...", 2000) };

@ -18,7 +18,7 @@ sub NEW {
shift->SUPER::NEW(@_);
_time = TQt::Time::currentTime(); # get current time
my $internalTimer = TQt::Timer(this); # create internal timer
this->connect($internalTimer, TQT_SIGNAL('timeout()'), TQT_SLOT('timeout()'));
this->connect($internalTimer, TQ_SIGNAL('timeout()'), TQ_SLOT('timeout()'));
$internalTimer->start(5000); # emit signal every 5 seconds
}

@ -67,8 +67,8 @@ sub NEW {
# insert a checkbox
state = TQt::CheckBox("E&nable Radiobuttons", $bgrp3);
state->setChecked(1);
# ...and connect its TQT_SIGNAL clicked() with the TQT_SLOT slotChangeGrp3State()
this->connect(state, TQT_SIGNAL('clicked()'), TQT_SLOT('slotChangeGrp3State()'));
# ...and connect its TQ_SIGNAL clicked() with the TQ_SLOT slotChangeGrp3State()
this->connect(state, TQ_SIGNAL('clicked()'), TQ_SLOT('slotChangeGrp3State()'));
# ----------- fourth group
@ -90,7 +90,7 @@ sub NEW {
}
#
# TQT_SLOT slotChangeGrp3State()
# TQ_SLOT slotChangeGrp3State()
#
# enables/disables the radiobuttons of the third buttongroup
#

@ -111,7 +111,7 @@ sub NEW {
# Create a button group to contain all buttons
bgroup = TQt::ButtonGroup(this);
bgroup->resize(200, 200);
this->connect(bgroup, TQT_SIGNAL('clicked(int)'), TQT_SLOT('updateIt(int)'));
this->connect(bgroup, TQ_SIGNAL('clicked(int)'), TQ_SLOT('updateIt(int)'));
# Calculate the size for the radio buttons
my $maxwidth = 80;
@ -150,7 +150,7 @@ sub NEW {
_print = TQt::PushButton("Print...", bgroup);
_print->resize(80, 30);
_print->move($maxwidth/2 - _print->width/2, maxindex*30+20);
this->connect(_print, TQT_SIGNAL('clicked()'), TQT_SLOT('printIt()'));
this->connect(_print, TQ_SIGNAL('clicked()'), TQ_SLOT('printIt()'));
bgroup->resize($maxwidth, _print->y+_print->height+10);

@ -20,7 +20,7 @@ sub NEW {
rectangles = 0;
startTimer(0);
my $counter = TQt::Timer(this);
this->connect($counter, TQT_SIGNAL('timeout()'), TQT_SLOT('updateCaption()'));
this->connect($counter, TQ_SIGNAL('timeout()'), TQ_SLOT('updateCaption()'));
$counter->start(1000);
}

@ -39,8 +39,8 @@ sub NEW
sub newConnection
{
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()' );
this->connect( $s, TQ_SIGNAL 'readyRead()', this, TQ_SLOT 'readClient()' );
this->connect( $s, TQ_SIGNAL 'delayedCloseFinished()', this, TQ_SLOT 'discardClient()' );
$s->setSocket( shift );
sockets->{ $s } = $s;
emit newConnect();
@ -106,10 +106,10 @@ sub NEW
$lb->setAlignment( &AlignHCenter );
infoText = TextView( this );
my $quit = PushButton( "quit" , this );
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()' );
this->connect( httpd, TQ_SIGNAL 'newConnect()', TQ_SLOT 'newConnect()' );
this->connect( httpd, TQ_SIGNAL 'endConnect()', TQ_SLOT 'endConnect()' );
this->connect( httpd, TQ_SIGNAL 'wroteToClient()', TQ_SLOT 'wroteToClient()' );
this->connect( $quit, TQ_SIGNAL 'pressed()', TQt::app(), TQ_SLOT 'quit()' );
}
sub newConnect

@ -23,7 +23,7 @@ sub NEW
# Create a menu
file = TQt::PopupMenu( this );
file->insertItem( "Exit", TQt::app(), TQT_SLOT 'quit()', TQt::KeySequence(int &CTRL + &Key_Q ));
file->insertItem( "Exit", TQt::app(), TQ_SLOT 'quit()', TQt::KeySequence(int &CTRL + &Key_Q ));
# Create a menu bar
menu = TQt::MenuBar( this );
@ -41,15 +41,15 @@ sub NEW
# Create the three sliders; one for each rotation axis
xpos = TQt::Slider ( 0, 360, 60, 0, &TQt::Slider::Vertical, this, "xsl" );
xpos->setTickmarks( &TQt::Slider::Left );
TQt::Object::connect( xpos, TQT_SIGNAL 'valueChanged(int)', box, TQT_SLOT 'setXRotation(int)' );
TQt::Object::connect( xpos, TQ_SIGNAL 'valueChanged(int)', box, TQ_SLOT 'setXRotation(int)' );
ypos = TQt::Slider ( 0, 360, 60, 0, &TQt::Slider::Vertical, this, "ysl" );
ypos->setTickmarks( &TQt::Slider::Left );
TQt::Object::connect( ypos, TQT_SIGNAL 'valueChanged(int)', box, TQT_SLOT 'setYRotation(int)' );
TQt::Object::connect( ypos, TQ_SIGNAL 'valueChanged(int)', box, TQ_SLOT 'setYRotation(int)' );
zpos = TQt::Slider ( 0, 360, 60, 0, &TQt::Slider::Vertical, this, "zsl" );
zpos->setTickmarks( &TQt::Slider::Left );
TQt::Object::connect( zpos, TQT_SIGNAL 'valueChanged(int)', box, TQT_SLOT 'setZRotation(int)' );
TQt::Object::connect( zpos, TQ_SIGNAL 'valueChanged(int)', box, TQ_SLOT 'setZRotation(int)' );
# Now that we have all the widgets, put them into a nice layout

@ -158,18 +158,18 @@ sub NEW
menubar->insertItem( "&File", file );
for (my $i=first_draw_item; $i<=last_draw_item; $i++)
{ file->insertItem( drawItemRects($i)." Rectangles", $i) }
TQt::Object::connect( menubar, TQT_SIGNAL "activated(int)", this, TQT_SLOT "doMenuItem(int)" );
TQt::Object::connect( menubar, TQ_SIGNAL "activated(int)", this, TQ_SLOT "doMenuItem(int)" );
file->insertSeparator;
file->insertItem( "Quit", TQt::app(), TQT_SLOT "quit()" );
file->insertItem( "Quit", TQt::app(), TQ_SLOT "quit()" );
options = TQt::PopupMenu;
menubar->insertItem( "&Options", options );
td_id = options->insertItem( "Timer driven", this, TQT_SLOT "timerDriven()" );
ld_id = options->insertItem( "Loop driven", this, TQT_SLOT "loopDriven()" );
td_id = options->insertItem( "Timer driven", this, TQ_SLOT "timerDriven()" );
ld_id = options->insertItem( "Loop driven", this, TQ_SLOT "loopDriven()" );
options->insertSeparator;
dl_id = options->insertItem( "Default label", this, TQT_SLOT "defaultLabel()" );
cl_id = options->insertItem( "Custom label", this, TQT_SLOT "customLabel()" );
dl_id = options->insertItem( "Default label", this, TQ_SLOT "defaultLabel()" );
cl_id = options->insertItem( "Custom label", this, TQ_SLOT "customLabel()" );
options->insertSeparator;
md_id = options->insertItem( "No minimum duration", this, TQT_SLOT "toggleMinimumDuration()" );
md_id = options->insertItem( "No minimum duration", this, TQ_SLOT "toggleMinimumDuration()" );
options->setCheckable( 1 );
loopDriven();
customLabel();
@ -301,7 +301,7 @@ sub draw
pb = newProgressDialog("Drawing rectangles.\n".
"Using timer event.", $n, 0);
pb->setCaption("Please Wait");
TQt::Object::connect(pb, TQT_SIGNAL "cancelled()", this, TQT_SLOT "stopDrawing()");
TQt::Object::connect(pb, TQ_SIGNAL "cancelled()", this, TQ_SLOT "stopDrawing()");
enableDrawingItems(0);
startTimer(0);
got_stop = 0;

@ -266,26 +266,26 @@ sub NEW
TQt::Object::connect(fileNewAction, TQT_SIGNAL "activated()", this, TQT_SLOT "fileNew()");
TQt::Object::connect(fileOpenAction, TQT_SIGNAL "activated()", this, TQT_SLOT "fileOpen()");
TQt::Object::connect(fileSaveAction, TQT_SIGNAL "activated()", this, TQT_SLOT "fileSave()");
TQt::Object::connect(fileSaveAsAction, TQT_SIGNAL "activated()", this, TQT_SLOT "fileSaveAs()");
TQt::Object::connect(fileExitAction, TQT_SIGNAL "activated()", this, TQT_SLOT "fileExit()");
TQt::Object::connect(helpIndexAction, TQT_SIGNAL "activated()", this, TQT_SLOT "helpIndex()");
TQt::Object::connect(helpContentsAction, TQT_SIGNAL "activated()", this, TQT_SLOT "helpContents()");
TQt::Object::connect(helpAboutAction, TQT_SIGNAL "activated()", this, TQT_SLOT "helpAbout()");
TQt::Object::connect(SpinBox2, TQT_SIGNAL "valueChanged(int)", textEdit, TQT_SLOT "setPointSize(int)");
TQt::Object::connect(editCutAction, TQT_SIGNAL "activated()", textEdit, TQT_SLOT "cut()");
TQt::Object::connect(editPasteAction, TQT_SIGNAL "activated()", textEdit, TQT_SLOT "paste()");
TQt::Object::connect(editCopyAction, TQT_SIGNAL "activated()", textEdit, TQT_SLOT "copy()");
TQt::Object::connect(editRedoAction, TQT_SIGNAL "activated()", textEdit, TQT_SLOT "redo()");
TQt::Object::connect(editUndoAction, TQT_SIGNAL "activated()", textEdit, TQT_SLOT "undo()");
TQt::Object::connect(alignActionGroup, TQT_SIGNAL "selected(TQAction*)", this, TQT_SLOT "changeAlignment(TQAction*)");
TQt::Object::connect(underlineAction, TQT_SIGNAL "toggled(bool)", textEdit, TQT_SLOT "setUnderline(bool)");
TQt::Object::connect(italicAction, TQT_SIGNAL "toggled(bool)", textEdit, TQT_SLOT "setItalic(bool)");
TQt::Object::connect(boldAction, TQT_SIGNAL "toggled(bool)", textEdit, TQT_SLOT "setBold(bool)");
TQt::Object::connect(fontComboBox, TQT_SIGNAL "activated(const TQString&)", textEdit, TQT_SLOT "setFamily(const TQString&)");
TQt::Object::connect(fontComboBox, TQT_SIGNAL "activated(const TQString&)", textEdit, TQT_SLOT "setFocus()");
TQt::Object::connect(fileNewAction, TQ_SIGNAL "activated()", this, TQ_SLOT "fileNew()");
TQt::Object::connect(fileOpenAction, TQ_SIGNAL "activated()", this, TQ_SLOT "fileOpen()");
TQt::Object::connect(fileSaveAction, TQ_SIGNAL "activated()", this, TQ_SLOT "fileSave()");
TQt::Object::connect(fileSaveAsAction, TQ_SIGNAL "activated()", this, TQ_SLOT "fileSaveAs()");
TQt::Object::connect(fileExitAction, TQ_SIGNAL "activated()", this, TQ_SLOT "fileExit()");
TQt::Object::connect(helpIndexAction, TQ_SIGNAL "activated()", this, TQ_SLOT "helpIndex()");
TQt::Object::connect(helpContentsAction, TQ_SIGNAL "activated()", this, TQ_SLOT "helpContents()");
TQt::Object::connect(helpAboutAction, TQ_SIGNAL "activated()", this, TQ_SLOT "helpAbout()");
TQt::Object::connect(SpinBox2, TQ_SIGNAL "valueChanged(int)", textEdit, TQ_SLOT "setPointSize(int)");
TQt::Object::connect(editCutAction, TQ_SIGNAL "activated()", textEdit, TQ_SLOT "cut()");
TQt::Object::connect(editPasteAction, TQ_SIGNAL "activated()", textEdit, TQ_SLOT "paste()");
TQt::Object::connect(editCopyAction, TQ_SIGNAL "activated()", textEdit, TQ_SLOT "copy()");
TQt::Object::connect(editRedoAction, TQ_SIGNAL "activated()", textEdit, TQ_SLOT "redo()");
TQt::Object::connect(editUndoAction, TQ_SIGNAL "activated()", textEdit, TQ_SLOT "undo()");
TQt::Object::connect(alignActionGroup, TQ_SIGNAL "selected(TQAction*)", this, TQ_SLOT "changeAlignment(TQAction*)");
TQt::Object::connect(underlineAction, TQ_SIGNAL "toggled(bool)", textEdit, TQ_SLOT "setUnderline(bool)");
TQt::Object::connect(italicAction, TQ_SIGNAL "toggled(bool)", textEdit, TQ_SLOT "setItalic(bool)");
TQt::Object::connect(boldAction, TQ_SIGNAL "toggled(bool)", textEdit, TQ_SLOT "setBold(bool)");
TQt::Object::connect(fontComboBox, TQ_SIGNAL "activated(const TQString&)", textEdit, TQ_SLOT "setFamily(const TQString&)");
TQt::Object::connect(fontComboBox, TQ_SIGNAL "activated(const TQString&)", textEdit, TQ_SLOT "setFocus()");
init();
}
@ -367,7 +367,7 @@ use EditorForm;
use imageCollection;
my $a = TQt::Application(\@ARGV);
TQt::Object::connect($a, TQT_SIGNAL("lastWindowClosed()"), $a, TQT_SLOT("quit()"));
TQt::Object::connect($a, TQ_SIGNAL("lastWindowClosed()"), $a, TQ_SLOT("quit()"));
my $w = EditorForm;
$a->setMainWidget($w);
$w->show;

@ -18,6 +18,6 @@ print +$@ ? "not ok\n" : "ok 2\n";
# one second test of the event loop
TQt::Timer::singleShot( 300, TQt::app(), TQT_SLOT "quit()" );
TQt::Timer::singleShot( 300, TQt::app(), TQ_SLOT "quit()" );
print TQt::app()->exec ? "not ok\n" : "ok 3\n";

@ -15,10 +15,10 @@ sub NEW {
# 1) testing correct subclassing of TQt::Application and this pointer
print +(ref(this) eq " MyApp")? "ok 1\n" : "not ok\n";
this->connect(this, TQT_SIGNAL 'bar(int)', TQT_SLOT 'foo(int)');
this->connect(this, TQ_SIGNAL 'bar(int)', TQ_SLOT 'foo(int)');
# 3) automatic quitting will test TQt sig to custom slot
this->connect(this, TQT_SIGNAL 'aboutToQuit()', TQT_SLOT 'baz()');
this->connect(this, TQ_SIGNAL 'aboutToQuit()', TQ_SLOT 'baz()');
# 2) testing custom sig to custom slot
emit bar(3);
@ -44,6 +44,6 @@ use MyApp;
$a = 0;
$a = MyApp(\@ARGV);
TQt::Timer::singleShot( 300, TQt::app(), TQT_SLOT "quit()" );
TQt::Timer::singleShot( 300, TQt::app(), TQ_SLOT "quit()" );
exit TQt::app()->exec;

@ -12,8 +12,8 @@ use TQt::signals
sub NEW
{
shift->SUPER::NEW(@_);
this->connect(this, TQT_SIGNAL 'bar(int)', TQT_SLOT 'foo(int)');
this->connect(this, TQT_SIGNAL 'aboutToQuit()', TQT_SLOT 'baz()');
this->connect(this, TQ_SIGNAL 'bar(int)', TQ_SLOT 'foo(int)');
this->connect(this, TQ_SIGNAL 'aboutToQuit()', TQ_SLOT 'baz()');
}
sub foo
@ -67,6 +67,6 @@ use MySubApp;
$a = 0;
$a = MySubApp(\@ARGV);
TQt::Timer::singleShot( 300, TQt::app(), TQT_SLOT "quit()" );
TQt::Timer::singleShot( 300, TQt::app(), TQ_SLOT "quit()" );
exit TQt::app()->exec;

@ -70,8 +70,8 @@ sub NEW {
# insert a checkbox
state = TQt::CheckBox("E&nable Radiobuttons", $bgrp3);
state->setChecked(1);
# ...and connect its TQT_SIGNAL clicked() with the TQT_SLOT slotChangeGrp3State()
this->connect(state, TQT_SIGNAL('clicked()'), TQT_SLOT('slotChangeGrp3State()'));
# ...and connect its TQ_SIGNAL clicked() with the TQ_SLOT slotChangeGrp3State()
this->connect(state, TQ_SIGNAL('clicked()'), TQ_SLOT('slotChangeGrp3State()'));
# ----------- fourth group
@ -93,7 +93,7 @@ sub NEW {
}
#
# TQT_SLOT slotChangeGrp3State()
# TQ_SLOT slotChangeGrp3State()
#
# enables/disables the radiobuttons of the third buttongroup
#
@ -121,7 +121,7 @@ $buttonsgroups->setCaption("PerlTQt Test - Please wait");
$a->setMainWidget($buttonsgroups);
$buttonsgroups->show;
TQt::Timer::singleShot( 2000, TQt::app(), TQT_SLOT "quit()" );
TQt::Timer::singleShot( 2000, TQt::app(), TQ_SLOT "quit()" );
my $r = $a->exec;
print +$r?"not ok\n" : "ok 1\n";
exit $r;

@ -19,8 +19,8 @@ sub NEW {
slider = TQt::Slider(&Horizontal, this, "slider");
slider->setRange(0, 99);
slider->setValue(0);
$lcd->connect(slider, TQT_SIGNAL('valueChanged(int)'), TQT_SLOT('display(int)'));
this->connect(slider, TQT_SIGNAL('valueChanged(int)'), TQT_SIGNAL('valueChanged(int)'));
$lcd->connect(slider, TQ_SIGNAL('valueChanged(int)'), TQ_SLOT('display(int)'));
this->connect(slider, TQ_SIGNAL('valueChanged(int)'), TQ_SIGNAL('valueChanged(int)'));
setFocusProxy(slider);
}

@ -16,7 +16,7 @@ sub NEW {
my $quit = TQt::PushButton("&Quit", this, "quit");
$quit->setFont(TQt::Font("Times", 18, &TQt::Font::Bold));
TQt::app->connect($quit, TQT_SIGNAL('clicked()'), TQT_SLOT('quit()'));
TQt::app->connect($quit, TQ_SIGNAL('clicked()'), TQ_SLOT('quit()'));
my $angle = LCDRange(this, "angle");
$angle->setRange(5, 70);
@ -26,11 +26,11 @@ sub NEW {
my $cannonField = CannonField(this, "cannonField");
$cannonField->connect($angle, TQT_SIGNAL('valueChanged(int)'), TQT_SLOT('setAngle(int)'));
$angle->connect($cannonField, TQT_SIGNAL('angleChanged(int)'), TQT_SLOT('setValue(int)'));
$cannonField->connect($angle, TQ_SIGNAL('valueChanged(int)'), TQ_SLOT('setAngle(int)'));
$angle->connect($cannonField, TQ_SIGNAL('angleChanged(int)'), TQ_SLOT('setValue(int)'));
$cannonField->connect($force, TQT_SIGNAL('valueChanged(int)'), TQT_SLOT('setForce(int)'));
$force->connect($cannonField, TQT_SIGNAL('forceChanged(int)'), TQT_SLOT('setValue(int)'));
$cannonField->connect($force, TQ_SIGNAL('valueChanged(int)'), TQ_SLOT('setForce(int)'));
$force->connect($cannonField, TQ_SIGNAL('forceChanged(int)'), TQ_SLOT('setValue(int)'));
my $grid = TQt::GridLayout(this, 2, 2, 10);
$grid->addWidget($quit, 0, 0);

@ -31,7 +31,7 @@ sub NEW {
f = 0;
timerCount = 0;
autoShootTimer = TQt::Timer(this, "movement handler");
this->connect(autoShootTimer, TQT_SIGNAL('timeout()'), TQT_SLOT('moveShot()'));
this->connect(autoShootTimer, TQ_SIGNAL('timeout()'), TQ_SLOT('moveShot()'));
shoot_ang = 0;
shoot_f = 0;
setPalette(TQt::Palette(TQt::Color(250, 250, 200)));

@ -19,8 +19,8 @@ sub NEW {
slider = TQt::Slider(&Horizontal, this, "slider");
slider->setRange(0, 99);
slider->setValue(0);
$lcd->connect(slider, TQT_SIGNAL('valueChanged(int)'), TQT_SLOT('display(int)'));
this->connect(slider, TQT_SIGNAL('valueChanged(int)'), TQT_SIGNAL('valueChanged(int)'));
$lcd->connect(slider, TQ_SIGNAL('valueChanged(int)'), TQ_SLOT('display(int)'));
this->connect(slider, TQ_SIGNAL('valueChanged(int)'), TQ_SIGNAL('valueChanged(int)'));
setFocusProxy(slider);
}

@ -16,7 +16,7 @@ sub NEW {
my $quit = TQt::PushButton("&Quit", this, "quit");
$quit->setFont(TQt::Font("Times", 18, &TQt::Font::Bold));
TQt::app->connect($quit, TQT_SIGNAL('clicked()'), TQT_SLOT('quit()'));
TQt::app->connect($quit, TQ_SIGNAL('clicked()'), TQ_SLOT('quit()'));
my $angle = LCDRange(this, "angle");
$angle->setRange(5, 70);
@ -26,16 +26,16 @@ sub NEW {
my $cannonField = CannonField(this, "cannonField");
$cannonField->connect($angle, TQT_SIGNAL('valueChanged(int)'), TQT_SLOT('setAngle(int)'));
$angle->connect($cannonField, TQT_SIGNAL('angleChanged(int)'), TQT_SLOT('setValue(int)'));
$cannonField->connect($angle, TQ_SIGNAL('valueChanged(int)'), TQ_SLOT('setAngle(int)'));
$angle->connect($cannonField, TQ_SIGNAL('angleChanged(int)'), TQ_SLOT('setValue(int)'));
$cannonField->connect($force, TQT_SIGNAL('valueChanged(int)'), TQT_SLOT('setForce(int)'));
$force->connect($cannonField, TQT_SIGNAL('forceChanged(int)'), TQT_SLOT('setValue(int)'));
$cannonField->connect($force, TQ_SIGNAL('valueChanged(int)'), TQ_SLOT('setForce(int)'));
$force->connect($cannonField, TQ_SIGNAL('forceChanged(int)'), TQ_SLOT('setValue(int)'));
my $shoot = TQt::PushButton('&Shoot', this, "shoot");
$shoot->setFont(TQt::Font("Times", 18, &TQt::Font::Bold));
$cannonField->connect($shoot, TQT_SIGNAL('clicked()'), TQT_SLOT('shoot()'));
$cannonField->connect($shoot, TQ_SIGNAL('clicked()'), TQ_SLOT('shoot()'));
my $grid = TQt::GridLayout(this, 2, 2, 10);
$grid->addWidget($quit, 0, 0);

@ -35,7 +35,7 @@ sub NEW {
f = 0;
timerCount = 0;
autoShootTimer = TQt::Timer(this, "movement handler");
this->connect(autoShootTimer, TQT_SIGNAL('timeout()'), TQT_SLOT('moveShot()'));
this->connect(autoShootTimer, TQ_SIGNAL('timeout()'), TQ_SLOT('moveShot()'));
shoot_ang = 0;
shoot_f = 0;
target = TQt::Point(0, 0);

@ -34,8 +34,8 @@ sub init {
label = TQt::Label(" ", this, "label");
label->setAlignment(&AlignCenter);
$lcd->connect(slider, TQT_SIGNAL('valueChanged(int)'), TQT_SLOT('display(int)'));
this->connect(slider, TQT_SIGNAL('valueChanged(int)'), TQT_SIGNAL('valueChanged(int)'));
$lcd->connect(slider, TQ_SIGNAL('valueChanged(int)'), TQ_SLOT('display(int)'));
this->connect(slider, TQ_SIGNAL('valueChanged(int)'), TQ_SIGNAL('valueChanged(int)'));
setFocusProxy(slider);
}

@ -16,7 +16,7 @@ sub NEW {
my $quit = TQt::PushButton("&Quit", this, "quit");
$quit->setFont(TQt::Font("Times", 18, &TQt::Font::Bold));
TQt::app->connect($quit, TQT_SIGNAL('clicked()'), TQT_SLOT('quit()'));
TQt::app->connect($quit, TQ_SIGNAL('clicked()'), TQ_SLOT('quit()'));
my $angle = LCDRange("ANGLE", this, "angle");
$angle->setRange(5, 70);
@ -26,16 +26,16 @@ sub NEW {
my $cannonField = CannonField(this, "cannonField");
$cannonField->connect($angle, TQT_SIGNAL('valueChanged(int)'), TQT_SLOT('setAngle(int)'));
$angle->connect($cannonField, TQT_SIGNAL('angleChanged(int)'), TQT_SLOT('setValue(int)'));
$cannonField->connect($angle, TQ_SIGNAL('valueChanged(int)'), TQ_SLOT('setAngle(int)'));
$angle->connect($cannonField, TQ_SIGNAL('angleChanged(int)'), TQ_SLOT('setValue(int)'));
$cannonField->connect($force, TQT_SIGNAL('valueChanged(int)'), TQT_SLOT('setForce(int)'));
$force->connect($cannonField, TQT_SIGNAL('forceChanged(int)'), TQT_SLOT('setValue(int)'));
$cannonField->connect($force, TQ_SIGNAL('valueChanged(int)'), TQ_SLOT('setForce(int)'));
$force->connect($cannonField, TQ_SIGNAL('forceChanged(int)'), TQ_SLOT('setValue(int)'));
my $shoot = TQt::PushButton('&Shoot', this, "shoot");
$shoot->setFont(TQt::Font("Times", 18, &TQt::Font::Bold));
$cannonField->connect($shoot, TQT_SIGNAL('clicked()'), TQT_SLOT('shoot()'));
$cannonField->connect($shoot, TQ_SIGNAL('clicked()'), TQ_SLOT('shoot()'));
my $grid = TQt::GridLayout(this, 2, 2, 10);
$grid->addWidget($quit, 0, 0);

@ -40,7 +40,7 @@ sub NEW {
f = 0;
timerCount = 0;
autoShootTimer = TQt::Timer(this, "movement handler");
this->connect(autoShootTimer, TQT_SIGNAL('timeout()'), TQT_SLOT('moveShot()'));
this->connect(autoShootTimer, TQ_SIGNAL('timeout()'), TQ_SLOT('moveShot()'));
shoot_ang = 0;
shoot_f = 0;
target = TQt::Point(0, 0);

@ -22,7 +22,7 @@ sub NEW {
my $quit = TQt::PushButton("&Quit", this, "quit");
$quit->setFont(TQt::Font("Times", 18, &TQt::Font::Bold));
TQt::app->connect($quit, TQT_SIGNAL('clicked()'), TQT_SLOT('quit()'));
TQt::app->connect($quit, TQ_SIGNAL('clicked()'), TQ_SLOT('quit()'));
my $angle = LCDRange("ANGLE", this, "angle");
$angle->setRange(5, 70);
@ -32,26 +32,26 @@ sub NEW {
cannonField = CannonField(this, "cannonField");
cannonField->connect($angle, TQT_SIGNAL('valueChanged(int)'), TQT_SLOT('setAngle(int)'));
$angle->connect(cannonField, TQT_SIGNAL('angleChanged(int)'), TQT_SLOT('setValue(int)'));
cannonField->connect($angle, TQ_SIGNAL('valueChanged(int)'), TQ_SLOT('setAngle(int)'));
$angle->connect(cannonField, TQ_SIGNAL('angleChanged(int)'), TQ_SLOT('setValue(int)'));
cannonField->connect($force, TQT_SIGNAL('valueChanged(int)'), TQT_SLOT('setForce(int)'));
$force->connect(cannonField, TQT_SIGNAL('forceChanged(int)'), TQT_SLOT('setValue(int)'));
cannonField->connect($force, TQ_SIGNAL('valueChanged(int)'), TQ_SLOT('setForce(int)'));
$force->connect(cannonField, TQ_SIGNAL('forceChanged(int)'), TQ_SLOT('setValue(int)'));
this->connect(cannonField, TQT_SIGNAL('hit()'), TQT_SLOT('hit()'));
this->connect(cannonField, TQT_SIGNAL('missed()'), TQT_SLOT('missed()'));
this->connect(cannonField, TQ_SIGNAL('hit()'), TQ_SLOT('hit()'));
this->connect(cannonField, TQ_SIGNAL('missed()'), TQ_SLOT('missed()'));
my $shoot = TQt::PushButton('&Shoot', this, "shoot");
$shoot->setFont(TQt::Font("Times", 18, &TQt::Font::Bold));
this->connect($shoot, TQT_SIGNAL('clicked()'), TQT_SLOT('fire()'));
this->connect($shoot, TQ_SIGNAL('clicked()'), TQ_SLOT('fire()'));
$shoot->connect(cannonField, TQT_SIGNAL('canShoot(bool)'), TQT_SLOT('setEnabled(bool)'));
$shoot->connect(cannonField, TQ_SIGNAL('canShoot(bool)'), TQ_SLOT('setEnabled(bool)'));
my $restart = TQt::PushButton('&New Game', this, "newgame");
$restart->setFont(TQt::Font("Times", 18, &TQt::Font::Bold));
this->connect($restart, TQT_SIGNAL('clicked()'), TQT_SLOT('newGame()'));
this->connect($restart, TQ_SIGNAL('clicked()'), TQ_SLOT('newGame()'));
hits = TQt::LCDNumber(2, this, "hits");
shotsLeft = TQt::LCDNumber(2, this, "shotsleft");

@ -34,8 +34,8 @@ sub init {
label = TQt::Label(" ", this, "label");
label->setAlignment(&AlignCenter);
$lcd->connect(slider, TQT_SIGNAL('valueChanged(int)'), TQT_SLOT('display(int)'));
this->connect(slider, TQT_SIGNAL('valueChanged(int)'), TQT_SIGNAL('valueChanged(int)'));
$lcd->connect(slider, TQ_SIGNAL('valueChanged(int)'), TQ_SLOT('display(int)'));
this->connect(slider, TQ_SIGNAL('valueChanged(int)'), TQ_SIGNAL('valueChanged(int)'));
setFocusProxy(slider);

@ -43,7 +43,7 @@ sub NEW {
f = 0;
timerCount = 0;
autoShootTimer = TQt::Timer(this, "movement handler");
this->connect(autoShootTimer, TQT_SIGNAL('timeout()'), TQT_SLOT('moveShot()'));
this->connect(autoShootTimer, TQ_SIGNAL('timeout()'), TQ_SLOT('moveShot()'));
shoot_ang = 0;
shoot_f = 0;
target = TQt::Point(0, 0);

@ -22,7 +22,7 @@ sub NEW {
my $quit = TQt::PushButton("&Quit", this, "quit");
$quit->setFont(TQt::Font("Times", 18, &TQt::Font::Bold));
TQt::app->connect($quit, TQT_SIGNAL('clicked()'), TQT_SLOT('quit()'));
TQt::app->connect($quit, TQ_SIGNAL('clicked()'), TQ_SLOT('quit()'));
my $angle = LCDRange("ANGLE", this, "angle");
$angle->setRange(5, 70);
@ -35,26 +35,26 @@ sub NEW {
cannonField = CannonField($box, "cannonField");
cannonField->connect($angle, TQT_SIGNAL('valueChanged(int)'), TQT_SLOT('setAngle(int)'));
$angle->connect(cannonField, TQT_SIGNAL('angleChanged(int)'), TQT_SLOT('setValue(int)'));
cannonField->connect($angle, TQ_SIGNAL('valueChanged(int)'), TQ_SLOT('setAngle(int)'));
$angle->connect(cannonField, TQ_SIGNAL('angleChanged(int)'), TQ_SLOT('setValue(int)'));
cannonField->connect($force, TQT_SIGNAL('valueChanged(int)'), TQT_SLOT('setForce(int)'));
$force->connect(cannonField, TQT_SIGNAL('forceChanged(int)'), TQT_SLOT('setValue(int)'));
cannonField->connect($force, TQ_SIGNAL('valueChanged(int)'), TQ_SLOT('setForce(int)'));
$force->connect(cannonField, TQ_SIGNAL('forceChanged(int)'), TQ_SLOT('setValue(int)'));
this->connect(cannonField, TQT_SIGNAL('hit()'), TQT_SLOT('hit()'));
this->connect(cannonField, TQT_SIGNAL('missed()'), TQT_SLOT('missed()'));
this->connect(cannonField, TQ_SIGNAL('hit()'), TQ_SLOT('hit()'));
this->connect(cannonField, TQ_SIGNAL('missed()'), TQ_SLOT('missed()'));
my $shoot = TQt::PushButton('&Shoot', this, "shoot");
$shoot->setFont(TQt::Font("Times", 18, &TQt::Font::Bold));
this->connect($shoot, TQT_SIGNAL('clicked()'), TQT_SLOT('fire()'));
this->connect($shoot, TQ_SIGNAL('clicked()'), TQ_SLOT('fire()'));
$shoot->connect(cannonField, TQT_SIGNAL('canShoot(bool)'), TQT_SLOT('setEnabled(bool)'));
$shoot->connect(cannonField, TQ_SIGNAL('canShoot(bool)'), TQ_SLOT('setEnabled(bool)'));
my $restart = TQt::PushButton('&New Game', this, "newgame");
$restart->setFont(TQt::Font("Times", 18, &TQt::Font::Bold));
this->connect($restart, TQT_SIGNAL('clicked()'), TQT_SLOT('newGame()'));
this->connect($restart, TQ_SIGNAL('clicked()'), TQ_SLOT('newGame()'));
hits = TQt::LCDNumber(2, this, "hits");
shotsLeft = TQt::LCDNumber(2, this, "shotsleft");
@ -63,11 +63,11 @@ sub NEW {
my $accel = TQt::Accel(this);
$accel->connectItem($accel->insertItem(TQt::KeySequence(int &Key_Enter)),
this, TQT_SLOT('fire()'));
this, TQ_SLOT('fire()'));
$accel->connectItem($accel->insertItem(TQt::KeySequence(int &Key_Return)),
this, TQT_SLOT('fire()'));
this, TQ_SLOT('fire()'));
$accel->connectItem($accel->insertItem(TQt::KeySequence(int &CTRL+&Key_Q)),
TQt::app, TQT_SLOT('quit()'));
TQt::app, TQ_SLOT('quit()'));
my $grid = TQt::GridLayout(this, 2, 2, 10);
$grid->addWidget($quit, 0, 0);

@ -34,8 +34,8 @@ sub init {
label = TQt::Label(" ", this, "label");
label->setAlignment(&AlignCenter);
$lcd->connect(slider, TQT_SIGNAL('valueChanged(int)'), TQT_SLOT('display(int)'));
this->connect(slider, TQT_SIGNAL('valueChanged(int)'), TQT_SIGNAL('valueChanged(int)'));
$lcd->connect(slider, TQ_SIGNAL('valueChanged(int)'), TQ_SLOT('display(int)'));
this->connect(slider, TQ_SIGNAL('valueChanged(int)'), TQ_SIGNAL('valueChanged(int)'));
setFocusProxy(slider);

@ -9,7 +9,7 @@ my $quit = TQt::PushButton("Quit", undef);
$quit->resize(75, 30);
$quit->setFont(TQt::Font("Times", 18, &TQt::Font::Bold));
$a->connect($quit, TQT_SIGNAL('clicked()'), TQT_SLOT('quit()'));
$a->connect($quit, TQ_SIGNAL('clicked()'), TQ_SLOT('quit()'));
$a->setMainWidget($quit);
$quit->show;

@ -11,7 +11,7 @@ $box->resize(200, 120);
my $quit = TQt::PushButton("Quit", $box);
$quit->setFont(TQt::Font("Times", 18, &TQt::Font::Bold));
$a->connect($quit, TQT_SIGNAL('clicked()'), TQT_SLOT('quit()'));
$a->connect($quit, TQ_SIGNAL('clicked()'), TQ_SLOT('quit()'));
$a->setMainWidget($box);
$box->show;

@ -16,7 +16,7 @@ sub NEW {
$quit->setGeometry(62, 40, 75, 30);
$quit->setFont(TQt::Font("Times", 18, &TQt::Font::Bold));
TQt::app->connect($quit, TQT_SIGNAL('clicked()'), TQT_SLOT('quit()'));
TQt::app->connect($quit, TQ_SIGNAL('clicked()'), TQ_SLOT('quit()'));
}
package main;

@ -12,7 +12,7 @@ sub NEW {
my $quit = TQt::PushButton("Quit", this, "quit");
$quit->setFont(TQt::Font("Times", 18, &TQt::Font::Bold));
TQt::app->connect($quit, TQT_SIGNAL('clicked()'), TQT_SLOT('quit()'));
TQt::app->connect($quit, TQ_SIGNAL('clicked()'), TQ_SLOT('quit()'));
my $lcd = TQt::LCDNumber(2, this, "lcd");
@ -20,7 +20,7 @@ sub NEW {
$slider->setRange(0, 99);
$slider->setValue(0);
$lcd->connect($slider, TQT_SIGNAL('valueChanged(int)'), TQT_SLOT('display(int)'));
$lcd->connect($slider, TQ_SIGNAL('valueChanged(int)'), TQ_SLOT('display(int)'));
}
package main;

@ -13,7 +13,7 @@ sub NEW {
my $slider = TQt::Slider(&Horizontal, this, "slider");
$slider->setRange(0, 99);
$slider->setValue(0);
$lcd->connect($slider, TQT_SIGNAL('valueChanged(int)'), TQT_SLOT('display(int)'));
$lcd->connect($slider, TQ_SIGNAL('valueChanged(int)'), TQ_SLOT('display(int)'));
}
package MyWidget;
@ -27,7 +27,7 @@ sub NEW {
my $quit = TQt::PushButton("Quit", this, "quit");
$quit->setFont(TQt::Font("Times", 18, &TQt::Font::Bold));
TQt::app->connect($quit, TQT_SIGNAL('clicked()'), TQT_SLOT('quit()'));
TQt::app->connect($quit, TQ_SIGNAL('clicked()'), TQ_SLOT('quit()'));
my $grid = TQt::Grid(4, this);

@ -15,8 +15,8 @@ sub NEW {
slider = $slider;
slider->setRange(0, 99);
slider->setValue(0);
$lcd->connect(slider, TQT_SIGNAL('valueChanged(int)'), TQT_SLOT('display(int)'));
this->connect(slider, TQT_SIGNAL('valueChanged(int)'), TQT_SIGNAL('valueChanged(int)'));
$lcd->connect(slider, TQ_SIGNAL('valueChanged(int)'), TQ_SLOT('display(int)'));
this->connect(slider, TQ_SIGNAL('valueChanged(int)'), TQ_SIGNAL('valueChanged(int)'));
}
sub value { slider->value }

@ -14,7 +14,7 @@ sub NEW {
my $quit = TQt::PushButton("Quit", this, "quit");
$quit->setFont(TQt::Font("Times", 18, &TQt::Font::Bold));
TQt::app->connect($quit, TQT_SIGNAL('clicked()'), TQT_SLOT('quit()'));
TQt::app->connect($quit, TQ_SIGNAL('clicked()'), TQ_SLOT('quit()'));
my $grid = TQt::Grid(4, this);
@ -23,8 +23,8 @@ sub NEW {
for my $c (0..3) {
my $lr = LCDRange($grid);
$previous->connect(
$lr, TQT_SIGNAL('valueChanged(int)'),
TQT_SLOT('setValue(int)')) if $previous;
$lr, TQ_SIGNAL('valueChanged(int)'),
TQ_SLOT('setValue(int)')) if $previous;
$previous = $lr;
}
}

@ -19,8 +19,8 @@ sub NEW {
slider = TQt::Slider(&Horizontal, this, "slider");
slider->setRange(0, 99);
slider->setValue(0);
$lcd->connect(slider, TQT_SIGNAL('valueChanged(int)'), TQT_SLOT('display(int)'));
this->connect(slider, TQT_SIGNAL('valueChanged(int)'), TQT_SIGNAL('valueChanged(int)'));
$lcd->connect(slider, TQ_SIGNAL('valueChanged(int)'), TQ_SLOT('display(int)'));
this->connect(slider, TQ_SIGNAL('valueChanged(int)'), TQ_SIGNAL('valueChanged(int)'));
setFocusProxy(slider);
}

@ -16,15 +16,15 @@ sub NEW {
my $quit = TQt::PushButton("Quit", this, "quit");
$quit->setFont(TQt::Font("Times", 18, &TQt::Font::Bold));
TQt::app->connect($quit, TQT_SIGNAL('clicked()'), TQT_SLOT('quit()'));
TQt::app->connect($quit, TQ_SIGNAL('clicked()'), TQ_SLOT('quit()'));
my $angle = LCDRange(this, "angle");
$angle->setRange(5, 70);
my $cannonField = CannonField(this, "cannonField");
$cannonField->connect($angle, TQT_SIGNAL('valueChanged(int)'), TQT_SLOT('setAngle(int)'));
$angle->connect($cannonField, TQT_SIGNAL('angleChanged(int)'), TQT_SLOT('setValue(int)'));
$cannonField->connect($angle, TQ_SIGNAL('valueChanged(int)'), TQ_SLOT('setAngle(int)'));
$angle->connect($cannonField, TQ_SIGNAL('angleChanged(int)'), TQ_SLOT('setValue(int)'));
my $grid = TQt::GridLayout(this, 2, 2, 10);
$grid->addWidget($quit, 0, 0);

@ -19,8 +19,8 @@ sub NEW {
slider = TQt::Slider(&Horizontal, this, "slider");
slider->setRange(0, 99);
slider->setValue(0);
$lcd->connect(slider, TQT_SIGNAL('valueChanged(int)'), TQT_SLOT('display(int)'));
this->connect(slider, TQT_SIGNAL('valueChanged(int)'), TQT_SIGNAL('valueChanged(int)'));
$lcd->connect(slider, TQ_SIGNAL('valueChanged(int)'), TQ_SLOT('display(int)'));
this->connect(slider, TQ_SIGNAL('valueChanged(int)'), TQ_SIGNAL('valueChanged(int)'));
setFocusProxy(slider);
}

@ -16,15 +16,15 @@ sub NEW {
my $quit = TQt::PushButton("&Quit", this, "quit");
$quit->setFont(TQt::Font("Times", 18, &TQt::Font::Bold));
TQt::app->connect($quit, TQT_SIGNAL('clicked()'), TQT_SLOT('quit()'));
TQt::app->connect($quit, TQ_SIGNAL('clicked()'), TQ_SLOT('quit()'));
my $angle = LCDRange(this, "angle");
$angle->setRange(5, 70);
my $cannonField = CannonField(this, "cannonField");
$cannonField->connect($angle, TQT_SIGNAL('valueChanged(int)'), TQT_SLOT('setAngle(int)'));
$angle->connect($cannonField, TQT_SIGNAL('angleChanged(int)'), TQT_SLOT('setValue(int)'));
$cannonField->connect($angle, TQ_SIGNAL('valueChanged(int)'), TQ_SLOT('setAngle(int)'));
$angle->connect($cannonField, TQ_SIGNAL('angleChanged(int)'), TQ_SLOT('setValue(int)'));
my $grid = TQt::GridLayout(this, 2, 2, 10);
$grid->addWidget($quit, 0, 0);

@ -489,12 +489,12 @@ component.
The general syntax of this connection process is either :
TQt::Object::connect( sender, TQT_SIGNAL 'mysignal(arg_type)',
receiver, TQT_SLOT 'myslot(arg_type)');
TQt::Object::connect( sender, TQ_SIGNAL 'mysignal(arg_type)',
receiver, TQ_SLOT 'myslot(arg_type)');
or
myObject->connect( sender, TQT_SIGNAL 'mysignal(arg_type)', TQT_SLOT
myObject->connect( sender, TQ_SIGNAL 'mysignal(arg_type)', TQ_SLOT
'myslot(arg_type)');
This mechanism can be extended at will by the declaration of custom Signals and
@ -523,8 +523,8 @@ B<As an example, lets rewrite again our Button package :>
15: shift->SUPER::NEW(@_[0..2]);
16: itsTime = TQt::Time;
17: itsTime->start;
18: this->connect(this, TQT_SIGNAL 'clicked()', TQT_SLOT 'wasClicked()');
19: this->connect(this, TQT_SIGNAL 'changeIt(int,int)', TQT_SLOT 'change(int,int)');
18: this->connect(this, TQ_SIGNAL 'clicked()', TQ_SLOT 'wasClicked()');
19: this->connect(this, TQ_SIGNAL 'changeIt(int,int)', TQ_SLOT 'change(int,int)');
20: }
21:
22: sub wasClicked
@ -558,7 +558,7 @@ slot with two arguments.
Finally, since PerlTQt-3.008, an alternative syntax can be used to declare Signals and Slots:
sub a_slot : TQT_SLOT(int, TQString)
sub a_slot : TQ_SLOT(int, TQString)
{
$int = shift;
$string = shift;
@ -567,7 +567,7 @@ Finally, since PerlTQt-3.008, an alternative syntax can be used to declare Signa
and
sub a_signal : TQT_SIGNAL(TQString);
sub a_signal : TQ_SIGNAL(TQString);
This syntax is perfectly compatible with the traditional
C<use TQt::signals> and C<use TQt::slots> declarations.

@ -469,10 +469,10 @@ several input <strong>Slots</strong> - and each signal can be connected to an un
of listening slots of the same type, wether they are inside or outside the
component.</p>
<p>The general syntax of this connection process is either :</p>
<p>TQt::Object::connect( sender, TQT_SIGNAL 'mysignal(arg_type)',
receiver, TQT_SLOT 'myslot(arg_type)');</p>
<p>TQt::Object::connect( sender, TQ_SIGNAL 'mysignal(arg_type)',
receiver, TQ_SLOT 'myslot(arg_type)');</p>
<p>or</p>
<p>myObject-&gt;connect( sender, TQT_SIGNAL 'mysignal(arg_type)', TQT_SLOT
<p>myObject-&gt;connect( sender, TQ_SIGNAL 'mysignal(arg_type)', TQ_SLOT
'myslot(arg_type)');</p>
<p>This mechanism can be extended at will by the declaration of custom Signals and
Slots, through the <code>use TQt::signals</code> and <code>use TQt::slots</code> pragma
@ -498,8 +498,8 @@ each declared signal can be raised through the <strong>emit</strong> keyword.</p
15: shift-&gt;SUPER::NEW(@_[0..2]);
16: itsTime = TQt::Time;
17: itsTime-&gt;start;
18: this-&gt;connect(this, TQT_SIGNAL 'clicked()', TQT_SLOT 'wasClicked()');
19: this-&gt;connect(this, TQT_SIGNAL 'changeIt(int,int)', TQT_SLOT 'change(int,int)');
18: this-&gt;connect(this, TQ_SIGNAL 'clicked()', TQ_SLOT 'wasClicked()');
19: this-&gt;connect(this, TQ_SIGNAL 'changeIt(int,int)', TQ_SLOT 'change(int,int)');
20: }
21:
22: sub wasClicked
@ -528,7 +528,7 @@ the <code>changeIt(int,int)</code> signal [l.27], hence triggering the <code>cha
slot with two arguments.</p>
<p>Finally, since PerlTQt-3.008, an alternative syntax can be used to declare Signals and Slots:</p>
<pre>
sub a_slot : TQT_SLOT(int, TQString)
sub a_slot : TQ_SLOT(int, TQString)
{
$int = shift;
$string = shift;
@ -536,7 +536,7 @@ slot with two arguments.</p>
}</pre>
<p>and</p>
<pre>
sub a_signal : TQT_SIGNAL(TQString);</pre>
sub a_signal : TQ_SIGNAL(TQString);</pre>
<p>This syntax is perfectly compatible with the traditional
<code>use TQt::signals</code> and <code>use TQt::slots</code> declarations.</p>
<p>Eventually, it can prove good programming practice to mix both syntaxes, by first declaring

@ -501,13 +501,13 @@ branch
La syntaxe de ce système de connexion est soit:
TQt::Object::connect( envoyeur, TQT_SIGNAL 'mon_signal(types_d_arguments)',
recepteur, TQT_SLOT 'monslot(types_d_arguments)');
TQt::Object::connect( envoyeur, TQ_SIGNAL 'mon_signal(types_d_arguments)',
recepteur, TQ_SLOT 'monslot(types_d_arguments)');
soit:
unObjet->connect( envoyeur, TQT_SIGNAL 'mon_signal(types_d_arguments)',
SLOT 'monslot(types_d_arguments)');
unObjet->connect( envoyeur, TQ_SIGNAL 'mon_signal(types_d_arguments)',
TQ_SLOT 'monslot(types_d_arguments)');
Dans le second cas, le récepteur est omis car c'est l'objet lui-même,
@ -537,8 +537,8 @@ B<R
15: shift->SUPER::NEW(@_[0..2]);
16: itsTime = TQt::Time;
17: itsTime->start;
18: this->connect(this, TQT_SIGNAL 'clicked()', TQT_SLOT 'aEteClicke()');
19: this->connect(this, TQT_SIGNAL 'changeLe(int,int)', TQT_SLOT 'changement(int,int)');
18: this->connect(this, TQ_SIGNAL 'clicked()', TQ_SLOT 'aEteClicke()');
19: this->connect(this, TQ_SIGNAL 'changeLe(int,int)', TQ_SLOT 'changement(int,int)');
20: }
21:
22: sub aEteClicke
@ -573,7 +573,7 @@ appelant de ce fait le slot C<changement(int,int)>, avec deux arguments.
Enfin, il existe une syntaxe alternative introduite dans PerlTQt-3.008 :
sub un_slot : TQT_SLOT(int, TQString)
sub un_slot : TQ_SLOT(int, TQString)
{
$int = shift;
$string = shift;
@ -582,7 +582,7 @@ Enfin, il existe une syntaxe alternative introduite dans PerlTQt-3.008 :
et
sub un_signal : TQT_SIGNAL(TQString);
sub un_signal : TQ_SIGNAL(TQString);
Cette syntaxe est parfaitement compatible avec la déclaration par le biais de
C<use TQt::signals> et C<use TQt::slots>.

@ -476,11 +476,11 @@ magn
d'entrées (slots). La sortie d'un composant peut être potentiellement
branchée à toute entrée d'un composant (y compris lui-même),</p>
<p>La syntaxe de ce système de connexion est soit:</p>
<p>TQt::Object::connect( envoyeur, TQT_SIGNAL 'mon_signal(types_d_arguments)',
recepteur, TQT_SLOT 'monslot(types_d_arguments)');</p>
<p>TQt::Object::connect( envoyeur, TQ_SIGNAL 'mon_signal(types_d_arguments)',
recepteur, TQ_SLOT 'monslot(types_d_arguments)');</p>
<p>soit:</p>
<p>unObjet-&gt;connect( envoyeur, TQT_SIGNAL 'mon_signal(types_d_arguments)',
SLOT 'monslot(types_d_arguments)');</p>
<p>unObjet-&gt;connect( envoyeur, TQ_SIGNAL 'mon_signal(types_d_arguments)',
TQ_SLOT 'monslot(types_d_arguments)');</p>
<p>Dans le second cas, le récepteur est omis car c'est l'objet lui-même,</p>
<p>Ce mécanisme est extensible à volonté par la déclaration de nouveaux Signaux et
Slots par l'usage des pragma <code>use TQt::signals</code> et <code>use TQt::slots</code>
@ -506,8 +506,8 @@ objet. Chaque signal d
15: shift-&gt;SUPER::NEW(@_[0..2]);
16: itsTime = TQt::Time;
17: itsTime-&gt;start;
18: this-&gt;connect(this, TQT_SIGNAL 'clicked()', TQT_SLOT 'aEteClicke()');
19: this-&gt;connect(this, TQT_SIGNAL 'changeLe(int,int)', TQT_SLOT 'changement(int,int)');
18: this-&gt;connect(this, TQ_SIGNAL 'clicked()', TQ_SLOT 'aEteClicke()');
19: this-&gt;connect(this, TQ_SIGNAL 'changeLe(int,int)', TQ_SLOT 'changement(int,int)');
20: }
21:
22: sub aEteClicke
@ -536,7 +536,7 @@ objet. Chaque signal d
appelant de ce fait le slot <code>changement(int,int)</code>, avec deux arguments.</p>
<p>Enfin, il existe une syntaxe alternative introduite dans PerlTQt-3.008 :</p>
<pre>
sub un_slot : TQT_SLOT(int, TQString)
sub un_slot : TQ_SLOT(int, TQString)
{
$int = shift;
$string = shift;
@ -544,7 +544,7 @@ appelant de ce fait le slot <code>changement(int,int)</code>, avec deux argument
}</pre>
<p>et</p>
<pre>
sub un_signal : TQT_SIGNAL(TQString);</pre>
sub un_signal : TQ_SIGNAL(TQString);</pre>
<p>Cette syntaxe est parfaitement compatible avec la déclaration par le biais de
<code>use TQt::signals</code> et <code>use TQt::slots</code>.
Il peut d'ailleurs d'avérer très profitable pour la clarté du programme de déclarer tout d'abord

@ -736,7 +736,7 @@ sub generateMethod($$$)
my $methodCode = "";
my $tagType = ($flags !~ /z/) ? "FUNC" : "SIGNAL";
my $tagType = ($flags !~ /z/) ? "FUNC" : "TQ_SIGNAL";
my $tagAttr = "";
$tagAttr .= " hidden=\"yes\"" if $flags =~ /y/;

@ -536,12 +536,12 @@ EOF
}
/** Prepend a '2' to a signal string and remove any spaces */
public static String SIGNAL(String signal) {
public static String TQ_SIGNAL(String signal) {
return "2" + sqeezeOut(signal, ' ');
}
/** Prepend a '1' to a slot string and remove any spaces */
public static String SLOT(String slot) {
public static String TQ_SLOT(String slot) {
return "1" + sqeezeOut(slot, ' ');
}
@ -5476,8 +5476,8 @@ sub printJavadocComment($$$$)
$line =~ s/const char/String/g;
$line =~ s/const (\w+)\&/$1/g;
$line =~ s/bool/boolean/g;
$line =~ s/SLOT\(\s*([^\)]*)\) ?\)/SLOT("$1)")/g;
$line =~ s/SIGNAL\(\s*([^\)]*)\) ?\)/SIGNAL("$1)")/g;
$line =~ s/TQ_SLOT\(\s*([^\)]*)\) ?\)/TQ_SLOT("$1)")/g;
$line =~ s/TQ_SIGNAL\(\s*([^\)]*)\) ?\)/TQ_SIGNAL("$1)")/g;
$line =~ s/TQ_OBJECT\n//g;
$line =~ s/class\s+([\w]+)\s*:\s*public/public class $1 implements/g;
$line =~ s/public\s*(slots)?:\n/public /g;

@ -331,12 +331,12 @@ EOF
}
/** Prepend a '2' to a signal string and remove any spaces */
public static String SIGNAL(String signal) {
public static String TQ_SIGNAL(String signal) {
return "2" + sqeezeOut(signal, ' ');
}
/** Prepend a '1' to a slot string and remove any spaces */
public static String SLOT(String slot) {
public static String TQ_SLOT(String slot) {
return "1" + sqeezeOut(slot, ' ');
}
@ -3315,8 +3315,8 @@ sub printJavadocComment($$$$)
$line =~ s/const char/String/g;
$line =~ s/const (\w+)\&/$1/g;
$line =~ s/bool/boolean/g;
$line =~ s/SLOT\(\s*([^\)]*)\) ?\)/SLOT("$1)")/g;
$line =~ s/SIGNAL\(\s*([^\)]*)\) ?\)/SIGNAL("$1)")/g;
$line =~ s/TQ_SLOT\(\s*([^\)]*)\) ?\)/TQ_SLOT("$1)")/g;
$line =~ s/TQ_SIGNAL\(\s*([^\)]*)\) ?\)/TQ_SIGNAL("$1)")/g;
$line =~ s/TQ_OBJECT\n//g;
$line =~ s/class\s+([\w]+)\s*:\s*public/public class $1 implements/g;
$line =~ s/public\s*(slots)?:\n/public /g;

@ -386,11 +386,11 @@ EOF
public static TQApplication tqApp = null;
public static string SIGNAL(string signal) {
public static string TQ_SIGNAL(string signal) {
return "2"+ signal;
}
public static string SLOT(string slot) {
public static string TQ_SLOT(string slot) {
return "1" + slot;
}
EOF
@ -3497,8 +3497,8 @@ sub printCSharpdocComment($$$$)
$line =~ s/const char/string/g;
$line =~ s/const (\w+)\&/$1/g;
$line =~ s/bool/bool/g;
$line =~ s/SLOT\(\s*([^\)]*)\) ?\)/SLOT("$1)")/g;
$line =~ s/SIGNAL\(\s*([^\)]*)\) ?\)/SIGNAL("$1)")/g;
$line =~ s/TQ_SLOT\(\s*([^\)]*)\) ?\)/TQ_SLOT("$1)")/g;
$line =~ s/TQ_SIGNAL\(\s*([^\)]*)\) ?\)/TQ_SIGNAL("$1)")/g;
$line =~ s/TQ_OBJECT\n//g;
$line =~ s/public\s*(slots)?:\n/public /g;
$line =~ s/([^0-9"]\s*)\*(\s*[^0-9"-])/$1$2/g;

@ -922,7 +922,7 @@ void Uic::createFormImpl( const TQDomElement &e )
receiver = "this";
out << indent << "TQt::Object::connect(" << sender
<< ", TQT_SIGNAL \"" << signal << "\", "<< receiver << ", TQT_SLOT \"" << slot << "\");" << endl;
<< ", TQ_SIGNAL \"" << signal << "\", "<< receiver << ", TQ_SLOT \"" << slot << "\");" << endl;
}
} else if ( n.tagName() == "tabstops" ) {
// setup tab order
@ -1166,7 +1166,7 @@ void Uic::createFormImpl( const TQDomElement &e )
if ( *it == "init()" || *it == "destroy()" )
continue;
int astart = (*it).find('(');
TQRegExp r( "(\\nsub\\s+" + (*it).left(astart) + "(?:\\s*#\\s*SLOT:[^\\n]+|[ \t]+)?\\n\\{)(\\s*)(\\}\\n)" );
TQRegExp r( "(\\nsub\\s+" + (*it).left(astart) + "(?:\\s*#\\s*TQ_SLOT:[^\\n]+|[ \t]+)?\\n\\{)(\\s*)(\\}\\n)" );
r.setMinimal( true );
uiPmInclude.replace( r, "\\1\n" +
indent + "print \"" + nameOfClass + "->" + (*it) +

Loading…
Cancel
Save