map2d_widget
geodecoderstatus.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 #ifndef GEODECODERSTATUS_H
28 #define GEODECODERSTATUS_H
29 
30 #include <QObject>
31 #include <QMetaObject>
32 #include <QMetaEnum>
33 #include <QStringList>
34 namespace core {
35  class GeoCoderStatusCode:public QObject
36  {
37  Q_OBJECT
38  Q_ENUMS(Types)
39  public:
40  enum Types
41  {
45  Unknow = -1,
46 
51 
57 
62 
68 
73 
79 
84 
90 
95 
101 
102  };
103  static QString StrByType(Types const& value)
104  {
105  QMetaObject metaObject = GeoCoderStatusCode().staticMetaObject;
106  QMetaEnum metaEnum= metaObject.enumerator( metaObject.indexOfEnumerator("Types"));
107  QString s=metaEnum.valueToKey(value);
108  return s;
109  }
110  static Types TypeByStr(QString const& value)
111  {
112  QMetaObject metaObject = GeoCoderStatusCode().staticMetaObject;
113  QMetaEnum metaEnum= metaObject.enumerator( metaObject.indexOfEnumerator("Types"));
114  Types s=(Types)metaEnum.keyToValue(value.toLatin1());
115  return s;
116  }
117  static QStringList TypesList()
118  {
119  QStringList ret;
120  QMetaObject metaObject = GeoCoderStatusCode().staticMetaObject;
121  QMetaEnum metaEnum= metaObject.enumerator( metaObject.indexOfEnumerator("Types"));
122  for(int x=0;x<metaEnum.keyCount();++x)
123  {
124  ret.append(metaEnum.key(x));
125  }
126  return ret;
127  }
128 
129  };
130 }
131 #endif // GEODECODERSTATUS_H
Synonym for G_GEO_MISSING_QUERY.
Definition: geodecoderstatus.h:72
A directions request could not be successfully parsed. For example, the request may have been rejecte...
Definition: geodecoderstatus.h:56
The HTTP q parameter was either missing or had no value. For geocoding requests, this means that an e...
Definition: geodecoderstatus.h:67
The geocode for the given address or the route for the given directions query cannot be returned due ...
Definition: geodecoderstatus.h:83
unknow response
Definition: geodecoderstatus.h:45
No corresponding geographic location could be found for the specified address. This may be due to the...
Definition: geodecoderstatus.h:78
static QString StrByType(Types const &value)
Definition: geodecoderstatus.h:103
static Types TypeByStr(QString const &value)
Definition: geodecoderstatus.h:110
Types
Definition: geodecoderstatus.h:40
The given key is either invalid or does not match the domain for which it was given.
Definition: geodecoderstatus.h:94
The GDirections object could not compute directions between the points mentioned in the query...
Definition: geodecoderstatus.h:89
Definition: geodecoderstatus.h:35
The given key has gone over the requests limit in the 24 hour period or has submitted too many reques...
Definition: geodecoderstatus.h:100
No errors occurred; the address was successfully parsed and its geocode has been returned.
Definition: geodecoderstatus.h:50
static QStringList TypesList()
Definition: geodecoderstatus.h:117
A geocoding or directions request could not be successfully processed, yet the exact reason for the f...
Definition: geodecoderstatus.h:61