Marble
8 #ifndef MARBLEABSTRACTPRESENTER_H
9 #define MARBLEABSTRACTPRESENTER_H
13 #include "GeoDataLatLonBox.h"
14 #include "MarblePhysics.h"
15 #include <marble_export.h>
20 class GeoDataPlacemark;
26 class MARBLE_EXPORT MarbleAbstractPresenter :
public QObject
31 void zoomChanged(
int zoom);
32 void distanceChanged(
const QString& distanceString);
39 void regionSelected(
const GeoDataLatLonBox &boundingBox);
42 explicit MarbleAbstractPresenter(MarbleMap *map,
QObject *parent =
nullptr);
43 ~MarbleAbstractPresenter()
override;
45 qreal moveStep()
const;
48 GeoDataLookAt lookAt()
const;
61 qreal distanceFromRadius(qreal radius)
const;
66 qreal radiusFromDistance(qreal distance)
const;
78 int minimumZoom()
const;
79 int maximumZoom()
const;
81 qreal distanceFromZoom(qreal zoom)
const;
82 qreal zoomFromDistance(qreal distance)
const;
84 void zoomAt(
const QPoint &pos, qreal newDistance);
85 void moveTo(
const QPoint &pos, qreal factor);
87 qreal centerLongitude()
const;
88 qreal centerLatitude()
const;
92 qreal
zoom(qreal radius)
const;
93 qreal radius(qreal zoom)
const;
98 const MarbleMap*
map()
const;
99 const MarbleModel* model()
const;
102 void setLogzoom(
int value);
104 int zoomStep()
const;
105 qreal viewAngle()
const;
107 bool animationsEnabled()
const;
109 ViewportParams *viewport();
110 const ViewportParams* viewport()
const;
113 void rotateBy(
const qreal deltaLon,
const qreal deltaLat,
FlyToMode mode =
Instant);
122 void zoomAtBy(
const QPoint &pos,
int zoomStep);
126 void centerOn(
const qreal lon,
const qreal lat,
bool animated =
false);
127 void centerOn(
const GeoDataCoordinates &point,
bool animated =
false);
128 void centerOn(
const GeoDataLatLonBox& box,
bool animated =
false);
129 void centerOn(
const GeoDataPlacemark& placemark,
bool animated =
false);
130 void headingOn(qreal heading);
131 void setCenterLatitude(qreal lat,
FlyToMode mode);
132 void setCenterLongitude(qreal lon,
FlyToMode mode);
134 void setAnimationsEnabled(
bool enabled);
135 void setRadius(
int radius);
136 void setDistance(qreal newDistance);
137 void setSelection(
const QRect& region);
140 MarbleMap *
const m_map;
141 MarblePhysics m_physics;
143 bool m_animationsEnabled;
146 const qreal m_viewAngle;
151 #endif // MARBLEABSTRACTPRESENTER_H
ViewContext
This enum is used to choose context in which map quality gets used.
QAction * zoomOut(const QObject *recvr, const char *slot, QObject *parent)
KOSM_EXPORT double distance(const std::vector< const OSM::Node * > &path, Coordinate coord)
QAction * zoom(const QObject *recvr, const char *slot, QObject *parent)
Binds a QML item to a specific geodetic location in screen coordinates.
FlyToMode
Describes possible flight mode (interpolation between source and target camera positions)
@ Automatic
A sane value is chosen automatically depending on animation settings and the action.
QAction * zoomIn(const QObject *recvr, const char *slot, QObject *parent)
@ Instant
Change camera position immediately (no interpolation)
QFuture< void > map(Sequence &sequence, MapFunctor function)
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.