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
14class MarbleQuickItem;
15class NavigationPrivate;
16
17class Navigation : public QObject
18{
20 Q_PROPERTY(Marble::MarbleQuickItem * marbleQuickItem READ marbleQuickItem WRITE setMarbleQuickItem NOTIFY marbleQuickItemChanged)
21 Q_PROPERTY(bool guidanceModeEnabled READ guidanceModeEnabled WRITE setGuidanceModeEnabled NOTIFY guidanceModeEnabledChanged)
22 Q_PROPERTY(bool muted READ muted WRITE setMuted NOTIFY mutedChanged)
23 Q_PROPERTY(QString speaker READ speaker WRITE setSpeaker NOTIFY speakerChanged)
24 Q_PROPERTY(QString nextInstructionText READ nextInstructionText NOTIFY nextInstructionTextChanged)
25 Q_PROPERTY(QString nextRoad READ nextRoad NOTIFY nextRoadChanged)
26 Q_PROPERTY(QString nextInstructionImage READ nextInstructionImage NOTIFY nextInstructionImageChanged)
27 Q_PROPERTY(qreal nextInstructionDistance READ nextInstructionDistance NOTIFY nextInstructionDistanceChanged)
28 Q_PROPERTY(qreal destinationDistance READ destinationDistance NOTIFY destinationDistanceChanged)
29 Q_PROPERTY(QString voiceNavigationAnnouncement READ voiceNavigationAnnouncement NOTIFY voiceNavigationAnnouncementChanged)
30 Q_PROPERTY(bool deviated READ deviated NOTIFY deviationChanged)
31 Q_PROPERTY(double screenAccuracy READ screenAccuracy NOTIFY screenAccuracyChanged)
32 Q_PROPERTY(QPointF screenPosition READ screenPosition NOTIFY screenPositionChanged)
33
34public:
35 explicit Navigation( QObject* parent = nullptr );
36
37 ~Navigation() override;
38
39 bool guidanceModeEnabled() const;
40
41 void setGuidanceModeEnabled( bool enabled );
42
43 bool muted() const;
44
45 void setMuted(bool enabled);
46
47 QString nextInstructionText() const;
48
49 QString nextRoad() const;
50
51 QString nextInstructionImage() const;
52
53 qreal nextInstructionDistance() const;
54
55 qreal destinationDistance() const;
56
57 QString voiceNavigationAnnouncement() const;
58
59 QString speaker() const;
60
61 void setSpeaker( const QString &speaker );
62
63 bool deviated() const;
64
65 Marble::MarbleQuickItem * marbleQuickItem() const;
66
67 double screenAccuracy() const;
68
69 QPointF screenPosition() const;
70
71public Q_SLOTS:
72 void setMarbleQuickItem(Marble::MarbleQuickItem * marbleQuickItem);
73
75 void mapChanged();
76
77 void guidanceModeEnabledChanged();
78
79 void mutedChanged(bool arg);
80
81 void nextInstructionTextChanged();
82
83 void nextInstructionImageChanged();
84
85 void nextInstructionDistanceChanged();
86
87 void destinationDistanceChanged();
88
89 void nextRoadChanged();
90
91 void voiceNavigationAnnouncementChanged();
92
93 void soundEnabledChanged();
94
95 void speakerChanged();
96
97 void deviationChanged();
98
99 void marbleQuickItemChanged(Marble::MarbleQuickItem * marbleQuickItem);
100
101 void screenAccuracyChanged();
102
103 void screenPositionChanged();
104
105private Q_SLOTS:
106 void update();
107 void updateScreenPosition();
108
109private:
110 NavigationPrivate* const d;
111};
112
113}
114
115#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
T qobject_cast(QObject *object)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 21 2024 12:00:06 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.