Qt 4.8
|
The QMetaEnumBuilder class enables modifications to an enumerator definition on a meta object builder. More...
#include <qmetaobjectbuilder_p.h>
Public Functions | |
int | addKey (const QByteArray &name, int value) |
Adds a new key called name to this enumerator, associated with value. More... | |
int | index () const |
Returns the index of this enumerator within its QMetaObjectBuilder. More... | |
bool | isFlag () const |
Returns true if this enumerator is used as a flag; otherwise returns false. More... | |
QByteArray | key (int index) const |
Returns the key with the given index, or an empty QByteArray if no such key exists. More... | |
int | keyCount () const |
Returns the number of keys. More... | |
QByteArray | name () const |
Returns the name of the enumerator (without the scope). More... | |
QMetaEnumBuilder () | |
void | removeKey (int index) |
Removes the key at index from this enumerator. More... | |
void | setIsFlag (bool value) |
Sets this enumerator to be used as a flag if value is true. More... | |
int | value (int index) const |
Returns the value with the given index; or returns -1 if there is no such value. More... | |
Private Functions | |
QMetaEnumBuilderPrivate * | d_func () const |
QMetaEnumBuilder (const QMetaObjectBuilder *mobj, int index) | |
Properties | |
int | _index |
const QMetaObjectBuilder * | _mobj |
Friends | |
class | QMetaObjectBuilder |
The QMetaEnumBuilder class enables modifications to an enumerator definition on a meta object builder.
Definition at line 289 of file qmetaobjectbuilder_p.h.
|
inline |
Definition at line 292 of file qmetaobjectbuilder_p.h.
|
inlineprivate |
Definition at line 314 of file qmetaobjectbuilder_p.h.
int QMetaEnumBuilder::addKey | ( | const QByteArray & | name, |
int | value | ||
) |
Adds a new key called name to this enumerator, associated with value.
Returns the index of the new key.
Definition at line 2595 of file qmetaobjectbuilder.cpp.
Referenced by QMetaObjectBuilder::addEnumerator().
|
private |
Definition at line 2484 of file qmetaobjectbuilder.cpp.
|
inline |
Returns the index of this enumerator within its QMetaObjectBuilder.
Definition at line 294 of file qmetaobjectbuilder_p.h.
bool QMetaEnumBuilder::isFlag | ( | ) | const |
Returns true if this enumerator is used as a flag; otherwise returns false.
Definition at line 2524 of file qmetaobjectbuilder.cpp.
QByteArray QMetaEnumBuilder::key | ( | int | index | ) | const |
Returns the key with the given index, or an empty QByteArray if no such key exists.
Definition at line 2565 of file qmetaobjectbuilder.cpp.
int QMetaEnumBuilder::keyCount | ( | ) | const |
Returns the number of keys.
Definition at line 2550 of file qmetaobjectbuilder.cpp.
QByteArray QMetaEnumBuilder::name | ( | ) | const |
Returns the name of the enumerator (without the scope).
Definition at line 2509 of file qmetaobjectbuilder.cpp.
void QMetaEnumBuilder::removeKey | ( | int | index | ) |
Removes the key at index from this enumerator.
Definition at line 2613 of file qmetaobjectbuilder.cpp.
void QMetaEnumBuilder::setIsFlag | ( | bool | value | ) |
Sets this enumerator to be used as a flag if value is true.
Definition at line 2538 of file qmetaobjectbuilder.cpp.
Referenced by QMetaObjectBuilder::addEnumerator().
int QMetaEnumBuilder::value | ( | int | index | ) | const |
Returns the value with the given index; or returns -1 if there is no such value.
Definition at line 2580 of file qmetaobjectbuilder.cpp.
|
friend |
Definition at line 312 of file qmetaobjectbuilder_p.h.
|
private |
Definition at line 310 of file qmetaobjectbuilder_p.h.
|
private |
Definition at line 309 of file qmetaobjectbuilder_p.h.