2010-06-09 12:19:24 +03:00
|
|
|
/*
|
2010-06-22 23:33:55 +03:00
|
|
|
* Copyright 2008, 2010 Niels Kummerfeldt <niels.kummerfeldt@tu-harburg.de>
|
2010-06-09 12:19:24 +03:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GPSCLIENT_H
|
|
|
|
#define GPSCLIENT_H
|
|
|
|
|
|
|
|
#include <QtCore/QObject>
|
|
|
|
#include <QtCore/QPointF>
|
|
|
|
#include <QtNetwork/QTcpSocket>
|
|
|
|
|
|
|
|
class GpsClient : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
GpsClient(QObject *parent = 0);
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void connectGps();
|
|
|
|
void disconnectGps();
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void position(const QPointF &pos);
|
2010-07-21 22:04:58 +03:00
|
|
|
void altitude(qreal alt);
|
|
|
|
void direction(qreal track);
|
|
|
|
void speed(qreal speed);
|
2010-06-09 12:19:24 +03:00
|
|
|
void connected();
|
|
|
|
void disconnected();
|
2010-11-04 19:57:31 +02:00
|
|
|
void fixed(bool fix);
|
2010-06-09 12:19:24 +03:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void readData();
|
|
|
|
void conn();
|
|
|
|
|
|
|
|
private:
|
|
|
|
QTcpSocket *m_socket;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2010-06-22 23:33:55 +03:00
|
|
|
#endif // GPSCLIENT_H
|