From 301b5380792b7a368488aa485d3bdb3df81e0808 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 10 Jan 2024 10:12:24 +0900 Subject: Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines Signed-off-by: Michele Calgaro --- doc/en/index.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'doc/en/index.html') diff --git a/doc/en/index.html b/doc/en/index.html index e6cfde1..f4f0572 100644 --- a/doc/en/index.html +++ b/doc/en/index.html @@ -469,10 +469,10 @@ several input Slots - and each signal can be connected to an un of listening slots of the same type, wether they are inside or outside the 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 Slots, through the use TQt::signals and use TQt::slots pragma @@ -498,8 +498,8 @@ each declared signal can be raised through the emit keyword.

changeIt(int,int) signal [l.27], hence triggering the cha 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;
@@ -536,7 +536,7 @@ slot with two arguments.

}

and

- sub a_signal : TQT_SIGNAL(TQString);
+ sub a_signal : TQ_SIGNAL(TQString);

This syntax is perfectly compatible with the traditional use TQt::signals and use TQt::slots declarations.

Eventually, it can prove good programming practice to mix both syntaxes, by first declaring -- cgit v1.2.1