mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
mapwidget.qml: add the function centerOnCoordinates()
This function can be called to center the map on a specific coordinates. For the C++ version call it via QMetaObject::invokeMethod() in centerOnDiveSite(). TODO: add QML property animations. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
parent
5cc2c02dfb
commit
5f2e60142a
2 changed files with 9 additions and 0 deletions
|
@ -15,4 +15,8 @@ void MapWidgetHelper::centerOnDiveSite(struct dive_site *ds)
|
|||
|
||||
qreal longitude = ds->longitude.udeg / 1000000.0;
|
||||
qreal latitude = ds->latitude.udeg / 1000000.0;
|
||||
|
||||
QMetaObject::invokeMethod(m_map, "centerOnCoordinates",
|
||||
Q_ARG(QVariant, latitude),
|
||||
Q_ARG(QVariant, longitude));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue