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 "marble_export.h"
11#include "AutoNavigation.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
29 public:
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
49 public 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
62 private:
63 Q_DISABLE_COPY( CurrentLocationWidget )
64
65 CurrentLocationWidgetPrivate * const d;
66
67 Q_PRIVATE_SLOT( d, void receiveGpsCoordinates( const GeoDataCoordinates &in, qreal speed ) )
68 Q_PRIVATE_SLOT( d, void adjustPositionTrackingStatus( PositionProviderStatus status ) )
69 Q_PRIVATE_SLOT( d, void changePositionProvider( const QString &provider ) )
70 Q_PRIVATE_SLOT( d, void centerOnCurrentLocation() )
71
72 Q_PRIVATE_SLOT( d, void trackPlacemark() )
73
74 /**
75 * @brief Slot for setting re-center combobox if re-centering is enabled other than from CurrentLocationWidget
76 * @see RoutingPlugin
77 */
78 Q_PRIVATE_SLOT( d, void updateRecenterComboBox( AutoNavigation::CenterMode centerMode ) )
79
80 /**
81 * @brief Slot for toggling auto zoom checkbox if auto zooming is enabled other than from CurrentLocationWidget
82 * @see RoutingPlugin
83 */
84 Q_PRIVATE_SLOT( d, void updateAutoZoomCheckBox( bool autoZoom ) )
85
86 Q_PRIVATE_SLOT( d, void updateActivePositionProvider( PositionProviderPlugin* ) )
87
88 Q_PRIVATE_SLOT( d, void updateGuidanceMode() )
89
90 Q_PRIVATE_SLOT( d, void saveTrack() )
91 Q_PRIVATE_SLOT( d, void openTrack() )
92 Q_PRIVATE_SLOT( d, void clearTrack() )
93};
94
95}
96
97#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 Jun 14 2024 11:54:16 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.