Marble

PositionProviderPluginInterface.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2009 Eckhart Wörner <ewoerner@kde.org>
4//
5
6#ifndef MARBLE_POSITIONPROVIDERPLUGININTERFACE_H
7#define MARBLE_POSITIONPROVIDERPLUGININTERFACE_H
8
9#include "PluginInterface.h"
10
11class QDateTime;
12
13namespace Marble
14{
15class GeoDataAccuracy;
16class GeoDataCoordinates;
17
18enum PositionProviderStatus {
19 PositionProviderStatusError = 0,
20 PositionProviderStatusUnavailable,
21 PositionProviderStatusAcquiring,
22 PositionProviderStatusAvailable
23};
24
25/**
26 * @short The interface for position provider plugins.
27 *
28 */
30{
31public:
33
34 virtual void initialize() = 0;
35
36 virtual bool isInitialized() const = 0;
37
38 virtual PositionProviderStatus status() const = 0;
39 virtual GeoDataCoordinates position() const = 0;
40 virtual GeoDataAccuracy accuracy() const = 0;
41
42 /**
43 * Returns the speed of the gps device in meters per second
44 */
45 virtual qreal speed() const = 0;
46
47 /**
48 * Returns the direction in which the gps device is moving.
49 * The direction is an angle (in degrees) clockwise from geographical north
50 */
51 virtual qreal direction() const = 0;
52
53 virtual QDateTime timestamp() const = 0;
54
55 /**
56 * Returns an error string to be presented to the user
57 * if the status is PositionProviderStatusError. For other
58 * states, the result value is undefined.
59 */
60 virtual QString error() const;
61};
62
63}
64
65Q_DECLARE_INTERFACE(Marble::PositionProviderPluginInterface, "org.kde.Marble.PositionProviderPluginInterface/1.02")
66
67Q_DECLARE_METATYPE(Marble::PositionProviderStatus)
68
69#endif
A 3d point representation.
This class specifies interface of a Marble plugin.
The interface for position provider plugins.
virtual qreal direction() const =0
Returns the direction in which the gps device is moving.
virtual qreal speed() const =0
Returns the speed of the gps device in meters per second.
Q_SCRIPTABLE CaptureState status()
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.