diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2017-07-21 17:31:58 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-07-28 07:31:11 -0700 |
commit | 3624d30354e50521559d5290de61d04375d35473 (patch) | |
tree | 11192e087b8e62302cfcbf9a72930609bec84df3 /mobile-widgets/qmlmapwidgethelper.h | |
parent | 621dd53a4333a29a3e07293f75e4346a27705bbe (diff) | |
download | subsurface-3624d30354e50521559d5290de61d04375d35473.tar.gz |
mapwidgethelper: add the method copyToClipboardCoordinates()
This method uses the helper printGPSCoords() to format the
coordinates of a location into either decimal or sexagesimal.
The selection is handled by the boolean flag "formatTraditional"
and the user preferences flag - prefs.coordinates_traditional.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'mobile-widgets/qmlmapwidgethelper.h')
-rw-r--r-- | mobile-widgets/qmlmapwidgethelper.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmapwidgethelper.h b/mobile-widgets/qmlmapwidgethelper.h index 83f9df140..3a7f28eb0 100644 --- a/mobile-widgets/qmlmapwidgethelper.h +++ b/mobile-widgets/qmlmapwidgethelper.h @@ -4,6 +4,7 @@ #include <QObject>
+class QGeoCoordinate;
class MapLocationModel;
class MapLocation;
struct dive_site;
@@ -19,6 +20,7 @@ public: void centerOnDiveSite(struct dive_site *);
void reloadMapLocations();
+ Q_INVOKABLE void copyToClipboardCoordinates(QGeoCoordinate coord, bool formatTraditional);
private:
QObject *m_map;
@@ -31,4 +33,6 @@ signals: void modelChanged();
};
+extern "C" const char *printGPSCoords(int lat, int lon);
+
#endif
|