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/moc.doc | |
parent | a829bcdc533e154000803d517200d32fe762e85c (diff) | |
download | tqt3-359640943bcf155faa9a067dde9e00a123276290.tar.gz tqt3-359640943bcf155faa9a067dde9e00a123276290.zip |
Automated update from Qt3
Diffstat (limited to 'doc/moc.doc')
-rw-r--r-- | doc/moc.doc | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/doc/moc.doc b/doc/moc.doc index f017a66ef..53f36f28d 100644 --- a/doc/moc.doc +++ b/doc/moc.doc @@ -50,9 +50,9 @@ The Meta Object Compiler, moc among friends, is the program which handles Qt's \link metaobjects.html C++ extensions.\endlink 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. @@ -74,7 +74,7 @@ like this: \code class MyClass : public QObject { - Q_OBJECT + TQ_OBJECT public: MyClass( QObject * parent=0, const char * name=0 ); ~MyClass(); @@ -100,7 +100,7 @@ function \c setPriority(). \code class MyClass : public QObject { - Q_OBJECT + TQ_OBJECT Q_PROPERTY( Priority priority READ priority WRITE setPriority ) Q_ENUMS( Priority ) public: @@ -121,7 +121,7 @@ attach additional name/value-pairs to the class' meta object: \code class MyClass : public QObject { - Q_OBJECT + TQ_OBJECT Q_CLASSINFO( "Author", "Oscar Peterson") Q_CLASSINFO( "Status", "Active") public: @@ -171,7 +171,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. @@ -190,7 +190,7 @@ 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: \code @@ -214,7 +214,7 @@ You must also remember to add \e moc_NAME.cpp to your SOURCES 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: \code @@ -286,7 +286,7 @@ MOC_SKIP_END. \section1 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 @@ -306,7 +306,7 @@ templates cannot have signals or slots. Here is an example: \code class SomeTemplate<int> : public QFrame { - Q_OBJECT + TQ_OBJECT ... signals: void bugInMocDetected( int ); @@ -341,7 +341,7 @@ Here is an example of illegal syntax: \code class SomeClass : public QObject { - Q_OBJECT + TQ_OBJECT ... public slots: // illegal @@ -354,7 +354,7 @@ You can work around this restriction like this: typedef void (*ApplyFunctionType)( List *, void * ); class SomeClass : public QObject { - Q_OBJECT + TQ_OBJECT ... public slots: void apply( ApplyFunctionType, char * ); @@ -373,7 +373,7 @@ illegal syntax: \code class SomeClass : public QObject { - Q_OBJECT + TQ_OBJECT ... signals: friend class ClassTemplate<char>; // WRONG @@ -437,7 +437,7 @@ Here's an example: \code class A { - Q_OBJECT + TQ_OBJECT public: class B { public slots: // WRONG @@ -462,7 +462,7 @@ of the illegal syntax: \code class SomeClass : public QObject { - Q_OBJECT + TQ_OBJECT public slots: SomeClass( QObject *parent, const char *name ) : QObject( parent, name ) { } // WRONG @@ -481,7 +481,7 @@ illegal syntax: \code class SomeClass : public QObject { - Q_OBJECT + TQ_OBJECT public: ... Q_PROPERTY( Priority priority READ priority WRITE setPriority ) // WRONG @@ -494,11 +494,11 @@ illegal syntax: \endcode 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: \code class SomeClass : public QObject { - Q_OBJECT + TQ_OBJECT Q_PROPERTY( Priority priority READ priority WRITE setPriority ) Q_ENUMS( Priority ) public: |