summaryrefslogtreecommitdiffstats
path: root/recipes-demo/navigation/ondemandnavi/0001-Migrate-to-Qt-6.patch
blob: 45a690c24449ac8068090778c70eef0025fc59cc (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
From f12a16fd4b959eb47c9ba88af1d80c31a7cd7f20 Mon Sep 17 00:00:00 2001
From: Indivara Weerasuriya <1806262-indivara@users.noreply.git.qt.io>
Date: Wed, 24 Jul 2024 09:32:44 +0900
Subject: [PATCH] Migrate to Qt 6

---
 app/BtnArrow.qml                |  4 +--
 app/BtnEnlarge.qml              |  4 +--
 app/BtnGuidance.qml             |  8 ++---
 app/BtnMapDirection.qml         |  4 +--
 app/BtnPresentPosition.qml      |  4 +--
 app/BtnShrink.qml               |  4 +--
 app/ImgDestinationDirection.qml |  2 +-
 app/ProgressNextCross.qml       | 59 ++++++++++++++++++++++++++++-----
 app/app.pro                     |  2 +-
 app/navigation.qml              | 19 ++++-------
 10 files changed, 72 insertions(+), 38 deletions(-)

diff --git a/app/BtnArrow.qml b/app/BtnArrow.qml
index 2039865..5a999c9 100644
--- a/app/BtnArrow.qml
+++ b/app/BtnArrow.qml
@@ -1,5 +1,5 @@
-import QtQuick 2.0
-import QtQuick.Controls 1.5
+import QtQuick
+import QtQuick.Controls
 
 Item {
 	Button {
diff --git a/app/BtnEnlarge.qml b/app/BtnEnlarge.qml
index cc158ad..eafee56 100644
--- a/app/BtnEnlarge.qml
+++ b/app/BtnEnlarge.qml
@@ -1,5 +1,5 @@
-import QtQuick 2.0
-import QtQuick.Controls 1.5
+import QtQuick
+import QtQuick.Controls
 
 Item {
 	Button {
diff --git a/app/BtnGuidance.qml b/app/BtnGuidance.qml
index 2130857..b6267df 100644
--- a/app/BtnGuidance.qml
+++ b/app/BtnGuidance.qml
@@ -1,7 +1,7 @@
-import QtQuick 2.0
-import QtQuick.Controls 1.5
-import QtLocation 5.9
-import QtPositioning 5.6
+import QtQuick
+import QtQuick.Controls
+import QtLocation
+import QtPositioning
 
 Item {
     id: btn_guidance
diff --git a/app/BtnMapDirection.qml b/app/BtnMapDirection.qml
index c56f0bf..cd703ff 100644
--- a/app/BtnMapDirection.qml
+++ b/app/BtnMapDirection.qml
@@ -1,5 +1,5 @@
-import QtQuick 2.0
-import QtQuick.Controls 1.5
+import QtQuick
+import QtQuick.Controls
 
 Item {
     Button {
diff --git a/app/BtnPresentPosition.qml b/app/BtnPresentPosition.qml
index 2734664..01761c8 100644
--- a/app/BtnPresentPosition.qml
+++ b/app/BtnPresentPosition.qml
@@ -1,5 +1,5 @@
-import QtQuick 2.0
-import QtQuick.Controls 1.5
+import QtQuick
+import QtQuick.Controls
 
 Item {
     id: btn_present_position
diff --git a/app/BtnShrink.qml b/app/BtnShrink.qml
index 23859dc..079d6d6 100644
--- a/app/BtnShrink.qml
+++ b/app/BtnShrink.qml
@@ -1,5 +1,5 @@
-import QtQuick 2.0
-import QtQuick.Controls 1.5
+import QtQuick
+import QtQuick.Controls
 
 Item {
 	Button {
diff --git a/app/ImgDestinationDirection.qml b/app/ImgDestinationDirection.qml
index e6ee5de..b80aca8 100644
--- a/app/ImgDestinationDirection.qml
+++ b/app/ImgDestinationDirection.qml
@@ -1,4 +1,4 @@
-import QtQuick 2.0
+import QtQuick
 
 Item {
 	id: img_destination_direction
diff --git a/app/ProgressNextCross.qml b/app/ProgressNextCross.qml
index 31e552c..a597c97 100644
--- a/app/ProgressNextCross.qml
+++ b/app/ProgressNextCross.qml
@@ -1,6 +1,5 @@
-import QtQuick 2.0
-import QtQuick.Controls 1.5
-import QtQuick.Controls.Styles 1.4
+import QtQuick
+import QtQuick.Controls
 
 Item {
 	id: progress_next_cross
@@ -24,14 +23,56 @@ Item {
 		id: bar
 		width: 25
 		height: 100
-        orientation: Qt.Vertical
+        rotation: 90
         value: 0
-        minimumValue: 0
-        maximumValue: 300
+        from: 0
+        to: 300
 
-        style: ProgressBarStyle {
-            progress: Rectangle {
-                color: "green"
+        background: Rectangle {
+            implicitWidth: 200
+            implicitHeight: 6
+            color: "#e6e6e6"
+            radius: 3
+        }
+
+        contentItem: Item {
+            implicitWidth: 200
+            implicitHeight: 4
+
+            // Progress indicator for determinate state.
+            Rectangle {
+                width: bar.visualPosition * parent.width
+                height: parent.height
+                radius: 2
+                color: "#17a81a"
+                visible: !bar.indeterminate
+            }
+
+            // Scrolling animation for indeterminate state.
+            Item {
+                anchors.fill: parent
+                visible: bar.indeterminate
+                clip: true
+
+                Row {
+                    spacing: 20
+
+                    Repeater {
+                        model: bar.width / 40 + 1
+
+                        Rectangle {
+                            color: "#17a81a"
+                            width: 20
+                            height: bar.height
+                        }
+                    }
+                    XAnimator on x {
+                        from: 0
+                        to: -40
+                        loops: Animation.Infinite
+                        running: bar.indeterminate
+                    }
+                }
             }
         }
 	}
diff --git a/app/app.pro b/app/app.pro
index 1a0a9c3..849810d 100644
--- a/app/app.pro
+++ b/app/app.pro
@@ -1,6 +1,6 @@
 TEMPLATE = app
 TARGET = navigation
-QT = core qml quick positioning
+QT = core qml quick positioning location
 CONFIG += c++11 link_pkgconfig
 
 PKGCONFIG += qtappfw-navigation qtappfw-vehicle-signals
diff --git a/app/navigation.qml b/app/navigation.qml
index 5cb3634..0d61d46 100644
--- a/app/navigation.qml
+++ b/app/navigation.qml
@@ -15,12 +15,12 @@
  * limitations under the License.
  */
 
-import QtQuick 2.6
-import QtQuick.Layouts 1.1
-import QtQuick.Controls 2.0
-import QtLocation 5.9
-import QtPositioning 5.6
-import QtQuick.Window 2.11
+import QtQuick
+import QtQuick.Layouts
+import QtQuick.Controls
+import QtLocation
+import QtPositioning
+import QtQuick.Window
 
 ApplicationWindow {
     id: root
@@ -476,13 +476,6 @@ ApplicationWindow {
             }
         }
 
-        gesture.onFlickStarted: {
-            btn_present_position.state = "Optional"
-        }
-        gesture.onPanStarted: {
-            btn_present_position.state = "Optional"
-        }
-
         function updatePositon() {
             if (!routeModel.get(0))
                 return;