mapwidget.qml: call "copy to clipboard" actions in the maphelper C++

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
Lubomir I. Ivanov 2017-07-21 17:33:01 +03:00 committed by Dirk Hohndel
parent 3624d30354
commit 66b2f0c88c

View file

@ -148,16 +148,15 @@ Item {
id: contextMenu id: contextMenu
y: 10; x: map.width - y y: 10; x: map.width - y
onActionSelected: { onActionSelected: {
// TODO: perform action actions
switch (action) { switch (action) {
case contextMenu.actions.OPEN_LOCATION_IN_GOOGLE_MAPS: case contextMenu.actions.OPEN_LOCATION_IN_GOOGLE_MAPS:
openLocationInGoogleMaps(map.center.latitude, map.center.longitude) openLocationInGoogleMaps(map.center.latitude, map.center.longitude)
break; break;
case contextMenu.actions.COPY_LOCATION_DECIMAL: case contextMenu.actions.COPY_LOCATION_DECIMAL:
console.log("COPY_LOCATION_DECIMAL"); mapHelper.copyToClipboardCoordinates(map.center, false);
break; break;
case contextMenu.actions.COPY_LOCATION_SEXAGESIMAL: case contextMenu.actions.COPY_LOCATION_SEXAGESIMAL:
console.log("COPY_LOCATION_SEXAGESIMAL"); mapHelper.copyToClipboardCoordinates(map.center, true);
break; break;
} }
} }