Marble

VoiceNavigationModel.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2012 Dennis Nienhüser <[email protected]>
4 //
5 
6 #ifndef MARBLE_VOICENAVIGATIONMODEL_H
7 #define MARBLE_VOICENAVIGATIONMODEL_H
8 
9 #include "marble_export.h"
10 
11 #include <QObject>
12 
13 namespace Marble
14 {
15 
16 class Route;
17 
18 class VoiceNavigationModelPrivate;
19 
20 class MARBLE_EXPORT VoiceNavigationModel : public QObject
21 {
22  Q_OBJECT
23 
24  Q_PROPERTY(QString speaker READ speaker WRITE setSpeaker NOTIFY speakerChanged)
25  Q_PROPERTY(bool isSpeakerEnabled READ isSpeakerEnabled WRITE setSpeakerEnabled NOTIFY isSpeakerEnabledChanged )
26  Q_PROPERTY(QString instruction READ instruction NOTIFY instructionChanged)
27  Q_PROPERTY(QString preview READ preview NOTIFY previewChanged)
28 
29 public:
30  /** Constructor */
31  explicit VoiceNavigationModel( QObject *parent = nullptr );
32 
33  /** Destructor */
34  ~VoiceNavigationModel() override;
35 
36 // Initialization
37  QString speaker() const;
38 
39  void setSpeaker( const QString &speaker );
40 
41  bool isSpeakerEnabled() const;
42 
43  void setSpeakerEnabled( bool enabled );
44 
45  void reset();
46 
47 public Q_SLOTS:
48  void update( const Route &route, qreal distanceManuever, qreal distanceTarget, bool deviated );
49 
50 // Turn instructions
51  QString preview() const;
52 
53  QString instruction() const;
54 
55 Q_SIGNALS:
56  void speakerChanged();
57 
58  void isSpeakerEnabledChanged();
59 
60  void instructionChanged();
61 
62  void previewChanged();
63 
64 private:
65  VoiceNavigationModelPrivate* const d;
66  friend class VoiceNavigationModelPrivate;
67 };
68 
69 }
70 
71 #endif // MARBLE_VOICENAVIGATIONMODEL_H
Binds a QML item to a specific geodetic location in screen coordinates.
void update(Part *part, const QByteArray &data, qint64 dataSize)
KGuiItem reset()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Oct 2 2023 03:52:10 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.