diff --git a/About.qml b/About.qml index 2996a17..8bc377e 100644 --- a/About.qml +++ b/About.qml @@ -54,7 +54,7 @@ Page { width: parent.width Text { - text: "© 2016-2018 Erne st & Michele Castellazzi" + text: "© 2018 Erne st & Michele Castellazzi" anchors.horizontalCenter: parent.horizontalCenter } diff --git a/CMakeLists.txt b/CMakeLists.txt index 8615a5d..78def4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,7 +37,6 @@ file(GLOB QML_FILES *.qml) configure_file(manifest.json.in ${CMAKE_CURRENT_BINARY_DIR}/manifest.json) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json DESTINATION ${CMAKE_INSTALL_PREFIX}) install(FILES ${PROJECT_NAME}.apparmor DESTINATION ${DATA_DIR}) -install(DIRECTORY html DESTINATION ${DATA_DIR}) install(DIRECTORY images DESTINATION ${DATA_DIR}) install(DIRECTORY lib DESTINATION ${DATA_DIR}) install(DIRECTORY py DESTINATION ${DATA_DIR}) diff --git a/Main.qml b/Main.qml index dc3efc1..7dceb41 100644 --- a/Main.qml +++ b/Main.qml @@ -267,7 +267,7 @@ MainView { delegate: ListItem { id :del onClicked: { - stack.push(Qt.resolvedUrl('WebMap.qml'), {polyline: polyline}) + stack.push(Qt.resolvedUrl('QMLMap.qml'), {polyline: filename}) } ListItemLayout { @@ -300,7 +300,7 @@ MainView { Action { iconName: "add" onTriggered: { - stack.push(Qt.resolvedUrl('WebMapQml.qml'), {polyline: polyline}) + stack.push(Qt.resolvedUrl('QMLMapQml.qml'), {polyline: filename}) } } ] diff --git a/WebMap.qml b/QMLMap.qml similarity index 71% rename from WebMap.qml rename to QMLMap.qml index fa90aa8..8a71ab7 100644 --- a/WebMap.qml +++ b/QMLMap.qml @@ -25,25 +25,17 @@ Page { Component.onCompleted: { addImportPath(Qt.resolvedUrl('py/')); importModule("geepeeex", function() { - console.warn("call python script") + console.warn("calling python script to load the gpx file") pygpx.call("geepeeex.visu_gpx", [polyline], function(result) { - console.warn("loading gpx file") var t = new Array (0) - map.center = QtPositioning.coordinate(result[1].latitude,result[1].longitude); + //map.center = QtPositioning.coordinate(result[10].latitude,result[10].longitude); // Allow a delay in case of the recording start with cell tower position for (var i=0; i - - - -A simple map - - - - - - - - - -
- - - diff --git a/po/activitytracker.ernest.pot b/po/activitytracker.ernest.pot index 36cfbf1..595b730 100644 --- a/po/activitytracker.ernest.pot +++ b/po/activitytracker.ernest.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: activitytracker.ernest\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-08-01 15:35+0000\n" +"POT-Creation-Date: 2018-08-02 03:47+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,10 +17,6 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: ../WebMap.qml:18 -msgid "Activity Map" -msgstr "" - #: ../About.qml:7 ../Main.qml:220 msgid "About" msgstr "" @@ -50,6 +46,10 @@ msgid "" "target=\"_blank\">CC 3.0 BY\"" msgstr "" +#: ../QMLMap.qml:18 +msgid "Activity Map" +msgstr "" + #: ../Settings.qml:14 ../Main.qml:215 msgid "Settings" msgstr "" diff --git a/po/fr_FR.po b/po/fr.po similarity index 100% rename from po/fr_FR.po rename to po/fr.po diff --git a/py/geepeeex.py b/py/geepeeex.py index 32d39d7..bbeeaf7 100644 --- a/py/geepeeex.py +++ b/py/geepeeex.py @@ -31,6 +31,26 @@ def create_gpx(): # Create points: return gpx +def visu_gpx(file): + temp = [] + GPXFILE = file + gpx_file = open(GPXFILE, 'r') + gpx = gpxpy.parse(gpx_file) +# Load the GPS coordinates + for track in gpx.tracks: + for segment in track.segments: + for point in segment.points: + #print '{{ latitude: {0}, longitude: {1}}},'.format(point.latitude, point.longitude) + element = { + 'latitude': point.latitude, + 'longitude': point.longitude, + } + temp.append(element) + zip(temp) + return temp +# Ajouter le transfert dans une liste comme umark + + def write_gpx(gpx,name,act_type): # You can add routes and waypoints, too... tzname=None