|
GammaRay API Documentation
2.9.0
|
Enum conversion utility functions. More...
Functions | |
| int | enumToInt (const QVariant &value, const QMetaEnum &metaEnum) |
| Converts the given enum or flag value into its numerical representation. More... | |
| QString | enumToString (const QVariant &value, const char *typeName=nullptr, const QMetaObject *metaObject=nullptr) |
| Translates an enum or flag value into a human readable text. More... | |
| QMetaEnum | metaEnum (const QVariant &value, const char *typeName=nullptr, const QMetaObject *metaObject=nullptr) |
| Determine the QMetaEnum for a given enum/flag value. More... | |
Enum conversion utility functions.
| QString GammaRay::EnumUtil::enumToString | ( | const QVariant & | value, |
| const char * | typeName = nullptr, |
||
| const QMetaObject * | metaObject = nullptr |
||
| ) |
Translates an enum or flag value into a human readable text.
| value | The numerical value. Type information from the QVariant are used to find the corresponding QMetaEnum. |
| typeName | Use this if the value has type int (e.g. the case for QMetaProperty::read). |
| metaObject | QMetaObject possibly containing the definition of the enum. |
value. | QMetaEnum GammaRay::EnumUtil::metaEnum | ( | const QVariant & | value, |
| const char * | typeName = nullptr, |
||
| const QMetaObject * | metaObject = nullptr |
||
| ) |