• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • plugins
  • positionprovider
  • gpsd
GpsdThread.cpp
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2009 Eckhart Wörner <ewoerner@kde.org>
9 //
10 
11 #include "GpsdThread.h"
12 
13 #include <QMetaType>
14 
15 #include "GpsdConnection.h"
16 
17 namespace Marble
18 {
19 
20 GpsdThread::GpsdThread() : m_connection( 0 )
21 {
22  // nothing to do
23 }
24 
25 GpsdThread::~GpsdThread()
26 {
27  delete m_connection;
28 }
29 
30 void GpsdThread::run()
31 {
32  qRegisterMetaType<gps_data_t>( "gps_data_t" );
33  qRegisterMetaType<PositionProviderStatus>("PositionProviderStatus");
34  m_connection = new GpsdConnection;
35  connect( m_connection, SIGNAL(statusChanged(PositionProviderStatus)),
36  this, SIGNAL(statusChanged(PositionProviderStatus)) );
37  connect( m_connection, SIGNAL(gpsdInfo(gps_data_t)),
38  this, SIGNAL(gpsdInfo(gps_data_t)) );
39  m_connection->initialize();
40  exec();
41 }
42 
43 QString GpsdThread::error() const
44 {
45  return m_connection->error();
46 }
47 
48 } // namespace Marble
49 
50 #include "GpsdThread.moc"
Marble::GpsdThread::gpsdInfo
void gpsdInfo(gps_data_t data)
Marble::GpsdThread::GpsdThread
GpsdThread()
Definition: GpsdThread.cpp:20
Marble::GpsdThread::statusChanged
void statusChanged(PositionProviderStatus status) const
Marble::GpsdConnection
Definition: GpsdConnection.h:24
QString
Marble::GpsdThread::error
QString error() const
Definition: GpsdThread.cpp:43
Marble::PositionProviderStatus
PositionProviderStatus
Definition: PositionProviderPluginInterface.h:25
Marble::GpsdConnection::error
QString error() const
Definition: GpsdConnection.cpp:139
GpsdThread.h
Marble::GpsdThread::run
virtual void run()
Definition: GpsdThread.cpp:30
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
GpsdConnection.h
QThread::exec
int exec()
Marble::GpsdThread::~GpsdThread
~GpsdThread()
Definition: GpsdThread.cpp:25
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal