diff options
author | zheng_wenlong <wenlong_zheng@nexty-ele.com> | 2019-06-06 16:31:25 +0900 |
---|---|---|
committer | zheng_wenlong <wenlong_zheng@nexty-ele.com> | 2019-06-06 16:31:25 +0900 |
commit | 9ee98a06160ee2b234e92db70eb18e128fc76e5d (patch) | |
tree | d144be711339162d8fb8662ac868cc3677318072 /app/TbtBoard.qml | |
parent | 61a91b68c0c895714ea8d612fc752ad4b5cf56ef (diff) |
add hubtbtsandbox/zheng_wenlong/hubtbt
Diffstat (limited to 'app/TbtBoard.qml')
-rw-r--r-- | app/TbtBoard.qml | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/app/TbtBoard.qml b/app/TbtBoard.qml new file mode 100644 index 0000000..333bc0e --- /dev/null +++ b/app/TbtBoard.qml @@ -0,0 +1,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: "" } + } + + ] + +} |