Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions | ![]() |
The QMetaObject class contains meta information about Qt objects. More...
#include <QMetaObject>
The QMetaObject class contains meta information about Qt objects.
The Qt Meta Object System in Qt is responsible for the signals and slots inter-object communication mechanism, runtime type information, and the Qt property system. A single QMetaObject instance is created for each QObject subclass that is used in an application, and this instance stores all the meta information for the QObject subclass.
This class is not normally required for application programming, but it is useful if you write meta applications, such as scripting engines or GUI builders.
The functions you are most likely to find useful are these:
The index functions indexOfMember(), indexOfEnumerator(), and indexOfProperty() map names of member functions, enumerators, or properties to indexes in the meta object. For example, Qt uses indexOfMember() internally when you connect a signal to a slot.
Classes can also have a list of name--value pairs of additional class information. The number of pairs is returned by classInfoCount(), single pairs are returned by classInfo(), and you can search for pairs with indexOfClassInfo().
See also moc (Meta QObject Compiler).
Returns true if the signal and member arguments are compatible; otherwise returns false.
Both signal and member are expected to be normalized.
See also normalizedSignature().
Returns the meta data for the item of class information with the given index.
See also indexOfClassInfo().
Returns the number of items of class information in this class.
Returns the class information offset for this class; i.e. the index position of this class's first class information item. If the class has no super-classes with class information, the offset is 0; otherwise the offset is the sum of all the class information items in the class's super-classes.
Returns the class name.
See also superClass().
Returns the meta data for the enumerator with the given index.
See also indexOfEnumerator().
Returns the number of enumerators in this class.
See also enumerator().
Returns the enumerator offset for this class; i.e. the index position of this class's first enumerator. If the class has no super-classes with enumerators, the offset is 0; otherwise the offset is the sum of all the enumerators in the class's super-classes.
Finds class information item name and returns its index; otherwise returns -1.
See also classInfo() and classInfoCount().
Finds enumerator name and returns its index; otherwise returns -1.
See also enumerator() and enumeratorCount().
Finds member and returns its index; otherwise returns -1.
See also member() and memberCount().
Finds property name and returns its index; otherwise returns -1.
See also property() and propertyCount().
Finds signal and returns its index; otherwise returns -1.
See also indexOfMember(), member(), and memberCount().
Finds slot and returns its index; otherwise returns -1.
See also indexOfMember(), member(), and memberCount().
Returns the meta data for the member with the given index.
Returns the number of slots in this class.
See also slot().
Returns the member offset for this class; i.e. the index position of this class's first member. The offset is the sum of all the members in the class's super-classes (which is always positive since QObject has the deleteLater() slot and a destroyed() signal).
Normalizes the signature of the given member.
Qt uses normalized signatures to decide whether two given signals and slots are compatible. Normalization reduces whitespace to a minimum, moves 'const' to the front where appropriate, removes 'const' from value types and replaces const references with values.
See also checkConnectArgs().
Returns the meta data for the property with the given index.
See also indexOfProperty().
Returns the number of properties in this class.
See also property().
Returns the property offset for this class; i.e. the index position of this class's first property. The offset is the sum of all the properties in the class's super-classes (which is always positive since QObject has the name() property).
Returns the meta object of the super-class, or 0 if there is no such object.
Copyright © 2004 Trolltech. | Trademarks | Qt 4.0.0-tp2 |