mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
621dd53a43
commit
3624d30354
2 changed files with 21 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue