2 import com.nokia.meego 1.0
3 import "UIConstants.js" as UIConstants
4 import "ExtrasConstants.js" as ExtrasConstants
13 ToolIcon { iconId: "toolbar-back"; onClicked: { menu.close(); pageStack.pop(null,false); } }
19 anchors.margins: UIConstants.DEFAULT_MARGIN
21 contentHeight: content_column.height + 2 * UIConstants.DEFAULT_MARGIN
22 flickableDirection: Flickable.VerticalFlick
24 Component.onCompleted: {
25 var updateAvailable = config.checkStationsUpdate();
26 if (updateAvailable) {
27 btnUpdate.color = "green"
33 spacing: UIConstants.DEFAULT_MARGIN
37 text: qsTr("Settings")
38 font.pixelSize: UIConstants.FONT_XLARGE
39 color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
40 anchors.left: parent.left
44 anchors.left: parent.left
45 anchors.right: parent.right
48 anchors.left: parent.left
49 font.pixelSize: UIConstants.FONT_LARGE
50 color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
51 anchors.verticalCenter: parent.verticalCenter
55 anchors.right: parent.right
56 checked: config.getGpsEnabled()
59 var gps = config.setGpsEnabled(checked);
61 // Unable to set config
65 positionSource.active = checked;
68 positionSource.start();
70 positionSource.stop();
81 anchors.left: parent.left
82 anchors.right: parent.right
84 text: "Update stations"
85 anchors.left: parent.left
86 font.pixelSize: UIConstants.FONT_LARGE
87 color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
88 anchors.verticalCenter: parent.verticalCenter
93 anchors.right: parent.right
97 Component.onCompleted: {
98 if (config.checkStationsUpdate()) {
99 btnUpdate.color = "green"
104 var updateAvailable = config.checkStationsUpdate();
105 if (updateAvailable) {
106 var updated = config.updateStations();
107 if (updated !== '') {
108 updateDialog.text = "Stations updated\nPlease restart app"
109 txtLastUpdate.text = updated
111 updateDialog.text = "[UpdateError]:\nTry again later or send me an email:\n<gotovienna@logic.at>"
114 updateDialog.text = "No updates available";
122 anchors.left: parent.left
123 anchors.right: parent.right
125 anchors.left: parent.left
126 text: "Last updated:"
127 font.pixelSize: UIConstants.FONT_LSMALL
128 color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
129 anchors.verticalCenter: parent.verticalCenter
133 anchors.right: parent.right
134 text: config.getLastUpdate()
135 font.pixelSize: UIConstants.FONT_LSMALL
136 color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
137 anchors.verticalCenter: parent.verticalCenter