mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Dive list: take pointer-to-dive_site instead of QVariant
Since "struct dive_site *" is now a Q_METATYPE, the functions MapWidgetHelper::centerOnDiveSite() and ::getCoordinates() can directly get such a pointer instead of a QVariant. This makes the code nicer to read. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
920eb7576f
commit
c980216dc0
2 changed files with 3 additions and 13 deletions
|
@ -5,7 +5,6 @@
|
|||
#include "core/units.h"
|
||||
#include <QObject>
|
||||
#include <QGeoCoordinate>
|
||||
#include <QVariant>
|
||||
|
||||
#if defined(Q_OS_IOS)
|
||||
#include <QtPlugin>
|
||||
|
@ -27,10 +26,9 @@ class MapWidgetHelper : public QObject {
|
|||
public:
|
||||
explicit MapWidgetHelper(QObject *parent = NULL);
|
||||
|
||||
void centerOnDiveSite(struct dive_site *);
|
||||
void centerOnSelectedDiveSite();
|
||||
Q_INVOKABLE QGeoCoordinate getCoordinates(QVariant dive_site);
|
||||
Q_INVOKABLE void centerOnDiveSite(QVariant dive_site);
|
||||
Q_INVOKABLE QGeoCoordinate getCoordinates(struct dive_site *ds);
|
||||
Q_INVOKABLE void centerOnDiveSite(struct dive_site *ds);
|
||||
Q_INVOKABLE void reloadMapLocations();
|
||||
Q_INVOKABLE void copyToClipboardCoordinates(QGeoCoordinate coord, bool formatTraditional);
|
||||
Q_INVOKABLE void calculateSmallCircleRadius(QGeoCoordinate coord);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue