diff options
author | 2024-09-10 19:15:25 +0900 | |
---|---|---|
committer | 2024-09-11 18:40:18 +0900 | |
commit | 5c8f09d2c3c99f621b467ed5c1be4fac3a708e85 (patch) | |
tree | 9312e269961b14945a00db47ed236ca53ffbb149 /GUIModel/Map/Map.qml | |
parent | 17b016d08cf1680f58cbb9102f35949c8436207c (diff) |
Port the cluster-refgui demo supports both Qt5 and Qt6HEADtrout_19.90.0trout/19.90.019.90.0master
This demo can now run on both Qt5 and Qt6, also added a macro to switch with or without the backend so that it can be developed easily on the Windows desktop.
Bug-AGL: SPEC-5243
Change-Id: I99b12ad9779a477784df13b83a850387747bb588
Signed-off-by: Jiu Shanheng <shanheng.jiu@qt.io>
Diffstat (limited to 'GUIModel/Map/Map.qml')
-rw-r--r-- | GUIModel/Map/Map.qml | 69 |
1 files changed, 35 insertions, 34 deletions
diff --git a/GUIModel/Map/Map.qml b/GUIModel/Map/Map.qml index d9ab347..1d4fa90 100644 --- a/GUIModel/Map/Map.qml +++ b/GUIModel/Map/Map.qml @@ -16,55 +16,59 @@ import QtQuick 2.14 import QtMultimedia 5.14 -import QtGraphicalEffects 1.14 Item { id: map - x:1920 - 1200 - y:0 - width : 1200 - height : 720 + x: 1920 - 1200 + y: 0 + width: 1200 + height: 720 Component.onCompleted: { - mapVideo.play() + mapVideo.play(); } - Connections{ + Connections { target: rootItem - onTransNormalToAdas:{ - } + onTransNormalToAdas: {} - onTransAdasToMap:{ - adasToMapAnimationMap.start() + onTransAdasToMap: { + adasToMapAnimationMap.start(); } - onTransMapToNormal:{ - mapToNormalAnimationMap.start() + onTransMapToNormal: { + mapToNormalAnimationMap.start(); } } - Item{ + Item { id: mapParts - visible:false + visible: false anchors.fill: parent - Item{ - id:mapMask + Item { + id: mapMask x: 0 y: 0 - Image{ + Image { width: 1200 height: 720 source: "qrc:/Images/ADASView/MAP/map_mask.ktx" } - Image{ source:"qrc:/Images/ADASView/MAP/acc_cover.ktx"; width:1412; height:98; x:508-map.x; y:622 } + Image { + source: "qrc:/Images/ADASView/MAP/acc_cover.ktx" + width: 1412 + height: 98 + x: 508 - map.x + y: 622 + } } - } + } - SequentialAnimation{ - id:adasToMapAnimationMap - onStarted: rootItem.focus=false - onStopped: rootItem.focus=true + SequentialAnimation { + id: adasToMapAnimationMap + onStarted: rootItem.focus = false + onStopped: rootItem.focus = true PauseAnimation { duration: 330 @@ -77,24 +81,23 @@ Item { to: true } - PropertyAnimation{ + PropertyAnimation { target: mapParts property: "opacity" duration: 330 - from:0 - to:1 + from: 0 + to: 1 } } - SequentialAnimation{ - id:mapToNormalAnimationMap - onStarted: rootItem.focus=false + SequentialAnimation { + id: mapToNormalAnimationMap + onStarted: rootItem.focus = false PauseAnimation { duration: 254 } - - PropertyAnimation{ + PropertyAnimation { target: mapParts property: "opacity" duration: 330 @@ -109,6 +112,4 @@ Item { to: false } } - - } |