-
Notifications
You must be signed in to change notification settings - Fork 18
/
Settings.qml
35 lines (31 loc) · 1.04 KB
/
Settings.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import QtQuick 2.3
import QtPositioning 5.2
import Ubuntu.Components 1.1
import QtQuick.Layouts 1.1
import io.thp.pyotherside 1.4
import QtSystemInfo 5.0
import QtLocation 5.2
import ubuntu_component_store.Curated.PageWithBottomEdge 1.0
import ubuntu_component_store.Curated.EmptyState 1.0
import Ubuntu.Components.ListItems 1.0 as ListItem
import Ubuntu.Components.Popups 1.0
import "./lib/polyline.js" as Pl
import "./keys.js" as Keys
Page {
title: "Units"
id:settings
ListItem.ItemSelector {
text: i18n.tr("Units")
model: [i18n.tr("Kilometers"),
i18n.tr("Miles")]
selectedIndex: switch(runits) {
case "kilometers": return 0;
case "miles": return 1;
}
onSelectedIndexChanged: {
console.warn(model[selectedIndex].toLowerCase())
runits=model[selectedIndex].toLowerCase()
pygpx.set_units(model[selectedIndex].toLowerCase())
}
}
}