Marble

VoiceNavigationModel.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_VOICENAVIGATIONMODEL_H
7#define MARBLE_VOICENAVIGATIONMODEL_H
8
9#include "marble_export.h"
10
11#include <QObject>
12
13namespace Marble
14{
15
16class Route;
17
18class VoiceNavigationModelPrivate;
19
20class 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
29public:
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
47public 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
55Q_SIGNALS:
56 void speakerChanged();
57
58 void isSpeakerEnabledChanged();
59
60 void instructionChanged();
61
62 void previewChanged();
63
64private:
65 VoiceNavigationModelPrivate *const d;
66 friend class VoiceNavigationModelPrivate;
67};
68
69}
70
71#endif // MARBLE_VOICENAVIGATIONMODEL_H
void update(Part *part, const QByteArray &data, qint64 dataSize)
KGuiItem reset()
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:14 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.