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 <QVector>
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
23 public:
24 enum SelectionMethod { VisibleRegionMethod, SpecifiedRegionMethod, RouteDownloadMethod };
25
26 explicit DownloadRegionDialog( MarbleWidget *const widget, QWidget * const parent = nullptr,
27 Qt::WindowFlags const f = Qt::WindowFlags() );
28 ~DownloadRegionDialog() override;
29 void setAllowedTileLevelRange( int const minimumTileLevel,
30 int const maximumTileLevel );
31 void setVisibleTileLevel( int const tileLevel );
32 void setSelectionMethod( SelectionMethod const );
33
34 QVector<TileCoordsPyramid> region() const;
35
36 TileType tileType() const;
37
38 public Q_SLOTS:
39 void setSpecifiedLatLonAltBox( GeoDataLatLonAltBox const & );
40 void setVisibleLatLonAltBox( GeoDataLatLonAltBox const & );
41 void updateTileLayer();
42 void delayUpdateTileLayer();
43
44 Q_SIGNALS:
45 /// This signal is emitted when the "Apply" button is pressed.
46 void applied();
47 /// This signal is emitted when the dialog receives a QHideEvent.
48 void hidden();
49 /// This signal is emitted when the dialog receives a QShowEvent
50 void shown();
51
52 protected:
53 void hideEvent( QHideEvent * event ) override;
54 void showEvent( QShowEvent * event ) override;
55
56 private Q_SLOTS:
57 void toggleSelectionMethod();
58 void updateTileCount();
59 void updateTileType();
60
61 /// This slot is called upon to update the route download UI when a route exists
62 void updateRouteDialog();
63 /// This slot sets the unit of the offset(m or km) in the spinbox
64 void setOffsetUnit();
65
66 private:
67 Q_DISABLE_COPY( DownloadRegionDialog )
68 class Private;
69 Private * const d;
70
71};
72
73}
74
75#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 Tue Mar 26 2024 11:18:17 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.