![]() |
Qt 6.x
The Qt SDK
|
\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. | |
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. | |
int | addKey (const QByteArray &name, int value) |
Adds a new key called name to this enumerator, associated with 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 249 of file qmetaobjectbuilder_p.h.
|
inline |
Definition at line 252 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 2437 of file qmetaobjectbuilder.cpp.
References d, index(), and name().
Referenced by QMetaObjectBuilder::addEnumerator(), and QQmlPropertyCache::toMetaObjectBuilder().
QByteArray QMetaEnumBuilder::enumName | ( | ) | const |
Returns the enum name of the enumerator (without the scope).
Definition at line 2288 of file qmetaobjectbuilder.cpp.
References d.
|
inline |
Returns the index of this enumerator within its QMetaObjectBuilder.
Definition at line 254 of file qmetaobjectbuilder_p.h.
Referenced by addKey(), key(), and value().
bool QMetaEnumBuilder::isFlag | ( | ) | const |
Returns true
if this enumerator is used as a flag; otherwise returns false.
Definition at line 2341 of file qmetaobjectbuilder.cpp.
References d.
bool QMetaEnumBuilder::isScoped | ( | ) | const |
Return true
if this enumerator should be considered scoped (C++11 enum class).
Definition at line 2367 of file qmetaobjectbuilder.cpp.
References d.
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 2407 of file qmetaobjectbuilder.cpp.
References d, index(), and keys.
int QMetaEnumBuilder::keyCount | ( | ) | const |
QMetaType QMetaEnumBuilder::metaType | ( | ) | const |
Returns the meta type of the enumerator.
Definition at line 2315 of file qmetaobjectbuilder.cpp.
References d.
Referenced by setMetaType().
QByteArray QMetaEnumBuilder::name | ( | ) | const |
Returns the type name of the enumerator (without the scope).
Definition at line 2274 of file qmetaobjectbuilder.cpp.
References d.
Referenced by addKey(), and QMetaObjectBuilder::indexOfEnumerator().
void QMetaEnumBuilder::removeKey | ( | int | index | ) |
Removes the key at index from this enumerator.
Definition at line 2455 of file qmetaobjectbuilder.cpp.
void QMetaEnumBuilder::setEnumName | ( | const QByteArray & | alias | ) |
Sets this enumerator to have the enum name alias
.
Definition at line 2303 of file qmetaobjectbuilder.cpp.
References d.
Referenced by QMetaObjectBuilder::addEnumerator().
void QMetaEnumBuilder::setIsFlag | ( | bool | value | ) |
Sets this enumerator to be used as a flag if value is true.
Definition at line 2355 of file qmetaobjectbuilder.cpp.
References d.
Referenced by QMetaObjectBuilder::addEnumerator().
void QMetaEnumBuilder::setIsScoped | ( | bool | value | ) |
Sets this enumerator to be a scoped enum if \value is true.
Definition at line 2380 of file qmetaobjectbuilder.cpp.
References d.
Referenced by QMetaObjectBuilder::addEnumerator(), and QQmlPropertyCache::toMetaObjectBuilder().
Sets this enumerator to have the given metaType
.
Definition at line 2328 of file qmetaobjectbuilder.cpp.
References d, and metaType().
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 2422 of file qmetaobjectbuilder.cpp.
References d, index(), and keys.
|
friend |
Definition at line 281 of file qmetaobjectbuilder_p.h.