28 #ifndef UAVTRAILTYPE_H
29 #define UAVTRAILTYPE_H
31 #include <QMetaObject>
33 #include <QStringList>
34 #include "../core/corecommon.h"
36 namespace mapcontrol {
63 static QString StrByType(Types
const& value)
65 QMetaObject metaObject =
UAVTrailType().staticMetaObject;
66 QMetaEnum metaEnum= metaObject.enumerator( metaObject.indexOfEnumerator(
"Types"));
67 QString
s=metaEnum.valueToKey(value);
70 static Types TypeByStr(QString
const& value)
72 QMetaObject metaObject =
UAVTrailType().staticMetaObject;
73 QMetaEnum metaEnum= metaObject.enumerator( metaObject.indexOfEnumerator(
"Types"));
74 Types
s=(Types)metaEnum.keyToValue(value.toLatin1());
77 static QStringList TypesList()
80 QMetaObject metaObject =
UAVTrailType().staticMetaObject;
81 QMetaEnum metaEnum= metaObject.enumerator( metaObject.indexOfEnumerator(
"Types"));
82 for(
int x=0;
x<metaEnum.keyCount();++
x)
84 ret.append(metaEnum.key(
x));
92 #endif // UAVTRAILTYPE_H