Marble

MapViewWidget.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2004-2007 Torsten Rahn <tackat@kde.org>
4// SPDX-FileCopyrightText: 2007 Inge Wallin <ingwa@kde.org>
5// SPDX-FileCopyrightText: 2007 Thomas Zander <zander@kde.org>
6// SPDX-FileCopyrightText: 2010 Bastian Holst <bastianholst@gmx.de>
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
19namespace Marble
20{
21
22class MapThemeManager;
23class MarbleWidget;
24
25class MARBLE_EXPORT MapViewWidget : public QWidget
26{
27 Q_OBJECT
28public:
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
38protected:
39 void resizeEvent(QResizeEvent *event) override;
40
41public Q_SLOTS:
42 void setMapThemeId(const QString &);
43 void setProjection(Projection projection);
44
45private 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
55private:
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
68Q_SIGNALS:
69 void celestialBodyChanged(const QString &);
70 void mapThemeIdChanged(const QString &);
71 void projectionChanged(Projection);
72 void showMapWizard();
73 void mapThemeDeleted();
74
75private:
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.
Q_INVOKABLE void setProjection(uint proj)
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 Sat Dec 21 2024 17:04:14 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.