Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |

# TQMetaObject Class Reference

The TQMetaObject class contains meta information about TQt objects. More...

`#include <ntqmetaobject.h>`

List of all member functions.

## Public Members

- const char * className () const
- const char * superClassName () const
- TQMetaObject * superClass () const
- bool inherits ( const char * clname ) const
- int numSlots ( bool super = FALSE ) const
- int numSignals ( bool super = FALSE ) const
- TQStrList slotNames ( bool super = FALSE ) const
- TQStrList signalNames ( bool super = FALSE ) const
- int numClassInfo ( bool super = FALSE ) const
- const TQClassInfo * classInfo ( int index, bool super = FALSE ) const
- const char * classInfo ( const char * name, bool super = FALSE ) const
- const TQMetaProperty * property ( int index, bool super = FALSE ) const
- int findProperty ( const char * name, bool super = FALSE ) const
- TQStrList propertyNames ( bool super = FALSE ) const
- int numProperties ( bool super = FALSE ) const

## Detailed Description

The TQMetaObject class contains meta information about TQt objects.

The Meta Object System in TQt is responsible for the signals and slots inter-object communication mechanism, runtime type information and the property system. All meta information in TQt is kept in a single instance of TQMetaObject per class.

This class is not normally required for application programming. But if you write meta applications, such as scripting engines or GUI builders, you might find these functions useful:

- className() to get the name of a class.
- superClassName() to get the name of the superclass.
- inherits(), the function called by TQObject::inherits().
- superClass() to access the superclass's meta object.
- numSlots(), numSignals(), slotNames(), and signalNames() to get information about a class's signals and slots.
- property() and propertyNames() to obtain information about a class's properties.

Classes may have a list of name-value pairs of class information. The number of pairs is returned by numClassInfo(), and values are returned by classInfo().

See also moc (Meta Object Compiler) and Object Model.

## Member Function Documentation

### const TQClassInfo * TQMetaObject::classInfo ( int index, bool super = FALSE ) const

Returns the class information with index index or 0 if no such information exists.

If super is TRUE, inherited class information is included.

### const char * TQMetaObject::classInfo ( const char * name, bool super = FALSE ) const

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Returns the class information with name name or 0 if no such information exists.

If super is TRUE, inherited class information is included.

### const char * TQMetaObject::className () const

Returns the class name.

See also TQObject::className() and superClassName().

### int TQMetaObject::findProperty ( const char * name, bool super = FALSE ) const

Returns the index for the property with name name or -1 if no such property exists.

If super is TRUE, inherited properties are included.

See also property() and propertyNames().

### bool TQMetaObject::inherits ( const char * clname ) const

Returns TRUE if this class inherits clname within the meta object inheritance chain; otherwise returns FALSE.

(A class is considered to inherit itself.)

### int TQMetaObject::numClassInfo ( bool super = FALSE ) const

Returns the number of items of class information available for this class.

If super is TRUE, inherited class information is included.

### int TQMetaObject::numProperties ( bool super = FALSE ) const

Returns the number of properties for this class.

If super is TRUE, inherited properties are included.

See also propertyNames().

### int TQMetaObject::numSignals ( bool super = FALSE ) const

Returns the number of signals for this class.

If super is TRUE, inherited signals are included.

See also signalNames().

### int TQMetaObject::numSlots ( bool super = FALSE ) const

Returns the number of slots for this class.

If super is TRUE, inherited slots are included.

See also slotNames().

### const TQMetaProperty * TQMetaObject::property ( int index, bool super = FALSE ) const

Returns the property meta data for the property at index index or 0 if no such property exists.

If super is TRUE, inherited properties are included.

See also propertyNames().

### TQStrList TQMetaObject::propertyNames ( bool super = FALSE ) const

Returns a list with the names of all this class's properties.

If super is TRUE, inherited properties are included.

See also property().

### TQStrList TQMetaObject::signalNames ( bool super = FALSE ) const

Returns a list with the names of all this class's signals.

If super is TRUE, inherited signals are included.

### TQStrList TQMetaObject::slotNames ( bool super = FALSE ) const

Returns a list with the names of all this class's slots.

If super is TRUE, inherited slots are included.

See also numSlots().

### TQMetaObject * TQMetaObject::superClass () const

Returns the meta object of the super class or 0 if there is no such object.

### const char * TQMetaObject::superClassName () const

Returns the class name of the superclass or 0 if there is no superclass in the TQObject hierachy.

See also className().

This file is part of the TQt toolkit. Copyright © 1995-2007 Trolltech. All Rights Reserved.