Marble

CurrentLocationWidget.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2010 Bastian Holst <bastianholst@gmx.de>
4//
5
6#ifndef MARBLE_CURRENTLOCATIONWIDGET_H
7#define MARBLE_CURRENTLOCATIONWIDGET_H
8
9// Marble
10#include "AutoNavigation.h"
11#include "marble_export.h"
12
13// Qt
14#include <QWidget>
15
16namespace Marble
17{
18
19class CurrentLocationWidgetPrivate;
20
21class GeoDataCoordinates;
22class MarbleWidget;
23class PositionProviderPlugin;
24
25class MARBLE_EXPORT CurrentLocationWidget : public QWidget
26{
27 Q_OBJECT
28
29public:
30 explicit CurrentLocationWidget(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
31 ~CurrentLocationWidget() override;
32
33 /**
34 * @brief Set a MarbleWidget associated to this widget.
35 * @param widget the MarbleWidget to be set.
36 */
37 void setMarbleWidget(MarbleWidget *widget);
38
39 AutoNavigation::CenterMode recenterMode() const;
40
41 bool autoZoom() const;
42
43 bool trackVisible() const;
44
45 QString lastOpenPath() const;
46
47 QString lastSavePath() const;
48
49public Q_SLOTS:
50 /// Slot that decides whether recentering should be done
51 void setRecenterMode(int recenterMode);
52
53 /// Slot for Auto Zooming while navigating
54 void setAutoZoom(bool activate);
55
56 void setTrackVisible(bool visible);
57
58 void setLastOpenPath(const QString &path);
59
60 void setLastSavePath(const QString &path);
61
62private:
63 void changePositionProvider(const QString &provider);
64
65 Q_SLOT void changePositionProvider(int index);
66 Q_SLOT void trackPlacemark();
67
68 Q_DISABLE_COPY(CurrentLocationWidget)
69
70 CurrentLocationWidgetPrivate *const d;
71
72 Q_PRIVATE_SLOT(d, void receiveGpsCoordinates(const GeoDataCoordinates &in, qreal speed))
73 Q_PRIVATE_SLOT(d, void adjustPositionTrackingStatus(PositionProviderStatus status))
74 Q_PRIVATE_SLOT(d, void centerOnCurrentLocation())
75
76 /**
77 * @brief Slot for setting re-center combobox if re-centering is enabled other than from CurrentLocationWidget
78 * @see RoutingPlugin
79 */
80 Q_PRIVATE_SLOT(d, void updateRecenterComboBox(AutoNavigation::CenterMode centerMode))
81
82 /**
83 * @brief Slot for toggling auto zoom checkbox if auto zooming is enabled other than from CurrentLocationWidget
84 * @see RoutingPlugin
85 */
86 Q_PRIVATE_SLOT(d, void updateAutoZoomCheckBox(bool autoZoom))
87
88 Q_PRIVATE_SLOT(d, void updateActivePositionProvider(PositionProviderPlugin *))
89
90 Q_PRIVATE_SLOT(d, void updateGuidanceMode())
91
92 Q_PRIVATE_SLOT(d, void saveTrack())
93 Q_PRIVATE_SLOT(d, void openTrack())
94 Q_PRIVATE_SLOT(d, void clearTrack())
95};
96
97}
98
99#endif
Q_SCRIPTABLE CaptureState status()
Binds a QML item to a specific geodetic location in screen coordinates.
typedef WindowFlags
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:55:53 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.