Marble

PlacemarkPositionProviderPlugin.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2011 Guillaume Martres <smarter@ubuntu.com>
4// SPDX-FileCopyrightText: 2011, 2012 Bernhard Beschow <bbeschow@cs.tu-berlin.de>
5//
6
7#ifndef PLACEMARKPOSITIONPROVIDERPLUGIN_H
8#define PLACEMARKPOSITIONPROVIDERPLUGIN_H
9
10#include "PositionProviderPlugin.h"
11
12#include "GeoDataAccuracy.h"
13#include "GeoDataCoordinates.h"
14
15#include <QDateTime>
16
17namespace Marble
18{
19
20class GeoDataPlacemark;
21class MarbleModel;
22
23class PlacemarkPositionProviderPlugin : public PositionProviderPlugin
24{
27
28public:
29 explicit PlacemarkPositionProviderPlugin(MarbleModel *marbleModel, QObject *parent = nullptr);
30
31 QString name() const override;
32 QString nameId() const override;
33 QString guiString() const override;
34 QString version() const override;
35 QString description() const override;
36 QString copyrightYears() const override;
37 QList<PluginAuthor> pluginAuthors() const override;
38 QIcon icon() const override;
39 void initialize() override;
40 bool isInitialized() const override;
41
42 PositionProviderPlugin *newInstance() const override;
43
44 PositionProviderStatus status() const override;
45 GeoDataCoordinates position() const override;
46 GeoDataAccuracy accuracy() const override;
47 qreal speed() const override;
48 qreal direction() const override;
49 QDateTime timestamp() const override;
50
51private:
52 MarbleModel *const m_marbleModel;
53 const GeoDataPlacemark *m_placemark;
54 GeoDataCoordinates m_coordinates;
55 QDateTime m_timestamp;
56 qreal m_speed;
57 qreal m_direction;
58
59 PositionProviderStatus m_status;
60 GeoDataAccuracy m_accuracy;
61 bool m_isInitialized;
62
63private Q_SLOTS:
64 void setPlacemark(const GeoDataPlacemark *placemark);
65
66 void updatePosition();
67};
68
69}
70
71#endif // PLACEMARKPOSITIONPROVIDERPLUGIN_H
The interface for position provider plugins.
Binds a QML item to a specific geodetic location in screen coordinates.
Q_INTERFACES(...)
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 12:02:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.