qmapwidgethelper: add centerOnDiveSiteUUID()

centerOnDiveSiteUUID() is a helper to center the map on a dive_site
UUID instead of a dive_site pointer.
Make it call centerOnDiveSite().

Make both this function and reloadMapLocations() Q_INVOKABLE
as these are going to be called from QML.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
Lubomir I. Ivanov 2018-03-08 21:38:14 +02:00 committed by Dirk Hohndel
parent eb8772d967
commit 8fa2295a61
2 changed files with 10 additions and 1 deletions

View file

@ -22,7 +22,8 @@ public:
explicit MapWidgetHelper(QObject *parent = NULL);
void centerOnDiveSite(struct dive_site *);
void reloadMapLocations();
Q_INVOKABLE void centerOnDiveSiteUUID(QVariant dive_site_uuid);
Q_INVOKABLE void reloadMapLocations();
Q_INVOKABLE void copyToClipboardCoordinates(QGeoCoordinate coord, bool formatTraditional);
Q_INVOKABLE void calculateSmallCircleRadius(QGeoCoordinate coord);
Q_INVOKABLE void updateCurrentDiveSiteCoordinatesFromMap(quint32 uuid, QGeoCoordinate coord);