![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\inmodule QtCore More...
#include <qmetaobjectbuilder_p.h>
Public Member Functions | |
| QMetaEnumBuilder () | |
| int | index () const |
| Returns the index of this enumerator within its QMetaObjectBuilder. | |
| QByteArray | name () const |
| Returns the type name of the enumerator (without the scope). | |
| QByteArray | enumName () const |
| Returns the enum name of the enumerator (without the scope). | |
| void | setEnumName (const QByteArray &alias) |
Sets this enumerator to have the enum name alias. | |
| QMetaType | metaType () const |
| Returns the meta type of the enumerator. | |
| void | setMetaType (QMetaType metaType) |
Sets this enumerator to have the given metaType. | |
| bool | isFlag () const |
Returns true if this enumerator is used as a flag; otherwise returns false. | |
| void | setIsFlag (bool value) |
| Sets this enumerator to be used as a flag if value is true. | |
| bool | isScoped () const |
Return true if this enumerator should be considered scoped (C++11 enum class). | |
| void | setIsScoped (bool value) |
| Sets this enumerator to be a scoped enum if \value is true. | |
| bool | is64Bit () const |
Return true if this enumerations in this enumerator are 64-bit. | |
| void | setIs64Bit (bool value) |
| Sets this enumerator to be 64-bit wide if value is true. | |
| int | keyCount () const |
| Returns the number of keys. | |
| QByteArray | key (int index) const |
| Returns the key with the given index, or an empty QByteArray if no such key exists. | |
| int | value (int index) const |
| Returns the value with the given index; or returns -1 if there is no such value. | |
| std::optional< quint64 > | value64 (int index) const |
| int | addKey (const QByteArray &name, int value) |
| Adds a new key called name to this enumerator, associated with value. | |
| int | addKey (const QByteArray &name, quint64 value) |
| void | removeKey (int index) |
| Removes the key at index from this enumerator. | |
Friends | |
| class | QMetaObjectBuilder |
\inmodule QtCore
The QMetaEnumBuilder class enables modifications to an enumerator definition on a meta object builder.
Definition at line 251 of file qmetaobjectbuilder_p.h.
|
inline |
Definition at line 254 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 2542 of file qmetaobjectbuilder.cpp.
| int QMetaEnumBuilder::addKey | ( | const QByteArray & | name, |
| quint64 | value ) |
Adds a new key called name to this enumerator, associated with value. Returns the index of the new key.
Using the 64-bit version of this function automatically makes this enumeration be stored as 64-bit.
Definition at line 2563 of file qmetaobjectbuilder.cpp.
| QByteArray QMetaEnumBuilder::enumName | ( | ) | const |
Returns the enum name of the enumerator (without the scope).
Definition at line 2337 of file qmetaobjectbuilder.cpp.
|
inline |
Returns the index of this enumerator within its QMetaObjectBuilder.
Definition at line 256 of file qmetaobjectbuilder_p.h.
| bool QMetaEnumBuilder::is64Bit | ( | ) | const |
Return true if this enumerations in this enumerator are 64-bit.
This flag is autoamtically enabled if a 64-bit value is added with addKey().
Definition at line 2446 of file qmetaobjectbuilder.cpp.
| bool QMetaEnumBuilder::isFlag | ( | ) | const |
Returns true if this enumerator is used as a flag; otherwise returns false.
Definition at line 2393 of file qmetaobjectbuilder.cpp.
| bool QMetaEnumBuilder::isScoped | ( | ) | const |
Return true if this enumerator should be considered scoped (C++11 enum class).
Definition at line 2419 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 2489 of file qmetaobjectbuilder.cpp.
| int QMetaEnumBuilder::keyCount | ( | ) | const |
Returns the number of keys.
Definition at line 2474 of file qmetaobjectbuilder.cpp.
| QMetaType QMetaEnumBuilder::metaType | ( | ) | const |
Returns the meta type of the enumerator.
Definition at line 2364 of file qmetaobjectbuilder.cpp.
| QByteArray QMetaEnumBuilder::name | ( | ) | const |
Returns the type name of the enumerator (without the scope).
Definition at line 2323 of file qmetaobjectbuilder.cpp.
| void QMetaEnumBuilder::removeKey | ( | int | index | ) |
Removes the key at index from this enumerator.
Definition at line 2578 of file qmetaobjectbuilder.cpp.
| void QMetaEnumBuilder::setEnumName | ( | const QByteArray & | alias | ) |
Sets this enumerator to have the enum name alias.
Definition at line 2352 of file qmetaobjectbuilder.cpp.
| void QMetaEnumBuilder::setIs64Bit | ( | bool | value | ) |
Sets this enumerator to be 64-bit wide if value is true.
If value is false, any stored 64-bit keys will be truncated to 32 bits.
This flag is autoamtically enabled if a 64-bit value is added with addKey().
Definition at line 2462 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 2407 of file qmetaobjectbuilder.cpp.
| void QMetaEnumBuilder::setIsScoped | ( | bool | value | ) |
Sets this enumerator to be a scoped enum if \value is true.
Definition at line 2432 of file qmetaobjectbuilder.cpp.
Sets this enumerator to have the given metaType.
The is64Bit() flag will be set to match metaType's size.
Definition at line 2378 of file qmetaobjectbuilder.cpp.
| int QMetaEnumBuilder::value | ( | int | index | ) | const |
Returns the value with the given index; or returns -1 if there is no such value.
If this is a 64-bit enumeration (see is64Bit()), this function returns the low 32-bit portion of the value. Use value64() to obtain the full value instead.
Definition at line 2508 of file qmetaobjectbuilder.cpp.
| std::optional< quint64 > QMetaEnumBuilder::value64 | ( | int | index | ) | const |
Returns the value with the given index if it exists; or returns a disengaged {std::optional} if it doesn't.
qmetaenum-32bit-signextend-64bit
Definition at line 2523 of file qmetaobjectbuilder.cpp.
|
friend |
Definition at line 288 of file qmetaobjectbuilder_p.h.