Marble

GoToDialog.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2010 Dennis Nienhüser <nienhueser@kde.org>
4//
5
6#ifndef MARBLE_GOTODIALOG_H
7#define MARBLE_GOTODIALOG_H
8
9#include "marble_export.h"
10
11#include <QDialog>
12
13class QModelIndex;
14
15namespace Marble
16{
17
18class GeoDataPlacemark;
19class GeoDataCoordinates;
20class GoToDialogPrivate;
21class MarbleModel;
22
23/**
24 * A dialog that provides a list of targets to go to: The current location,
25 * route start, destination and via points and bookmarks. Clicking on a target
26 * centers the map on the selected position
27 */
28class MARBLE_EXPORT GoToDialog : public QDialog
29{
30 Q_OBJECT
31
32public:
33 explicit GoToDialog(MarbleModel *marbleModel, QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
34
35 ~GoToDialog() override;
36
37 /** Toggle whether routing items (source, destination and via points) are visible */
38 void setShowRoutingItems(bool show);
39
40 /** Toggle whether the dialog can be used to search for placemarks */
41 void setSearchEnabled(bool enabled);
42
43 /**
44 * Returns the position of the item selected by the user, or a default
45 * constructed GeoDataLookAt if the dialog was cancelled by the user
46 */
47 GeoDataCoordinates coordinates() const;
48
49 Q_PRIVATE_SLOT(d, void saveSelection(const QModelIndex &index))
50
51 Q_PRIVATE_SLOT(d, void startSearch())
52
53 Q_PRIVATE_SLOT(d, void updateSearchResult(const QList<GeoDataPlacemark *> &placemarks))
54
55 Q_PRIVATE_SLOT(d, void updateSearchMode())
56
57 Q_PRIVATE_SLOT(d, void updateProgress())
58
59 Q_PRIVATE_SLOT(d, void stopProgressAnimation())
60
61private:
62 GoToDialogPrivate *const d;
63 friend class GoToDialogPrivate;
64};
65
66} // namespace Marble
67
68#endif // MARBLE_GOTODIALOG_H
A 3d point representation.
A dialog that provides a list of targets to go to: The current location, route start,...
Definition GoToDialog.h:29
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition MarbleModel.h:84
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 8 2024 12:02:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.