Marble

Navigation.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2012 Dennis Nienhüser <nienhueser@kde.org>
4//
5
6#ifndef MARBLE_DECLARATIVE_NAVIGATION_H
7#define MARBLE_DECLARATIVE_NAVIGATION_H
8
9#include <QObject>
10#include <QtQml>
11
12namespace Marble
13{
14
15class MarbleQuickItem;
16class NavigationPrivate;
17
18class Navigation : public QObject
19{
21 QML_ELEMENT
22
23 Q_PROPERTY(Marble::MarbleQuickItem *marbleQuickItem READ marbleQuickItem WRITE setMarbleQuickItem NOTIFY marbleQuickItemChanged)
24 Q_PROPERTY(bool guidanceModeEnabled READ guidanceModeEnabled WRITE setGuidanceModeEnabled NOTIFY guidanceModeEnabledChanged)
25 Q_PROPERTY(bool muted READ muted WRITE setMuted NOTIFY mutedChanged)
26 Q_PROPERTY(QString speaker READ speaker WRITE setSpeaker NOTIFY speakerChanged)
27 Q_PROPERTY(QString nextInstructionText READ nextInstructionText NOTIFY nextInstructionTextChanged)
28 Q_PROPERTY(QString nextRoad READ nextRoad NOTIFY nextRoadChanged)
29 Q_PROPERTY(QString nextInstructionImage READ nextInstructionImage NOTIFY nextInstructionImageChanged)
30 Q_PROPERTY(qreal nextInstructionDistance READ nextInstructionDistance NOTIFY nextInstructionDistanceChanged)
31 Q_PROPERTY(qreal destinationDistance READ destinationDistance NOTIFY destinationDistanceChanged)
32 Q_PROPERTY(QString voiceNavigationAnnouncement READ voiceNavigationAnnouncement NOTIFY voiceNavigationAnnouncementChanged)
33 Q_PROPERTY(bool deviated READ deviated NOTIFY deviationChanged)
34 Q_PROPERTY(double screenAccuracy READ screenAccuracy NOTIFY screenAccuracyChanged)
35 Q_PROPERTY(QPointF screenPosition READ screenPosition NOTIFY screenPositionChanged)
36
37public:
38 explicit Navigation(QObject *parent = nullptr);
39
40 ~Navigation() override;
41
42 bool guidanceModeEnabled() const;
43
44 void setGuidanceModeEnabled(bool enabled);
45
46 bool muted() const;
47
48 void setMuted(bool enabled);
49
50 QString nextInstructionText() const;
51
52 QString nextRoad() const;
53
54 QString nextInstructionImage() const;
55
56 qreal nextInstructionDistance() const;
57
58 qreal destinationDistance() const;
59
60 QString voiceNavigationAnnouncement() const;
61
62 QString speaker() const;
63
64 void setSpeaker(const QString &speaker);
65
66 bool deviated() const;
67
68 Marble::MarbleQuickItem *marbleQuickItem() const;
69
70 double screenAccuracy() const;
71
72 QPointF screenPosition() const;
73
74public Q_SLOTS:
75 void setMarbleQuickItem(Marble::MarbleQuickItem *marbleQuickItem);
76
78 void mapChanged();
79
80 void guidanceModeEnabledChanged();
81
82 void mutedChanged(bool arg);
83
84 void nextInstructionTextChanged();
85
86 void nextInstructionImageChanged();
87
88 void nextInstructionDistanceChanged();
89
90 void destinationDistanceChanged();
91
92 void nextRoadChanged();
93
94 void voiceNavigationAnnouncementChanged();
95
96 void soundEnabledChanged();
97
98 void speakerChanged();
99
100 void deviationChanged();
101
102 void marbleQuickItemChanged(Marble::MarbleQuickItem *marbleQuickItem);
103
104 void screenAccuracyChanged();
105
106 void screenPositionChanged();
107
108private Q_SLOTS:
109 void update();
110 void updateScreenPosition();
111
112private:
113 NavigationPrivate *const d;
114};
115
116}
117
118#endif
Binds a QML item to a specific geodetic location in screen coordinates.
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:37:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.