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
48 anchors.left: parent.left
49 anchors.right: parent.right
52 anchors.left: parent.left
53 font.pixelSize: UIConstants.FONT_LARGE
54 color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
55 anchors.verticalCenter: parent.verticalCenter
59 anchors.right: parent.right
60 checked: config.getGpsEnabled()
63 var gps = config.setGpsEnabled(checked);
65 // Unable to set config
69 positionSource.active = checked;
72 positionSource.start();
74 positionSource.stop();
90 anchors.horizontalCenter: parent.horizontalCenter
91 text: "Update stations"
92 width: parent.width * .7
94 Component.onCompleted: {
95 if (config.checkStationsUpdate()) {
96 btnUpdate.color = "green"
101 var updateAvailable = config.checkStationsUpdate();
102 if (updateAvailable) {
103 var updated = config.updateStations();
104 if (updated !== '') {
105 updateDialog.text = "Stations updated\nPlease restart app"
106 txtLastUpdate.text = updated
108 updateDialog.text = "[UpdateError]:\nTry again later or send me an email:\n<gotovienna@logic.at>"
111 updateDialog.text = "No updates available";
118 anchors.left: parent.left
119 anchors.right: parent.right
121 anchors.left: parent.left
122 text: "Last updated:"
123 font.pixelSize: UIConstants.FONT_LSMALL
124 color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
125 anchors.verticalCenter: parent.verticalCenter
129 anchors.right: parent.right
130 text: config.getLastUpdate()
131 font.pixelSize: UIConstants.FONT_LSMALL
132 color: !theme.inverted ? UIConstants.COLOR_FOREGROUND : UIConstants.COLOR_INVERTED_FOREGROUND
133 anchors.verticalCenter: parent.verticalCenter