Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions | ![]() |
The QMetaEnum class provides meta data about an enumerator. More...
#include <QMetaEnum>
The QMetaEnum class provides meta data about an enumerator.
Use name() for the enumerator's name. The enumerator's keys (names of each enumerated item) are returned by key(); use keyCount() to find the number of keys. isFlag() returns whether the enumerator is meant to be used as a flag, meaning that its values can be combined using the OR operator.
The conversion functions keyToValue(), valueToKey(), keysToValue(), and valueToKeys() allow conversion between the integer representation of an enumeration or set value and its literal representation. The scope() function returns the class scope this enumerator was declared in.
Returns true if this enumerator is used as a flag; otherwise returns false.
When used as flags, enumerators can be combined using the OR operator.
See also keysToValue() and valueToKeys().
Returns true if this enum is valid (has a name); otherwise returns false.
Returns the key with the given index, or 0 if no such key exists.
See also keyCount() and value().
Returns the number of keys.
See also key().
Returns the integer value of the given enumeration key, or -1 if key is not defined.
For set types, use keysToValue().
See also valueToKey(), isFlag(), and keysToValue().
Returns the value derived from combining together the values of the keys using the OR operator. Note that the strings in keys must be '|'-separated.
See also isFlag(), valueToKey(), and keysToValue().
Returns the name of the enumerator.
See also isValid().
Returns the scope this enumerator was declared in.
Returns the value with the given index; or returns -1 if there is no such value.
See also keyCount() and key().
Returns the string that is used as the name of the given enumeration value, or 0 if value is not defined.
For set types, use valueToKeys().
See also valueToKey(), isFlag(), and valueToKeys().
Returns a byte array of '|'-separated keys that represents the given value.
See also isFlag(), valueToKey(), and valueToKeys().
Copyright © 2004 Trolltech. | Trademarks | Qt 4.0.0-tp1 |