From 359640943bcf155faa9a067dde9e00a123276290 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 13 Feb 2012 17:43:39 -0600 Subject: Automated update from Qt3 --- doc/html/linguist-manual-4.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'doc/html/linguist-manual-4.html') diff --git a/doc/html/linguist-manual-4.html b/doc/html/linguist-manual-4.html index 7407656bb..97645ddf5 100644 --- a/doc/html/linguist-manual-4.html +++ b/doc/html/linguist-manual-4.html @@ -83,7 +83,7 @@ body { background: #ffffff; color: black; }
     button = new TQPushButton( tr("&Quit"), this);
 
-

All TQObject subclasses that use the Q_OBJECT macro implement the tr() function.

+

All TQObject subclasses that use the TQ_OBJECT macro implement the tr() function.

Although the tr() call is normally made directly since it is usually called as a member function of a TQObject subclass, in other cases an explicit class name can be supplied, for example:

     TQPushButton::tr("&Quit")
@@ -315,7 +315,7 @@ TRANSLATIONS    = tt2_fr.ts \
 

In arrowpad.h we define the ArrowPad subclass which is a subclass of TQWidget. In the Tutorial 2 Screenshot, English version, above, the central widget with the four buttons is an ArrowPad.

    class ArrowPad : public TQGrid
 
-

When lupdate is run it not only extracts the source texts but it also groups them into contexts. A context is the name of the class in which the source text appears. Thus, in this example, "ArrowPad" is a context: it is the context of the texts in the ArrowPad class. The Q_OBJECT macro defines tr(x) in ArrowPad like this

+

When lupdate is run it not only extracts the source texts but it also groups them into contexts. A context is the name of the class in which the source text appears. Thus, in this example, "ArrowPad" is a context: it is the context of the texts in the ArrowPad class. The TQ_OBJECT macro defines tr(x) in ArrowPad like this

     qApp->translate( "ArrowPad", x )
 
@@ -327,11 +327,11 @@ TRANSLATIONS = tt2_fr.ts \

Tutorial 2 Screenshot, English version

-
    class MainWindow : public TQMainWindow
+
    class MainWindow : public TQMainWindow
     {
-        Q_OBJECT
+        TQ_OBJECT
 
-

In the Tutorial 2 Screenshot, English version, above, the whole window is a MainWindow. This is defined in the mainwindow.h header file. Here too, we use Q_OBJECT, so that MainWindow will become a context in TQt Linguist.

+

In the Tutorial 2 Screenshot, English version, above, the whole window is a MainWindow. This is defined in the mainwindow.h header file. Here too, we use TQ_OBJECT, so that MainWindow will become a context in TQt Linguist.

In the implementation of MainWindow, mainwindow.cpp, we create an instance of our ArrowPad class

        ArrowPad *ap = new ArrowPad( this, "arrow pad" );
 
@@ -426,9 +426,9 @@ TRANSLATIONS = tt3_pt.ts

The PrintPanel is defined in printpanel.h.

    class PrintPanel : public TQVBox
     {
-        Q_OBJECT
+        TQ_OBJECT
 
-

PrintPanel is a TQWidget. It needs the Q_OBJECT macro for tr() to work properly.

+

PrintPanel is a TQWidget. It needs the TQ_OBJECT macro for tr() to work properly.

The implementation file is printpanel.cpp.

    /*
         TQLabel *lab = new TQLabel( tr("<b>TROLL PRINT</b>"), this );
-- 
cgit v1.2.1