diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-01-10 10:12:24 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-01-10 10:12:24 +0900 |
commit | 301b5380792b7a368488aa485d3bdb3df81e0808 (patch) | |
tree | 02f29183ad7d160b896f76ba08c916e3c97f6226 /PerlTQt/examples | |
parent | 6c02673b584fd4fbd4761057a5b466bca26036bd (diff) | |
download | libtqt-perl-301b5380792b7a368488aa485d3bdb3df81e0808.tar.gz libtqt-perl-301b5380792b7a368488aa485d3bdb3df81e0808.zip |
Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'PerlTQt/examples')
-rw-r--r-- | PerlTQt/examples/aclock/AnalogClock.pm | 2 | ||||
-rw-r--r-- | PerlTQt/examples/buttongroups/ButtonsGroups.pm | 6 | ||||
-rw-r--r-- | PerlTQt/examples/drawdemo/drawdemo.pl | 4 | ||||
-rw-r--r-- | PerlTQt/examples/forever/forever.pl | 2 | ||||
-rw-r--r-- | PerlTQt/examples/network/httpd/httpd.pl | 12 | ||||
-rw-r--r-- | PerlTQt/examples/opengl/box/glbox | 8 | ||||
-rw-r--r-- | PerlTQt/examples/progress/progress.pl | 16 | ||||
-rw-r--r-- | PerlTQt/examples/richedit/richedit.pl | 42 |
8 files changed, 46 insertions, 46 deletions
diff --git a/PerlTQt/examples/aclock/AnalogClock.pm b/PerlTQt/examples/aclock/AnalogClock.pm index 0a52c44..c6471ad 100644 --- a/PerlTQt/examples/aclock/AnalogClock.pm +++ b/PerlTQt/examples/aclock/AnalogClock.pm @@ -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 } diff --git a/PerlTQt/examples/buttongroups/ButtonsGroups.pm b/PerlTQt/examples/buttongroups/ButtonsGroups.pm index 106cf1b..b842ab2 100644 --- a/PerlTQt/examples/buttongroups/ButtonsGroups.pm +++ b/PerlTQt/examples/buttongroups/ButtonsGroups.pm @@ -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 # diff --git a/PerlTQt/examples/drawdemo/drawdemo.pl b/PerlTQt/examples/drawdemo/drawdemo.pl index f119a94..cc4112b 100644 --- a/PerlTQt/examples/drawdemo/drawdemo.pl +++ b/PerlTQt/examples/drawdemo/drawdemo.pl @@ -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); diff --git a/PerlTQt/examples/forever/forever.pl b/PerlTQt/examples/forever/forever.pl index e388e44..0adba3d 100644 --- a/PerlTQt/examples/forever/forever.pl +++ b/PerlTQt/examples/forever/forever.pl @@ -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); } diff --git a/PerlTQt/examples/network/httpd/httpd.pl b/PerlTQt/examples/network/httpd/httpd.pl index a9aa0fd..dee279b 100644 --- a/PerlTQt/examples/network/httpd/httpd.pl +++ b/PerlTQt/examples/network/httpd/httpd.pl @@ -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 diff --git a/PerlTQt/examples/opengl/box/glbox b/PerlTQt/examples/opengl/box/glbox index fed74a3..de7894d 100644 --- a/PerlTQt/examples/opengl/box/glbox +++ b/PerlTQt/examples/opengl/box/glbox @@ -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 diff --git a/PerlTQt/examples/progress/progress.pl b/PerlTQt/examples/progress/progress.pl index 4112e64..bec202c 100644 --- a/PerlTQt/examples/progress/progress.pl +++ b/PerlTQt/examples/progress/progress.pl @@ -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; diff --git a/PerlTQt/examples/richedit/richedit.pl b/PerlTQt/examples/richedit/richedit.pl index 3d459f7..5ee90e0 100644 --- a/PerlTQt/examples/richedit/richedit.pl +++ b/PerlTQt/examples/richedit/richedit.pl @@ -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; |