Plasma5Support

location_gps.h
1/*
2 SPDX-FileCopyrightText: 2009 Petri Damstén <damu@iki.fi>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include <QMutex>
10#include <QThread>
11#include <QWaitCondition>
12#include <gps.h>
13
14#include "geolocationprovider.h"
15
16class Gpsd : public QThread
17{
19public:
20 explicit Gpsd(gps_data_t *gpsdata);
21 ~Gpsd() override;
22
23 void update();
24
26 void dataReady(const Plasma5Support::DataEngine::Data &data);
27
28protected:
29 void run() override;
30
31private:
32 gps_data_t *m_gpsdata;
33 QMutex m_mutex;
34 QWaitCondition m_condition;
35 bool m_abort;
36};
37
38class Gps : public GeolocationProvider
39{
41public:
42 explicit Gps(QObject *parent);
43 ~Gps() override;
44
45 void update() override;
46
47private:
48 Gpsd *m_gpsd;
49#if GPSD_API_MAJOR_VERSION >= 5
50 gps_data_t *m_gpsdata;
51#endif
52};
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:38 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.