anchors.horizontalCenter: parent.horizontalCenter;
anchors.verticalCenter: parent.verticalCenter;
- Text { id: lang; anchors.bottom: langname.top; text: "Hi, i'm Navit!"; color: "White" }
- Text { id: langname; anchors.centerIn: parent; text: "Hi, i'm Navit!"; color: "White" }
- Text { id: ctryname; anchors.top: langname.bottom; text: "Hi, i'm Navit!"; color: "White" }
+ Text { id: lang; anchors.bottom: langname.top; text: gui.localeName; color: "White" }
+ Text { id: langname; anchors.centerIn: parent; text: gui.langName; color: "White" }
+ Text { id: ctryname; anchors.top: langname.bottom; text: gui.ctryName; color: "White" }
}
Cellar {anchors.bottom: page.bottom; anchors.horizontalCenter: page.horizontalCenter; width: page.width }
anchors.verticalCenter: parent.verticalCenter;\r
spacing: 64\r
ToggleSwitch {\r
- on: navit.getAttr("tracking"); text: "Lock on road"\r
+ id: trackingSw; on: navit.getAttr("tracking"); text: "Lock on road"; onChanged: navit.setAttr("tracking",trackingSw.on)\r
}\r
ToggleSwitch {\r
- on: navit.getAttr("orientation"); text: "Northing"
+ id: orientationSw; on: navit.getAttr("orientation"); text: "Northing"; onChanged: navit.setAttr("orientation",orientationSw.on)
}\r
ToggleSwitch {\r
- on: navit.getAttr("follow_cursor"); text: "Map follows Vehicle"\r
+ id: followrcursorSw; on: navit.getAttr("follow_cursor"); text: "Map follows Vehicle"; onChanged: navit.setAttr("follow_cursor",followrcursorSw.on)\r
}\r
}\r
\r
\r
property string on: "false"\r
property string text: "Toggle switch"\r
+ signal changed\r
\r
function toggle() {\r
if (toggleswitch.state == "on")\r
State {\r
name: "on"\r
PropertyChanges { target: knob; x: 78 }\r
+ PropertyChanges { target: toggleswitch; on: "true" }\r
+ StateChangeScript { script: toggleswitch.changed(); }\r
},\r
State {\r
name: "off"\r
PropertyChanges { target: knob; x: 1 }\r
+ PropertyChanges { target: toggleswitch; on: "false" }\r
+ StateChangeScript { script: toggleswitch.changed(); }\r
}\r
]\r
\r