27 #ifndef LANGUAGETYPE_H
28 #define LANGUAGETYPE_H
31 #include <QMetaObject>
33 #include <QStringList>
101 static QString StrByType(Types
const& value)
103 QMetaObject metaObject =
LanguageType().staticMetaObject;
104 QMetaEnum metaEnum= metaObject.enumerator( metaObject.indexOfEnumerator(
"Types"));
105 QString
s=metaEnum.valueToKey(value);
108 static Types TypeByStr(QString
const& value)
110 QMetaObject metaObject =
LanguageType().staticMetaObject;
111 QMetaEnum metaEnum= metaObject.enumerator( metaObject.indexOfEnumerator(
"Types"));
112 Types
s=(Types)metaEnum.keyToValue(value.toLatin1());
115 static QStringList TypesList()
118 QMetaObject metaObject =
LanguageType().staticMetaObject;
119 QMetaEnum metaEnum= metaObject.enumerator( metaObject.indexOfEnumerator(
"Types"));
120 for(
int x=0;
x<metaEnum.keyCount();++
x)
122 ret.append(metaEnum.key(
x));
126 QString toShortString(Types type);
134 #endif // LANGUAGETYPE_H