summaryrefslogtreecommitdiffstats
path: root/qt-ui/globe.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-06-05 14:44:12 +0900
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-06-05 14:44:12 +0900
commitb533cf299fba1b2d9dd4737f109caf5aba042d7a (patch)
tree98c819b64ddf6ad68c064a4a70937d27fb653f43 /qt-ui/globe.cpp
parent6f979b48edf0e264a209e99d2164c7b4e8d925f4 (diff)
downloadsubsurface-b533cf299fba1b2d9dd4737f109caf5aba042d7a.tar.gz
Get single click on the map widget in a callback for further processing
Now Linus can write the code that selects the right dives... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/globe.cpp')
-rw-r--r--qt-ui/globe.cpp7
1 files changed, 7 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()