Marble

MarbleWidgetPopupMenu.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2006-2007 Torsten Rahn <[email protected]>
4 // SPDX-FileCopyrightText: 2007 Inge Wallin <[email protected]>
5 //
6 
7 #ifndef MARBLE_MARBLEWIDGETPOPUPMENU_H
8 #define MARBLE_MARBLEWIDGETPOPUPMENU_H
9 
10 #include "marble_export.h"
11 
12 #include <QObject>
13 
14 class QAction;
15 class QPoint;
16 
17 namespace Marble
18 {
19 
20 class MarbleWidget;
21 class MarbleModel;
22 class GeoDataCoordinates;
23 class GeoDataPlacemark;
24 
25 /**
26  * The MarbleWidgetPopupMenu handles context menus.
27  */
28 class MARBLE_EXPORT MarbleWidgetPopupMenu : public QObject
29 {
30  Q_OBJECT
31 
32  public:
34 
35  ~MarbleWidgetPopupMenu() override;
36 
37  /**
38  * Adds the action to the menu associated with the specified
39  * mouse button
40  */
41  void addAction( Qt::MouseButton button, QAction* action );
42 
43  /**
44  * @brief mousePosition Position of the last mouse button click
45  * @return
46  */
47  QPoint mousePosition() const;
48 
49  public Q_SLOTS:
50  void showLmbMenu( int, int );
51  void showRmbMenu( int, int );
52 
53 private Q_SLOTS:
54  void resetMenu();
55  void slotInfoDialog();
56  void slotCopyCoordinates();
57  void slotCopyGeo();
58  void slotAboutDialog();
59 
60 private Q_SLOTS:
61  void directionsFromHere();
62  void directionsToHere();
63  void startReverseGeocoding();
64  void showAddressInformation( const GeoDataCoordinates &coordinates, const GeoDataPlacemark &placemark );
65  void addBookmark();
66  void toggleFullscreen( bool enabled );
67 
68  private:
69  Q_DISABLE_COPY( MarbleWidgetPopupMenu )
70  class Private;
71  Private* const d;
72 };
73 
74 }
75 
76 #endif
A 3d point representation.
A widget class that displays a view of the earth.
Definition: MarbleWidget.h:98
MouseButton
Binds a QML item to a specific geodetic location in screen coordinates.
a class representing a point of interest on the map
The MarbleWidgetPopupMenu handles context menus.
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 Sun Feb 5 2023 03:59:28 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.