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/moc.html | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'doc/html/moc.html') diff --git a/doc/html/moc.html b/doc/html/moc.html index bbc07e574..ba6c33df7 100644 --- a/doc/html/moc.html +++ b/doc/html/moc.html @@ -37,9 +37,9 @@ body { background: #ffffff; color: black; }

The Meta Object Compiler, moc among friends, is the program which handles TQt's C++ extensions.

The moc reads a C++ source file. If it finds one or more class -declarations that contain the Q_OBJECT macro, it produces another +declarations that contain the TQ_OBJECT macro, it produces another C++ source file which contains the meta object code for the classes -that use the Q_OBJECT macro. Among other things, meta object code is +that use the TQ_OBJECT macro. Among other things, meta object code is required for the signal/slot mechanism, runtime type information and the dynamic property system.

The C++ source file generated by the moc must be compiled and linked @@ -57,7 +57,7 @@ like this:

     class MyClass : public TQObject
     {
-        Q_OBJECT
+        TQ_OBJECT
     public:
         MyClass( TQObject * parent=0, const char * name=0 );
         ~MyClass();
@@ -82,7 +82,7 @@ function setPriority().
 

     class MyClass : public TQObject
     {
-        Q_OBJECT
+        TQ_OBJECT
         Q_PROPERTY( Priority priority READ priority WRITE setPriority )
         Q_ENUMS( Priority )
     public:
@@ -102,7 +102,7 @@ attach additional name/value-pairs to the class' meta object:
 

     class MyClass : public TQObject
     {
-        Q_OBJECT
+        TQ_OBJECT
         Q_CLASSINFO( "Author", "Oscar Peterson")
         Q_CLASSINFO( "Status", "Active")
     public:
@@ -144,7 +144,7 @@ it is not necessary to compile and link it separately, as in Method A.
 

Method A is the normal method. Method B can be used in cases where you want the implementation file to be self-contained, or in cases where -the Q_OBJECT class is implementation-internal and thus should not be +the TQ_OBJECT class is implementation-internal and thus should not be visible in the header file.

Automating moc Usage with Makefiles

@@ -157,7 +157,7 @@ recognizes both Method A and B style source files, and generates a Makefile that does all the necessary moc handling.

If you want to create your Makefiles yourself, here are some tips on how to include moc handling. -

For Q_OBJECT class declarations in header files, here is a useful +

For TQ_OBJECT class declarations in header files, here is a useful makefile rule if you only use GNU make:

     moc_%.cpp: %.h
@@ -177,7 +177,7 @@ following form:
 

(While we prefer to name our C++ source files .cpp, the moc doesn't care, so you can use .C, .cc, .CC, .cxx or even .c++ if you prefer.) -

For Q_OBJECT class declarations in implementation (.cpp) files, we +

For TQ_OBJECT class declarations in implementation (.cpp) files, we suggest a makefile rule like this:

     NAME.o: NAME.moc
@@ -240,7 +240,7 @@ MOC_SKIP_END.
 

Diagnostics

The moc will warn you about a number of dangerous or illegal -constructs in the Q_OBJECT class declarations. +constructs in the TQ_OBJECT class declarations.

If you get linkage errors in the final building phase of your program, saying that YourClass::className() is undefined or that YourClass lacks a vtbl, something has been done wrong. Most often, @@ -255,7 +255,7 @@ not usually a problem in practice. templates cannot have signals or slots. Here is an example:

     class SomeTemplate<int> : public TQFrame {
-        Q_OBJECT
+        TQ_OBJECT
         ...
     signals:
         void bugInMocDetected( int );
@@ -286,7 +286,7 @@ signal/slot arguments, we think inheritance is a better alternative.
 Here is an example of illegal syntax:
 

     class SomeClass : public TQObject {
-        Q_OBJECT
+        TQ_OBJECT
         ...
     public slots:
         // illegal
@@ -299,7 +299,7 @@ Here is an example of illegal syntax:
     typedef void (*ApplyFunctionType)( List *, void * );
 
     class SomeClass : public TQObject {
-        Q_OBJECT
+        TQ_OBJECT
         ...
     public slots:
         void apply( ApplyFunctionType, char * );
@@ -316,7 +316,7 @@ protected or public sections instead.  Here is an example of the
 illegal syntax:
 

     class SomeClass : public TQObject {
-        Q_OBJECT
+        TQ_OBJECT
         ...
     signals:
         friend class ClassTemplate<char>; // WRONG
@@ -371,7 +371,7 @@ signals or slots
 

Here's an example:

     class A {
-        Q_OBJECT
+        TQ_OBJECT
     public:
         class B {
         public slots:   // WRONG
@@ -395,7 +395,7 @@ protected or public sections, where they belong.  Here is an example
 of the illegal syntax:
 

     class SomeClass : public TQObject {
-        Q_OBJECT
+        TQ_OBJECT
     public slots:
         SomeClass( TQObject *parent, const char *name )
             : TQObject( parent, name ) { } // WRONG
@@ -413,7 +413,7 @@ find the functions nor resolve the type. Here is an example of the
 illegal syntax:
 

     class SomeClass : public TQObject {
-        Q_OBJECT
+        TQ_OBJECT
     public:
         ...
         Q_PROPERTY( Priority priority READ priority WRITE setPriority ) // WRONG
@@ -426,10 +426,10 @@ illegal syntax:
 

Work around this limitation by declaring all properties at the -beginning of the class declaration, right after Q_OBJECT: +beginning of the class declaration, right after TQ_OBJECT:

     class SomeClass : public TQObject {
-        Q_OBJECT
+        TQ_OBJECT
         Q_PROPERTY( Priority priority READ priority WRITE setPriority )
         Q_ENUMS( Priority )
     public:
-- 
cgit v1.2.1