Marble

MapViewWidget.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2004-2007 Torsten Rahn <[email protected]>
4 // SPDX-FileCopyrightText: 2007 Inge Wallin <[email protected]>
5 // SPDX-FileCopyrightText: 2007 Thomas Zander <[email protected]>
6 // SPDX-FileCopyrightText: 2010 Bastian Holst <[email protected]>
7 //
8 
9 #ifndef MARBLE_MAPVIEWWIDGET_H
10 #define MARBLE_MAPVIEWWIDGET_H
11 
12 // Marble
13 #include "MarbleGlobal.h"
14 #include "marble_export.h"
15 
16 // Qt
17 #include <QWidget>
18 
19 namespace Marble
20 {
21 
22 class MapThemeManager;
23 class MarbleWidget;
24 
25 class MARBLE_EXPORT MapViewWidget : public QWidget
26 {
27  Q_OBJECT
28  public:
29  explicit MapViewWidget( QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags() );
30  ~MapViewWidget() override;
31 
32  /**
33  * @brief Set a MarbleWidget associated to this widget.
34  * @param widget the MarbleWidget to be set.
35  */
36  void setMarbleWidget( MarbleWidget *widget, MapThemeManager *mapThemeManager );
37 
38 protected:
39  void resizeEvent(QResizeEvent *event) override;
40 
41  public Q_SLOTS:
42  void setMapThemeId( const QString & );
43  void setProjection( Projection projection );
44 
45 private Q_SLOTS:
46  void globeViewRequested();
47  void mercatorViewRequested();
48  void flatViewRequested();
49  void gnomonicViewRequested();
50  void stereographicViewRequested();
51  void lambertAzimuthalViewRequested();
52  void azimuthalEquidistantViewRequested();
53  void verticalPerspectiveViewRequested();
54 
55  private:
56  Q_PRIVATE_SLOT( d, void celestialBodySelected( int comboIndex ) )
57 
58  Q_PRIVATE_SLOT( d, void projectionSelected( int projectionIndex ) )
59 
60  Q_PRIVATE_SLOT( d, void mapThemeSelected( QModelIndex index ) )
61  Q_PRIVATE_SLOT( d, void mapThemeSelected( int index ) )
62 
63  Q_PRIVATE_SLOT( d, void showContextMenu( const QPoint& pos ) )
64  Q_PRIVATE_SLOT( d, void deleteMap() )
65  Q_PRIVATE_SLOT( d, void toggleFavorite() )
66  Q_PRIVATE_SLOT( d, void toggleIconSize() )
67 
68  Q_SIGNALS:
69  void celestialBodyChanged( const QString& );
70  void mapThemeIdChanged( const QString& );
71  void projectionChanged( Projection );
72  void showMapWizard();
73  void mapThemeDeleted();
74 
75  private:
76  Q_DISABLE_COPY( MapViewWidget )
77 
78  friend class Private;
79  class Private;
80  Private * const d;
81 };
82 
83 }
84 
85 #endif
Provides access to all map themes installed locally.
typedef WindowFlags
Binds a QML item to a specific geodetic location in screen coordinates.
Projection
This enum is used to choose the projection shown in the view.
Definition: MarbleGlobal.h:41
Q_INVOKABLE void setProjection(uint proj)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Oct 4 2023 04:09:42 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.