Diffstat (limited to 'noncore/net/wellenreiter/gui/gps.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/gps.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/noncore/net/wellenreiter/gui/gps.h b/noncore/net/wellenreiter/gui/gps.h index ad0b6de..8143fe4 100644 --- a/noncore/net/wellenreiter/gui/gps.h +++ b/noncore/net/wellenreiter/gui/gps.h | |||
@@ -18,8 +18,17 @@ | |||
18 | 18 | ||
19 | #include <qobject.h> | 19 | #include <qobject.h> |
20 | #include <qsocket.h> | 20 | #include <qsocket.h> |
21 | 21 | ||
22 | struct GpsLocation | ||
23 | { | ||
24 | GpsLocation( const float& lat, const float& lon ) : latitude(lat), longitude(lon) {}; | ||
25 | ~GpsLocation() {}; | ||
26 | float latitude; | ||
27 | float longitude; | ||
28 | }; | ||
29 | |||
30 | |||
22 | class GPS : public QObject | 31 | class GPS : public QObject |
23 | { | 32 | { |
24 | Q_OBJECT | 33 | Q_OBJECT |
25 | 34 | ||
@@ -27,10 +36,9 @@ class GPS : public QObject | |||
27 | GPS( QObject* parent = 0, const char * name = "GPS" ); | 36 | GPS( QObject* parent = 0, const char * name = "GPS" ); |
28 | ~GPS(); | 37 | ~GPS(); |
29 | 38 | ||
30 | bool open( const QString& host = "localhost", int port = 2947 ); | 39 | bool open( const QString& host = "localhost", int port = 2947 ); |
31 | float latitude() const; | 40 | GpsLocation position() const; |
32 | float longitute() const; | ||
33 | 41 | ||
34 | private: | 42 | private: |
35 | QSocket* _socket; | 43 | QSocket* _socket; |
36 | }; | 44 | }; |