map2d_widget
uavmapfollowtype.h
Go to the documentation of this file.
1 
12 /*
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 3 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 * for more details.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 */
27 
28 #ifndef UAVMAPFOLLOWTYPE_H
29 #define UAVMAPFOLLOWTYPE_H
30 #include <QObject>
31 #include <QMetaObject>
32 #include <QMetaEnum>
33 #include <QStringList>
34 namespace mapcontrol {
35  class UAVMapFollowType:public QObject
36  {
37  Q_OBJECT
38  Q_ENUMS(Types)
39  public:
40  enum Types
41  {
46 
51 
56  };
57  static QString StrByType(Types const& value)
58  {
59  QMetaObject metaObject = UAVMapFollowType().staticMetaObject;
60  QMetaEnum metaEnum= metaObject.enumerator( metaObject.indexOfEnumerator("Types"));
61  QString s=metaEnum.valueToKey(value);
62  return s;
63  }
64  static Types TypeByStr(QString const& value)
65  {
66  QMetaObject metaObject = UAVMapFollowType().staticMetaObject;
67  QMetaEnum metaEnum= metaObject.enumerator( metaObject.indexOfEnumerator("Types"));
68  Types s=(Types)metaEnum.keyToValue(value.toLatin1());
69  return s;
70  }
71  static QStringList TypesList()
72  {
73  QStringList ret;
74  QMetaObject metaObject = UAVMapFollowType().staticMetaObject;
75  QMetaEnum metaEnum= metaObject.enumerator( metaObject.indexOfEnumerator("Types"));
76  for(int x=0;x<metaEnum.keyCount();++x)
77  {
78  ret.append(metaEnum.key(x));
79  }
80  return ret;
81  }
82 
83  };
84 }
85 
86 #endif // UAVMAPFOLLOWTYPE_H
Definition: uavmapfollowtype.h:35
static Types TypeByStr(QString const &value)
Definition: uavmapfollowtype.h:64
Types
Definition: uavmapfollowtype.h:40
map is not connected to UAV position or heading
Definition: uavmapfollowtype.h:55
static QStringList TypesList()
Definition: uavmapfollowtype.h:71
centers and rotates map on the UAV
Definition: uavmapfollowtype.h:50
static QString StrByType(Types const &value)
Definition: uavmapfollowtype.h:57
Definition: core.h:60
only centers the map on the UAV
Definition: uavmapfollowtype.h:45