summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/gps.h
Unidiff
Diffstat (limited to 'noncore/net/wellenreiter/gui/gps.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/gps.h12
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
@@ -1,38 +1,46 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2003 Michael 'Mickey' Lauer. All rights reserved. 2** Copyright (C) 2003 Michael 'Mickey' Lauer. All rights reserved.
3** 3**
4** This file is part of Opie Environment. 4** This file is part of Opie Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
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
23{
24 GpsLocation( const float& lat, const float& lon ) : latitude(lat), longitude(lon) {};
25 ~GpsLocation() {};
26 float latitude;
27 float longitude;
28};
29
30
22class GPS : public QObject 31class GPS : public QObject
23{ 32{
24 Q_OBJECT 33 Q_OBJECT
25 34
26 public: 35 public:
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};
37 45
38#endif // GPS_H 46#endif // GPS_H