1 |
import Qt 4.7
|
2 |
import "pagenavigation.js" as Navit
|
3 |
|
4 |
Rectangle {
|
5 |
id: page
|
6 |
|
7 |
width: gui.width; height: gui.height
|
8 |
border.width: 1
|
9 |
color: "Black"
|
10 |
opacity: 0
|
11 |
|
12 |
function pageOpen() {
|
13 |
page.opacity = 1;
|
14 |
}
|
15 |
|
16 |
Component.onCompleted: pageOpen();
|
17 |
|
18 |
Behavior on opacity {
|
19 |
NumberAnimation { id: opacityAnimation; duration: 300; alwaysRunToEnd: true }
|
20 |
}
|
21 |
|
22 |
VisualItemModel {
|
23 |
id: selectorsModel
|
24 |
|
25 |
ToggleSwitch { id: trackingSw; stOn: navit.getAttr("tracking"); text: "Lock on road"; onChanged: navit.setAttr("tracking",trackingSw.stOn) }
|
26 |
ToggleSwitch { id: orientationSw; stOn: navit.getAttr("orientation"); text: "Northing"; onChanged: navit.setAttr("orientation",orientationSw.stOn) }
|
27 |
ToggleSwitch { id: followcursorSw; stOn: navit.getAttr("follow_cursor"); text: "Map follows Vehicle"; onChanged: navit.setAttr("follow_cursor",followcursorSw.stOn) }
|
28 |
ToggleSwitch { id: autozoomSw; stOn: navit.getAttr("autozoom_active"); text: "Auto zoom"; onChanged: navit.setAttr("autozoom_active",autozoomSw.stOn) }
|
29 |
}
|
30 |
|
31 |
ListView {
|
32 |
id: selectorsList; model: selectorsModel
|
33 |
focus: true; clip: true; orientation: Qt.Vertical
|
34 |
anchors.verticalCenter: parent.verticalCenter; anchors.horizontalCenter: parent.horizontalCenter;
|
35 |
width: trackingSw.width*1.5; height: trackingSw.height*4
|
36 |
}
|
37 |
Cellar {anchors.bottom: page.bottom; anchors.horizontalCenter: page.horizontalCenter; width: page.width }
|
38 |
}
|