mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
6f979b48ed
commit
b533cf299f
2 changed files with 8 additions and 0 deletions
|
@ -54,6 +54,13 @@ GlobeGPS::GlobeGPS(QWidget* parent) : MarbleWidget(parent), loadedDives(0)
|
||||||
setShowOverviewMap(false);
|
setShowOverviewMap(false);
|
||||||
setShowScaleBar(true);
|
setShowScaleBar(true);
|
||||||
setShowCompass(false);
|
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()
|
void GlobeGPS::reload()
|
||||||
|
|
|
@ -31,6 +31,7 @@ private:
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void changeDiveGeoPosition(qreal lon,qreal lat,GeoDataCoordinates::Unit);
|
void changeDiveGeoPosition(qreal lon,qreal lat,GeoDataCoordinates::Unit);
|
||||||
|
void mouseClicked(qreal lon, qreal lat, GeoDataCoordinates::Unit);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue