From fb401a891f1b426e9419c0cb16403df407138611 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 27 Dec 2023 19:25:43 +0900 Subject: Rename METHOD, SIGNAL, SLOT to TQ_METHOD, TQ_SIGNAL, TQ_SLOT Signed-off-by: Michele Calgaro --- doc/html/ntqobject.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'doc/html/ntqobject.html') diff --git a/doc/html/ntqobject.html b/doc/html/ntqobject.html index 06ecf97e6..e1233374a 100644 --- a/doc/html/ntqobject.html +++ b/doc/html/ntqobject.html @@ -279,21 +279,21 @@ definition lacks the TQ_OBJECT macro. Connects signal from the sender object to member in object receiver, and returns TRUE if the connection succeeds; otherwise returns FALSE. -

You must use the SIGNAL() and SLOT() macros when specifying the signal +

You must use the TQ_SIGNAL() and TQ_SLOT() macros when specifying the signal and the member, for example:

     TQLabel     *label  = new TQLabel;
     TQScrollBar *scroll = new TQScrollBar;
-    TQObject::connect( scroll, SIGNAL(valueChanged(int)),
-                      label,  SLOT(setNum(int)) );
+    TQObject::connect( scroll, TQ_SIGNAL(valueChanged(int)),
+                      label,  TQ_SLOT(setNum(int)) );
     

This example ensures that the label always displays the current scroll bar value. Note that the signal and slots parameters must not contain any variable names, only the type. E.g. the following would not work and return FALSE: -TQObject::connect( scroll, SIGNAL(valueChanged(int v)), -label, SLOT(setNum(int v)) ); +TQObject::connect( scroll, TQ_SIGNAL(valueChanged(int v)), +label, TQ_SLOT(setNum(int v)) );

A signal can also be connected to another signal:

     class MyWidget : public TQWidget
@@ -312,7 +312,7 @@ label,  SLOT(setNum(int v)) );
     MyWidget::MyWidget()
     {
         aButton = new TQPushButton( this );
-        connect( aButton, SIGNAL(clicked()), SIGNAL(myUsefulSignal()) );
+        connect( aButton, TQ_SIGNAL(clicked()), TQ_SIGNAL(myUsefulSignal()) );
     }
     
@@ -408,12 +408,12 @@ equivalent to the non-static overloaded function
  • Disconnect everything connected to a specific signal:
    -       disconnect( myObject, SIGNAL(mySignal()), 0, 0 );
    +       disconnect( myObject, TQ_SIGNAL(mySignal()), 0, 0 );
            
    equivalent to the non-static overloaded function
    -       myObject->disconnect( SIGNAL(mySignal()) );
    +       myObject->disconnect( TQ_SIGNAL(mySignal()) );
            
  • Disconnect a specific receiver: -- cgit v1.2.1