Marble

DownloadRegionDialog.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2
3#ifndef MARBLE_DOWNLOADREGIONDIALOG_H
4#define MARBLE_DOWNLOADREGIONDIALOG_H
5
6#include <QDialog>
7#include <QList>
8
9#include <MarbleGlobal.h>
10
11#include "marble_export.h"
12
13namespace Marble
14{
15class GeoDataLatLonAltBox;
16class TileCoordsPyramid;
17class MarbleWidget;
18
19class MARBLE_EXPORT DownloadRegionDialog : public QDialog
20{
21 Q_OBJECT
22
23public:
24 enum SelectionMethod {
25 VisibleRegionMethod,
26 SpecifiedRegionMethod,
27 RouteDownloadMethod
28 };
29
30 explicit DownloadRegionDialog(MarbleWidget *const widget, QWidget *const parent = nullptr, Qt::WindowFlags const f = Qt::WindowFlags());
31 ~DownloadRegionDialog() override;
32 void setAllowedTileLevelRange(int const minimumTileLevel, int const maximumTileLevel);
33 void setVisibleTileLevel(int const tileLevel);
34 void setSelectionMethod(SelectionMethod const);
35
36 QList<TileCoordsPyramid> region() const;
37
38 TileType tileType() const;
39
40public Q_SLOTS:
41 void setSpecifiedLatLonAltBox(GeoDataLatLonAltBox const &);
42 void setVisibleLatLonAltBox(GeoDataLatLonAltBox const &);
43 void updateTileLayer();
44 void delayUpdateTileLayer();
45
46Q_SIGNALS:
47 /// This signal is emitted when the "Apply" button is pressed.
48 void applied();
49 /// This signal is emitted when the dialog receives a QHideEvent.
50 void hidden();
51 /// This signal is emitted when the dialog receives a QShowEvent
52 void shown();
53
54protected:
55 void hideEvent(QHideEvent *event) override;
56 void showEvent(QShowEvent *event) override;
57
58private Q_SLOTS:
59 void toggleSelectionMethod();
60 void updateTileCount();
61 void updateTileType();
62
63 /// This slot is called upon to update the route download UI when a route exists
64 void updateRouteDialog();
65 /// This slot sets the unit of the offset(m or km) in the spinbox
66 void setOffsetUnit();
67
68private:
69 Q_DISABLE_COPY(DownloadRegionDialog)
70 class Private;
71 Private *const d;
72};
73
74}
75
76#endif
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 Mon Nov 4 2024 16:37:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.