Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

gps.h

Go to the documentation of this file.
00001 /**********************************************************************
00002 ** Copyright (C) 2003 Michael 'Mickey' Lauer.  All rights reserved.
00003 **
00004 ** This file is part of Wellenreiter II.
00005 **
00006 ** This file may be distributed and/or modified under the terms of the
00007 ** GNU General Public License version 2 as published by the Free Software
00008 ** Foundation and appearing in the file LICENSE.GPL included in the
00009 ** packaging of this file.
00010 **
00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013 **
00014 **********************************************************************/
00015 
00016 #ifndef GPS_H
00017 #define GPS_H
00018 
00019 #include <qobject.h>
00020 #include <qsocket.h>
00021 
00022 class GpsLocation
00023 {
00024   public:
00025     GpsLocation( const float& lat, const float& lon ) : _latitude(lat), _longitude(lon) {};
00026     ~GpsLocation() {};
00027     float latitude() const { return _latitude; };
00028     float longitude() const { return _longitude; };
00029     QString dmsPosition() const;
00030   private:
00031     float _latitude;
00032     float _longitude;
00033 };
00034 
00035 
00036 class GPS : public QObject
00037 {
00038   Q_OBJECT
00039 
00040   public:
00041     GPS( QObject* parent = 0, const char * name = "GPS" );
00042     ~GPS();
00043 
00044     bool open( const QString& host = "localhost", int port = 2947 );
00045     GpsLocation position() const;
00046 
00047   private:
00048     QSocket* _socket;
00049 };
00050 
00051 #endif // GPS_H

Generated on Sat Nov 5 16:17:45 2005 for OPIE by  doxygen 1.4.2