|
KanoopCommonQt 2.1.1
Kanoop foundational Qt utility library
|
|
A QMap subclass providing bidirectional enum-to-string lookups. More...
#include <kanoopcommon.h>
Inheritance diagram for KANOOP::EnumToStringMap< T >:
Collaboration diagram for KANOOP::EnumToStringMap< T >:Public Member Functions | |
| QString | getString (T type, const QString &defaultValue=QString()) const |
| Look up the string name for an enum value. | |
| T | getType (const QString &name, Qt::CaseSensitivity caseSensitivity, const T defaultValue=T()) const |
| Look up the enum value for a string name, with case sensitivity control. | |
| T | getType (const QString &name, const T defaultValue=T()) const |
| Look up the enum value for a string name using case-sensitive comparison. | |
| QList< T > | getTypes () const |
| Return all enum values registered in this map. | |
| bool | containsString (const QString &name, Qt::CaseSensitivity cs=Qt::CaseInsensitive) const |
| Test whether the map contains a given string value. | |
A QMap subclass providing bidirectional enum-to-string lookups.
| T | Enumeration type used as the map key |
Definition at line 48 of file kanoopcommon.h.
|
inline |
Test whether the map contains a given string value.
| name | String to search for |
| cs | Case sensitivity flag (default Qt::CaseInsensitive) |
Definition at line 116 of file kanoopcommon.h.
|
inline |
Look up the string name for an enum value.
| type | Enum value to look up |
| defaultValue | Value to return if not found |
Definition at line 57 of file kanoopcommon.h.
|
inline |
Look up the enum value for a string name using case-sensitive comparison.
| name | String to look up |
| defaultValue | Value returned when no match is found |
Definition at line 95 of file kanoopcommon.h.
References KANOOP::EnumToStringMap< T >::getType().
|
inline |
Look up the enum value for a string name, with case sensitivity control.
| name | String to look up |
| caseSensitivity | Qt::CaseSensitive or Qt::CaseInsensitive |
| defaultValue | Value returned when no match is found |
Definition at line 72 of file kanoopcommon.h.
Referenced by KANOOP::EnumToStringMap< T >::getType().
|
inline |
Return all enum values registered in this map.
Definition at line 104 of file kanoopcommon.h.