| Classes - Annotated - Tree - Functions - Home - Structure

# QMetaObject Class Reference

The QMetaObject class contains meta information about Qt objects. More...

`#include <qmetaobject.h>`

List of all member functions.

## Public Members

- QMetaObject ( const char * class_name, const char * superclass_name, QMetaData * slot_data, int n_slots, QMetaData * signal_data, int n_signals ) (internal)
- QMetaObject ( const char * class_name, const char * superclass_name, QMetaData * slot_data, int n_slots, QMetaData * signal_data, int n_signals, QMetaProperty * prop_data, int n_props, QMetaEnum * enum_data, int n_enums, QClassInfo * class_info, int n_info ) (internal)
- virtual ~QMetaObject () (internal)
- const char* className () const
- const char* superClassName () const
- QMetaObject* superClass () const
- bool inherits ( const char * clname ) const
- int numSlots ( bool super = FALSE ) const
- int numSignals ( bool super = FALSE ) const
- QMetaData* slot ( int index, bool super = FALSE ) const (internal)
- QMetaData* signal ( int index, bool super = FALSE ) const (internal)
- QMetaData* slot ( const char *, bool super = FALSE ) const (internal)
- QMetaData* signal ( const char *, bool super = FALSE ) const (internal)
- QStrList slotNames ( bool super = FALSE ) const
- QStrList signalNames ( bool super = FALSE ) const
- int numClassInfo ( bool super = FALSE ) const
- QClassInfo* classInfo ( int index, bool super = FALSE ) const
- const char* classInfo ( const char * name, bool super = FALSE ) const
- const QMetaProperty* property ( const char * name, bool super = FALSE ) const
- QStrList propertyNames ( bool super = FALSE ) const
- void resolveProperty ( QMetaProperty * prop ) (internal)
- void set_slot_access ( QMetaData::Access * ) (internal)
- QMetaData::Access slot_access ( int index, bool super = FALSE ) (internal)

## Static Public Members

- QMetaObject* new_metaobject ( const char *, const char *, QMetaData *, int, QMetaData *, int, QMetaProperty * prop_data, int n_props, QMetaEnum * enum_data, int n_enums, QClassInfo * class_info, int n_info ) (internal)
- QMetaObject* new_metaobject ( const char *, const char *, QMetaData *, int, QMetaData *, int ) (internal)
- QMetaData* new_metadata ( int ) (internal)
- QMetaData::Access* new_metaaccess ( int ) (internal)
- QMetaEnum* new_metaenum ( int ) (internal)
- QMetaEnum::Item* new_metaenum_item ( int ) (internal)
- QMetaProperty* new_metaproperty ( int ) (internal)
- QClassInfo* new_classinfo ( int ) (internal)

## Detailed Description

The QMetaObject class contains meta information about Qt objects.

The Meta Object System in Qt is responsible for the signal/slot mechanism for communication between objects, runtime type information and the property system. All meta information in Qt is kept in a single instance of QMetaObject per class.

In general, you will not have to use this class directly in any application program. Most of the class members and functions are internal, do not use them .

Some functions, however, are marked as public API and may make sense for certain "meta" applications such as scripting engines or GUI builders:

- className() to get the name of a class.
- superClassName() to get the name of the superclass.
- inherits(), the function called by QObject::inherits().
- superClass() to access the meta object of the superclass.
- numSlots(), numSignals(), slotNames() and signalNames() to get information about a classes signals and slots.
- property() and propertyNames() to receive information about a classes properties.
- classInfo() and numClassInfo() to access additional class information.

## Member Function Documentation

### QClassInfo* QMetaObject::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* QMetaObject::classInfo ( const char * name, bool super = FALSE ) const

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 * QMetaObject::className () const

Returns the class name.

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

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

Returns TRUE if this class inherits clname within the meta object inheritance chain.

(A class is considered to inherit itself.).

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

Returns the number of class information available for this class.

If super is TRUE, inherited class information is included.

### int QMetaObject::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 QMetaObject::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 QMetaProperty* QMetaObject::property ( const char * name, bool super = FALSE ) const

Returns the property meta data for the property with name name or 0 if no such property exists.

If super is TRUE, inherited properties are included.

See also propertyNames().

### QStrList QMetaObject::propertyNames ( bool super = FALSE ) const

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

If super is TRUE, inherited properties are included.

See also property().

### QStrList QMetaObject::signalNames ( bool super = FALSE ) const

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

If super is TRUE, inherited signals are included.

See also signal().

### QStrList QMetaObject::slotNames ( bool super = FALSE ) const

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

If super is TRUE, inherited slots are included.

See also numSlots().

### QMetaObject * QMetaObject::superClass () const

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

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

Returns the class name of the super class, or 0 if there is no super class in the QObject hierarchy.

See also className().

### QMetaObject::QMetaObject ( const char * class_name, const char * superclass_name, QMetaData * slot_data, int n_slots, QMetaData * signal_data, int n_signals )

For internal use only.

### QMetaObject::QMetaObject ( const char * class_name, const char * superclass_name, QMetaData * slot_data, int n_slots, QMetaData * signal_data, int n_signals, QMetaProperty * prop_data, int n_props, QMetaEnum * enum_data, int n_enums, QClassInfo * class_info, int n_info )

For internal use only.

### QMetaObject::~QMetaObject () `[virtual]`

For internal use only.

### QClassInfo * QMetaObject::new_classinfo ( int numEntries ) `[static]`

For internal use only.

### QMetaData::Access * QMetaObject::new_metaaccess( int numEntries ) `[static]`

For internal use only.

### QMetaData * QMetaObject::new_metadata ( int numEntries ) `[static]`

For internal use only.

### QMetaEnum * QMetaObject::new_metaenum ( int numEntries ) `[static]`

For internal use only.

### QMetaEnum::Item * QMetaObject::new_metaenum_item( int numEntries ) `[static]`

For internal use only.

### QMetaObject * QMetaObject::new_metaobject ( const char * classname, const char * superclassname, QMetaData * slot_data, int n_slots, QMetaData * signal_data,int n_signals ) `[static]`

For internal use only.

### QMetaObject * QMetaObject::new_metaobject ( const char * classname, const char * superclassname, QMetaData * slot_data, int n_slots, QMetaData * signal_data,int n_signals, QMetaProperty * prop_data, int n_props, QMetaEnum * enum_data, int n_enums, QClassInfo * class_info, int n_info ) `[static]`

For internal use only.

### QMetaProperty * QMetaObject::new_metaproperty ( int numEntries ) `[static]`

For internal use only.

### void QMetaObject::resolveProperty ( QMetaProperty * prop )

For internal use only.

### void QMetaObject::set_slot_access ( QMetaData::Access * access )

For internal use only.

### QMetaData * QMetaObject::signal ( const char * n, bool super = FALSE ) const

For internal use only.

### QMetaData * QMetaObject::signal ( int index, bool super = FALSE ) const

For internal use only.

### QMetaData * QMetaObject::slot ( const char * n, bool super = FALSE ) const

For internal use only.

### QMetaData * QMetaObject::slot ( int index, bool super = FALSE ) const

For internal use only.

### QMetaData::Access QMetaObject::slot_access( int index, bool super = FALSE )

For internal use only.

Search the documentation, FAQ, qt-interest archive and more (uses www.trolltech.com):

This file is part of the Qt toolkit, copyright © 1995-2000 Trolltech, all rights reserved.