summaryrefslogtreecommitdiffstats
path: root/app/TbtBoard.qml
blob: 333bc0e7a7cbc49d242faf4c493bc4d739587c5b (plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import QtQuick 2.0

//turn by turn board view
Item {
    id: tbt_board

    // turn direction arrow board image
    Image {
        id: turnDirectionBoard
        visible: true
        anchors.centerIn: parent
        z: 3
    }

    // the cases of direction arrow board
    states: [
        State {
            name: "0" // NoDirection
            PropertyChanges { target: turnDirectionBoard; source: "" }
        },
        State {
            name: "1" // DirectionForward
            PropertyChanges { target: turnDirectionBoard; source: "" }
        },
        State {
            name: "2" // DirectionBearRight
            PropertyChanges { target: turnDirectionBoard; source: "" }
        },
        State {
            name: "3" // DirectionLightRight
            PropertyChanges { target: turnDirectionBoard; source: "qrc:arrow-r-30-full.png" }
        },
        State {
            name: "4" // DirectionRight
            PropertyChanges { target: turnDirectionBoard; source: "qrc:arrow-r-45-full.png" }
        },
        State {
            name: "5" // DirectionHardRight
            PropertyChanges { target: turnDirectionBoard; source: "qrc:arrow-r-75-full.png" }
        },
        State {
            name: "6" // DirectionUTurnRight
            //TODO modify qtlocation U-Turn best.For test, change app source.
            PropertyChanges { target: turnDirectionBoard; source: "qrc:arrow-l-180-full.png" }
        },
        State {
            name: "7" // DirectionUTurnLeft
            //TODO modify qtlocation U-Turn best.For test, change app source.
            PropertyChanges { target: turnDirectionBoard; source: "qrc:arrow-r-180-full.png" }
        },
        State {
            name: "8" // DirectionHardLeft
            PropertyChanges { target: turnDirectionBoard; source: "qrc:arrow-l-75-full.png" }
        },
        State {
            name: "9" // DirectionLeft
            PropertyChanges { target: turnDirectionBoard; source: "qrc:arrow-l-45-full.png" }
        },
        State {
            name: "10" // DirectionLightLeft
            PropertyChanges { target: turnDirectionBoard; source: "qrc:arrow-l-30-full.png" }
        },
        State {
            name: "11" // DirectionBearLeft
            PropertyChanges { target: turnDirectionBoard; source: "" }
        },
        State {
            name: "12" //arrive the destination
            PropertyChanges { target: turnDirectionBoard; source: "qrc:destination_full.png" }
        },
        State {
            name: "invisible"
            PropertyChanges { target: turnDirectionBoard; source: "" }
        }

    ]

}