dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
maptype.h
Go to the documentation of this file.
1 
13 /*
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful, but
20 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 * for more details.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, see <http://www.gnu.org/licenses/>
26 */
27 #ifndef MAPTYPE_H
28 #define MAPTYPE_H
29 #include <QMetaObject>
30 #include <QMetaEnum>
31 #include <QStringList>
32 #include "corecommon.h"
33 
34 namespace core {
35  class TLMAPWIDGET_EXPORT MapType:public QObject
36  {
37  Q_OBJECT
38  Q_ENUMS(Types)
39  public:
40  enum Types
41  {
42  None=0,
43  GoogleMap=1,
44  GoogleSatellite=4,
45  GoogleLabels=8,
46  GoogleTerrain=16,
47  GoogleHybrid=20,
48 
49  GoogleMapChina=22,
50  GoogleSatelliteChina=24,
51  GoogleLabelsChina=26,
52  GoogleTerrainChina=28,
53  GoogleHybridChina=29,
54 
55  OpenStreetMap=32,
56  OpenStreetOsm=33,
57  OpenStreetMapSurfer=34,
58  OpenStreetMapSurferTerrain=35,
59 
60  YahooMap=64,
61  YahooSatellite=128,
62  YahooLabels=256,
63  YahooHybrid=333,
64 
65  BingMap=444,
66  BingSatellite=555,
67  BingHybrid=666,
68 
69  ArcGIS_Map=777,
70  ArcGIS_Satellite=788,
71  ArcGIS_ShadedRelief=799,
72  ArcGIS_Terrain=811,
73 
74  // use these numbers to clean up old stuff
75  //ArcGIS_MapsLT_Map_Old= 877,
76  //ArcGIS_MapsLT_OrtoFoto_Old = 888,
77  //ArcGIS_MapsLT_Map_Labels_Old = 890,
78  //ArcGIS_MapsLT_Map_Hybrid_Old = 899,
79  //ArcGIS_MapsLT_Map=977,
80  //ArcGIS_MapsLT_OrtoFoto=988,
81  //ArcGIS_MapsLT_Map_Labels=990,
82  //ArcGIS_MapsLT_Map_Hybrid=999,
83  //ArcGIS_MapsLT_Map=978,
84  //ArcGIS_MapsLT_OrtoFoto=989,
85  //ArcGIS_MapsLT_Map_Labels=991,
86  //ArcGIS_MapsLT_Map_Hybrid=998,
87 
88  ArcGIS_MapsLT_Map=1000,
89  ArcGIS_MapsLT_OrtoFoto=1001,
90  ArcGIS_MapsLT_Map_Labels=1002,
91  ArcGIS_MapsLT_Map_Hybrid=1003,
92 
93  PergoTurkeyMap = 2001,
94  SigPacSpainMap = 3001,
95 
96  GoogleMapKorea=4001,
97  GoogleSatelliteKorea=4002,
98  GoogleLabelsKorea=4003,
99  GoogleHybridKorea=4005,
100 
101  YandexMapRu = 5000,
102 
103  UserImage = 6000
104  };
105  static QString StrByType(Types const& value)
106  {
107  QMetaObject metaObject = MapType().staticMetaObject;
108  QMetaEnum metaEnum= metaObject.enumerator( metaObject.indexOfEnumerator("Types"));
109  QString s=metaEnum.valueToKey(value);
110  return s;
111  }
112  static Types TypeByStr(QString const& value)
113  {
114  QMetaObject metaObject = MapType().staticMetaObject;
115  QMetaEnum metaEnum= metaObject.enumerator( metaObject.indexOfEnumerator("Types"));
116  Types s=(Types)metaEnum.keyToValue(value.toLatin1());
117  return s;
118  }
119  static QStringList TypesList()
120  {
121  QStringList ret;
122  QMetaObject metaObject = MapType().staticMetaObject;
123  QMetaEnum metaEnum= metaObject.enumerator( metaObject.indexOfEnumerator("Types"));
124  for(int x=0;x<metaEnum.keyCount();++x)
125  {
126  ret.append(metaEnum.key(x));
127  }
128  return ret;
129  }
130  };
131 
132 }
133 #endif // MAPTYPE_H
x
Definition: OPPlots.m:100