Skip to content
This repository was archived by the owner on Feb 19, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion About.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
4 changes: 2 additions & 2 deletions Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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})
}
}
]
Expand Down
16 changes: 4 additions & 12 deletions WebMap.qml → QMLMap.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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<result.length; i++) {
//gpxmodel.append(result[i]);
//gpxtrack.push ("{ latitude: " + result[i].latitude + ", longitude: " + result[i].longitude + " },");
pline.addCoordinate(QtPositioning.coordinate(result[i].latitude,result[i].longitude));
//console.log("==========================");
//console.log(gpxtrack[i]);
//console.log(result[i].longitude);
//console.log("==========================");
}
console.log("fin du script");
map.center = QtPositioning.coordinate(result[i/2].latitude,result[i/2].longitude); // Center the map on the center of the track
});
});
}//Component.onCompleted
//path : gpxtrack;
}

/*ListView {
Expand All @@ -67,7 +59,7 @@ Page {
id: map
anchors.fill: parent
center: QtPositioning.coordinate(29.62289936, -95.64410114) // Oslo
zoomLevel: map.maximumZoomLevel - 8
zoomLevel: map.maximumZoomLevel - 5
plugin : Plugin {
id: plugin
allowExperimental: true
Expand Down
44 changes: 0 additions & 44 deletions html/map.html

This file was deleted.

10 changes: 5 additions & 5 deletions po/activitytracker.ernest.pot
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -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 ""
Expand Down Expand Up @@ -50,6 +46,10 @@ msgid ""
"target=\"_blank\">CC 3.0 BY</a>\""
msgstr ""

#: ../QMLMap.qml:18
msgid "Activity Map"
msgstr ""

#: ../Settings.qml:14 ../Main.qml:215
msgid "Settings"
msgstr ""
Expand Down
File renamed without changes.
20 changes: 20 additions & 0 deletions py/geepeeex.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down