aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArseniy Movshev <dodoradio@outlook.com>2023-01-18 22:42:34 +0000
committerArseniy Movshev <dodoradio@outlook.com>2023-01-18 23:05:26 +0000
commitc9adddb2f5a4f5995fefc4ce2859d8a04c0a5caa (patch)
treef3a9a64e4358e7f76e04b38639987f26444d028a /src
parent0a2066cdb82f5ad91fc54f04d55d22e3380f0b51 (diff)
add a date display to waypoint page and fix date
- Fix date recording (again) - correctly load both date displays in the waypoint page
Diffstat (limited to '')
-rw-r--r--src/SetPointPage.qml13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/SetPointPage.qml b/src/SetPointPage.qml
index 9501db4..624e48d 100644
--- a/src/SetPointPage.qml
+++ b/src/SetPointPage.qml
@@ -20,7 +20,8 @@ Item {
root.coord = QtPositioning.coordinate(currWaypointData[1][0],currWaypointData[1][1])
root.selectedIcon = currWaypointData[0]
root.selectedColor = currWaypointData[2]
- textbox.text = currWaypointData[3]
+ textBox.text = currWaypointData[3]
+ dateLabel.text = Qt.formatDateTime(currWaypointData[4])
} else {
editIndex = waypointArray.length
selectedColor = colors.secondary
@@ -46,7 +47,13 @@ Item {
width: parent.width
height: parent.width*0.2
previewText: "Waypoint name"
- text: Date.toLocaleString()
+ text: Qt.formatDateTime(new Date)
+ }
+ Asteroid.Label {
+ id: dateLabel
+ width: parent.width
+ height: root.width*0.1
+ visible: editMode
}
ListView {
id: iconSelectorView
@@ -117,7 +124,7 @@ Item {
writebuffer[1] = [coord.latitude,coord.longitude]
writebuffer[2] = selectedColor //the colors.secondary is currently a placeholder. it would be nice to let users select colours, but I CBA to write a colour picker right now
writebuffer[3] = textBox.text
- writebuffer[4] = Date
+ writebuffer[4] = new Date()
waypointArray[index] = writebuffer
waypointList.value = JSON.stringify(waypointArray)
setPointControls.visible = false