Marble

GoToDialog.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2010 Dennis Nienhüser <[email protected]>
4 //
5 
6 #ifndef MARBLE_GOTODIALOG_H
7 #define MARBLE_GOTODIALOG_H
8 
9 #include "marble_export.h"
10 
11 #include <QDialog>
12 
13 class QModelIndex;
14 
15 namespace Marble
16 {
17 
18 class GeoDataPlacemark;
19 class GeoDataCoordinates;
20 class GoToDialogPrivate;
21 class 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  */
28 class MARBLE_EXPORT GoToDialog: public QDialog
29 {
30  Q_OBJECT
31 
32 public:
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 QVector<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 
61 private:
62  GoToDialogPrivate * const d;
63  friend class GoToDialogPrivate;
64 };
65 
66 } // namespace Marble
67 
68 #endif // MARBLE_GOTODIALOG_H
A 3d point representation.
typedef WindowFlags
Binds a QML item to a specific geodetic location in screen coordinates.
A dialog that provides a list of targets to go to: The current location, route start,...
Definition: GoToDialog.h:28
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:86
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Oct 2 2023 03:52:08 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.