diff options
-rw-r--r-- | qt-ui/globe.cpp | 7 | ||||
-rw-r--r-- | qt-ui/globe.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp index 0bd2db423..97c848d80 100644 --- a/qt-ui/globe.cpp +++ b/qt-ui/globe.cpp @@ -54,6 +54,13 @@ GlobeGPS::GlobeGPS(QWidget* parent) : MarbleWidget(parent), loadedDives(0) setShowOverviewMap(false); setShowScaleBar(true); setShowCompass(false); + connect(this, SIGNAL(mouseClickGeoPosition(qreal, qreal, GeoDataCoordinates::Unit)), this, SLOT(mouseClicked(qreal, qreal, GeoDataCoordinates::Unit))); +} + +void GlobeGPS::mouseClicked(qreal lon, qreal lat, GeoDataCoordinates::Unit unit) +{ + GeoDataCoordinates here(lon, lat, unit); + qDebug("At this point Linus will make magic appear... %f/%f", here.longitude(GeoDataCoordinates::Degree), here.latitude(GeoDataCoordinates::Degree)); } void GlobeGPS::reload() diff --git a/qt-ui/globe.h b/qt-ui/globe.h index 44e50b6ed..41e95735c 100644 --- a/qt-ui/globe.h +++ b/qt-ui/globe.h @@ -31,6 +31,7 @@ private: public Q_SLOTS: void changeDiveGeoPosition(qreal lon,qreal lat,GeoDataCoordinates::Unit); + void mouseClicked(qreal lon, qreal lat, GeoDataCoordinates::Unit); }; #endif |