4 #include "location_p.h"
8 #include <QNetworkAccessManager>
9 #include <QNetworkReply>
10 #include <QGeoPositionInfo>
15 class Location : public QObject
20 Location( const QString &x, const QString &y, const QString &label=QString() );
21 Location( const QGeoPositionInfo &positionInfo, const QString &label=QString() );
22 Location( const Location &from );
23 Location &operator=( const Location &from );
24 Location( const QString &label=QString() );
32 void setLocation( const QGeoPositionInfo &positionInfo );
34 void setAddress( const QString &address ) const;
35 QString address() const;
37 void setLabel( const QString &label ) const;
38 QString label() const;
43 void resolveAddress( const QString &address );
49 void replyFinished( QNetworkReply * reply );
54 QNetworkAccessManager *manager;
59 * Transformes WGS84 longitude/latitude coordinates to KKJ x/y coordinates.
60 * @param longitude the input longitude in degrees
61 * @param latitude the input latitude in degrees
62 * @param outX the result x (easting)
63 * @param outY the result y (northing)
65 void WGS84lola_to_KKJxy(double longitude, double latitude, KKJ *outX, KKJ *outY);
68 * Transformes KKJ x/y coordinates to WGS84 longitude/latitude coordinates.
69 * @param x the input x (easting)
70 * @param y the input y (northing)
71 * @param outLongitude the result longitude in degrees
72 * @param outLatitude the result latitude in degrees
74 void KKJxy_to_WGS84lola(KKJ x, KKJ y, double *outLongitude, double *outLatitude);
77 double radians(double deg);
80 double degrees(double rad);
83 // Longitude0 and Center meridian of KKJ bands
84 static const double KkjZoneInfo[][2];
86 // Function: KKJ_Zone_I
87 int KKJ_Zone_I(KKJ easting);
89 // Function: KKJ_Zone_Lo
90 int KKJ_Zone_Lo(double kkjlo);
92 // Function: KKJlalo_to_WGS84lalo
93 void KKJlola_to_WGS84lola(double kkjlo, double kkjla, double *outLongitude, double *outLatitude);
95 // Function: WGS84lalo_to_KKJlalo
96 void WGS84lola_to_KKJlola(double longitude, double latitude, double *outLongitude, double *outLatitude);
98 // Function: KKJlalo_to_KKJxy
99 void KKJlola_to_KKJxy(double lon, double lat, int zoneNumber, KKJ *outX, KKJ *outY);
101 // Function: KKJxy_to_KKJlalo
102 void KKJxy_to_KKJlola(KKJ x, KKJ y, double *outLongitude, double *outLatitude);