summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/gps.h
Unidiff
Diffstat (limited to 'noncore/net/wellenreiter/gui/gps.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/gps.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/noncore/net/wellenreiter/gui/gps.h b/noncore/net/wellenreiter/gui/gps.h
index 8143fe4..cfe1cdb 100644
--- a/noncore/net/wellenreiter/gui/gps.h
+++ b/noncore/net/wellenreiter/gui/gps.h
@@ -10,30 +10,35 @@
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14**********************************************************************/ 14**********************************************************************/
15 15
16#ifndef GPS_H 16#ifndef GPS_H
17#define GPS_H 17#define GPS_H
18 18
19#include <qobject.h> 19#include <qobject.h>
20#include <qsocket.h> 20#include <qsocket.h>
21 21
22struct GpsLocation 22class GpsLocation
23{ 23{
24 GpsLocation( const float& lat, const float& lon ) : latitude(lat), longitude(lon) {}; 24 public:
25 GpsLocation( const float& lat, const float& lon ) : _latitude(lat), _longitude(lon) {};
25 ~GpsLocation() {}; 26 ~GpsLocation() {};
26 float latitude; 27 float latitude() const { return _latitude; };
27 float longitude; 28 float longitude() const { return _longitude; };
29 QString dmsPosition() const;
30 private:
31 float _latitude;
32 float _longitude;
28}; 33};
29 34
30 35
31class GPS : public QObject 36class GPS : public QObject
32{ 37{
33 Q_OBJECT 38 Q_OBJECT
34 39
35 public: 40 public:
36 GPS( QObject* parent = 0, const char * name = "GPS" ); 41 GPS( QObject* parent = 0, const char * name = "GPS" );
37 ~GPS(); 42 ~GPS();
38 43
39 bool open( const QString& host = "localhost", int port = 2947 ); 44 bool open( const QString& host = "localhost", int port = 2947 );