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
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{
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 */
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 class representing a point of interest on the map
void setShowRoutingItems(bool show)
Toggle whether routing items (source, destination and via points) are visible.
GeoDataCoordinates coordinates() const
Returns the position of the item selected by the user, or a default constructed GeoDataLookAt if the ...
void setSearchEnabled(bool enabled)
Toggle whether the dialog can be used to search for placemarks.
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.
QDialog(QWidget *parent, Qt::WindowFlags f)
Q_OBJECTQ_OBJECT
QObject * parent() const const
typedef WindowFlags
QWidget(QWidget *parent, Qt::WindowFlags f)
void show()
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:52:09 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.