Marble

PositionProviderPluginInterface.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2009 Eckhart W├Ârner <[email protected]>
4 //
5 
6 #ifndef MARBLE_POSITIONPROVIDERPLUGININTERFACE_H
7 #define MARBLE_POSITIONPROVIDERPLUGININTERFACE_H
8 
9 #include "PluginInterface.h"
10 
11 class QDateTime;
12 
13 namespace Marble
14 {
15 class GeoDataAccuracy;
16 class GeoDataCoordinates;
17 
18 enum PositionProviderStatus {
19  PositionProviderStatusError = 0,
20  PositionProviderStatusUnavailable,
21  PositionProviderStatusAcquiring,
22  PositionProviderStatusAvailable
23 };
24 
25 /**
26  * @short The interface for position provider plugins.
27  *
28  */
30 {
31  public:
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 
65 Q_DECLARE_INTERFACE( Marble::PositionProviderPluginInterface, "org.kde.Marble.PositionProviderPluginInterface/1.02" )
66 
67 Q_DECLARE_METATYPE( Marble::PositionProviderStatus )
68 
69 #endif
A 3d point representation.
This class specifies interface of a Marble plugin.
Q_SCRIPTABLE CaptureState status()
Binds a QML item to a specific geodetic location in screen coordinates.
The interface for position provider plugins.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:53:22 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.