diff options
author | Timothy Pearson <[email protected]> | 2012-02-13 17:43:39 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-02-13 17:43:39 -0600 |
commit | 359640943bcf155faa9a067dde9e00a123276290 (patch) | |
tree | fb3d55ea5e18949042fb0064123fb73d2b1eb932 /doc/html/moc.html | |
parent | a829bcdc533e154000803d517200d32fe762e85c (diff) | |
download | tqt3-359640943bcf155faa9a067dde9e00a123276290.tar.gz tqt3-359640943bcf155faa9a067dde9e00a123276290.zip |
Automated update from Qt3
Diffstat (limited to 'doc/html/moc.html')
-rw-r--r-- | doc/html/moc.html | 36 |
1 files changed, 18 insertions, 18 deletions
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; } <p> The Meta Object Compiler, moc among friends, is the program which handles TQt's <a href="metaobjects.html">C++ extensions.</a> <p> The moc reads a C++ source file. If it finds one or more class -declarations that contain the <a href="metaobjects.html#Q_OBJECT">Q_OBJECT</a> macro, it produces another +declarations that contain the <a href="metaobjects.html#TQ_OBJECT">TQ_OBJECT</a> macro, it produces another C++ source file which contains the <a href="metaobjects.html#meta-object">meta object</a> 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. <p> The C++ source file generated by the moc must be compiled and linked @@ -57,7 +57,7 @@ like this: <p> <pre> class MyClass : public <a href="ntqobject.html">TQObject</a> { - Q_OBJECT + TQ_OBJECT public: MyClass( <a href="ntqobject.html">TQObject</a> * parent=0, const char * name=0 ); ~MyClass(); @@ -82,7 +82,7 @@ function <tt>setPriority()</tt>. <p> <pre> class MyClass : public <a href="ntqobject.html">TQObject</a> { - 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: <p> <pre> class MyClass : public <a href="ntqobject.html">TQObject</a> { - 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. <p> </dl> <p> 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. <p> <h2> Automating moc Usage with Makefiles </h2> @@ -157,7 +157,7 @@ recognizes both Method A and B style source files, and generates a Makefile that does all the necessary moc handling. <p> If you want to create your Makefiles yourself, here are some tips on how to include moc handling. -<p> For Q_OBJECT class declarations in header files, here is a useful +<p> For TQ_OBJECT class declarations in header files, here is a useful makefile rule if you only use GNU make: <p> <pre> moc_%.cpp: %.h @@ -177,7 +177,7 @@ following form: <p> (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.) -<p> For Q_OBJECT class declarations in implementation (.cpp) files, we +<p> For TQ_OBJECT class declarations in implementation (.cpp) files, we suggest a makefile rule like this: <p> <pre> NAME.o: NAME.moc @@ -240,7 +240,7 @@ MOC_SKIP_END. <p> <h2> Diagnostics </h2> <a name="4"></a><p> 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. <p> 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: <p> <pre> class SomeTemplate<int> : public <a href="ntqframe.html">TQFrame</a> { - 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: <p> <pre> class SomeClass : public <a href="ntqobject.html">TQObject</a> { - 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 <a href="ntqobject.html">TQObject</a> { - 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: <p> <pre> class SomeClass : public <a href="ntqobject.html">TQObject</a> { - Q_OBJECT + TQ_OBJECT ... signals: friend class ClassTemplate<char>; // WRONG @@ -371,7 +371,7 @@ signals or slots <a name="5-6"></a><p> Here's an example: <p> <pre> 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: <p> <pre> class SomeClass : public <a href="ntqobject.html">TQObject</a> { - Q_OBJECT + TQ_OBJECT public slots: SomeClass( <a href="ntqobject.html">TQObject</a> *parent, const char *name ) : <a href="ntqobject.html">TQObject</a>( parent, name ) { } // WRONG @@ -413,7 +413,7 @@ find the functions nor resolve the type. Here is an example of the illegal syntax: <p> <pre> class SomeClass : public <a href="ntqobject.html">TQObject</a> { - Q_OBJECT + TQ_OBJECT public: ... Q_PROPERTY( Priority priority READ priority WRITE setPriority ) // WRONG @@ -426,10 +426,10 @@ illegal syntax: </pre> <p> 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: <p> <pre> class SomeClass : public <a href="ntqobject.html">TQObject</a> { - Q_OBJECT + TQ_OBJECT Q_PROPERTY( Priority priority READ priority WRITE setPriority ) Q_ENUMS( Priority ) public: |