blob: da6d256b2c7c0facc9eef74ec16e1927c3ac46f3 (
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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
|
import QtQuick 2.0
import "../AppLink/Com"
import "../windowsList.js" as WindowsList
import "../layoutList.js" as Layout
Image{
id: app_home
x: 0
y: 0
width: 960
height: 960
property string imagePath: "/usr/bin/qml_link_upgrade/images/AppLink/"
source: systemCtrlLinkUpgrade.getBackGroundType()
property bool bConnected : true
Component.onCompleted:{
check_timer.start()
upgrade_timer.start()
}
onVisibleChanged:{
if(visible){
console.log("-----[applinkupgrade]------home page visible---")
}
}
HMIButton{
id: naviBtn
visible:bConnected
x:158
y:238-160
btnImg: imagePath+"Type_I_Home/I_02_Home/M8X_icon_Navi.png"
btnImgOnPressed: imagePath+"Type_I_Home/I_02_Home/M8X_icon_Navi_p.png"
onClicked:{
}
}
HMILabel{
x:152
y:417-160
font.pixelSize:26
width:156
height:28
text: qsTr("导航") + applinkControlUpgrade.qsEmptyString
clip:true
visible:bConnected
}
HMIButton{
id: weatherBtn
visible:bConnected
x:408
y:238-160
btnImg: imagePath+"Type_I_Home/I_02_Home/M8X_icon_Weather.png"
btnImgOnPressed: imagePath+"Type_I_Home/I_02_Home/M8X_icon_Weather_p.png"
onClicked:{
}
}
HMILabel{
x:402
y:417-160
font.pixelSize:26
width:156
height:28
text: qsTr("天气") + applinkControlUpgrade.qsEmptyString
color: "white"
clip:true
visible:bConnected
}
HMIButton{
id: newsBtn
visible:bConnected
x:658
y:238-160
btnImg: imagePath+"Type_I_Home/I_02_Home/M8X_icon_News.png"
btnImgOnPressed: imagePath+"Type_I_Home/I_02_Home/M8X_icon_News_p.png"
onClicked:{
}
}
HMILabel{
x:652
y:417-160
font.pixelSize:26
width:156
height:28
text: qsTr("新闻") + applinkControlUpgrade.qsEmptyString
color: "white"
clip:true
visible:bConnected
}
HMIButton{
id: fmBtn
visible:bConnected
x:158
y:508-160
btnImg: imagePath+"Type_I_Home/I_02_Home/M8X_icon_Himalayan.png"
btnImgOnPressed: imagePath+"Type_I_Home/I_02_Home/M8X_icon_Himalayan_p.png"
onClicked:{
}
}
HMILabel{
x:152
y:687-160
font.pixelSize:26
width:156
height:28
text: qsTr("喜马拉雅") + applinkControlUpgrade.qsEmptyString
color: "white"
clip:true
visible:bConnected
}
HMIButton{
id: bdBtn
visible:bConnected
x:408
y:508-160
btnImg: imagePath+"Type_I_Home/I_02_Home/M8X_icon_baidumusic.png"
btnImgOnPressed: imagePath+"Type_I_Home/I_02_Home/M8X_icon_baidumusic_p.png"
onClicked:{
}
}
HMILabel{
x:402
y:687-160
font.pixelSize:26
width:156
height:28
text: qsTr("百度音乐") + applinkControlUpgrade.qsEmptyString
color: "white"
clip:true
visible:bConnected
}
HMILabel{
id:plugUSB
visible:false
anchors.horizontalCenter:parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 425
font.pixelSize:30
text: "请通过USB数据线或蓝牙连接车机和手机。"
color: "white"
clip:true
}
App_Com_Newspopup{
id:popMsg_doInstall
z: 3
labelCount: 2
newspopText1: qsTr("升级中...") + applinkControlUpgrade.qsEmptyString
newspopText2: qsTr("请不要进行其他操作!") + applinkControlUpgrade.qsEmptyString
visible:false
bIsTouchClear:false
backgroundImage : ""
yOffset: -75
}
App_Com_Newspopup{
id:popMsg_upgradeDone
z: 3
labelCount: 3
newspopText1: qsTr("升级成功!") + applinkControlUpgrade.qsEmptyString
newspopText2: qsTr("请拔出USB数据线重新连接该车机与手机;") + applinkControlUpgrade.qsEmptyString
newspopText3: qsTr("或者将互联手机“九州行地图【互联版】”APP退出后重启。") + applinkControlUpgrade.qsEmptyString
visible:false
bIsTouchClear:false
yOffset: -75
}
App_Com_Popup2btn{
id:popMsg_upgradeFailed
newspopText: qsTr("升级失败,是否重试?") + applinkControlUpgrade.qsEmptyString
btnTextLeft: qsTr("是") + applinkControlUpgrade.qsEmptyString
btnTextRight: qsTr("否") + applinkControlUpgrade.qsEmptyString
onSignal_btnLeftClick:{
popMsg_upgradeFailed.visible=false
popMsg_doInstall.visible = true
loadingIcon.visible = true
applinkControlUpgrade.QML_do_install();
}
onSignal_btnRightClick:{
popMsg_upgradeFailed.visible=false
applinkControlUpgrade.QML_UFS_DeleteFile("/var/cache/version.ini")
applinkControlUpgrade.QML_UFS_DeleteFile("/var/cache/applink.tar.bz2")
applinkControlUpgrade.QML_HideAppLinkUpgrade()
applinkControlUpgrade.QML_ShowAppLink()
}
}
App_Loading{
id:loadingIcon
z: 4
loadingPath: imagePath+"Common/Loading_60/"
surname: "M8X_Loading_60_"
anchors.horizontalCenter:parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 450
visible:false
}
Timer{
id:show_timer
interval: 5000
onTriggered: {
popMsg_upgradeDone.visible = false
applinkControlUpgrade.QML_HideAppLinkUpgrade()
applinkControlUpgrade.QML_ShowAppLink()
}
}
Timer{
id:upgrade_timer
interval: 2000
onTriggered: {
if (applinkControlUpgrade.QML_UFS_CheckFileExists("/var/cache/version.ini"))
{
applinkControlUpgrade.QML_ShowAppLinkUpgrade()
popMsg_doInstall.visible = true
loadingIcon.visible = true
applinkControlUpgrade.QML_do_install();
//console.log("[-------------------------QML_do_install-------------------------]")
}
else
{
upgrade_timer.restart()
}
}
}
Timer{
id:check_timer
interval: 1000
repeat: true
onTriggered: {
if (applinkControlUpgrade.QML_UFS_CheckFileExists("/var/cache/upgradefailed"))
{
popMsg_doInstall.visible = false
loadingIcon.visible = false
popMsg_upgradeFailed.newspopText = qsTr("升级失败,是否重试?") + applinkControlUpgrade.qsEmptyString
popMsg_upgradeFailed.visible = true
applinkControlUpgrade.QML_UFS_DeleteFile("/var/cache/upgradefailed")
}
else if (applinkControlUpgrade.QML_UFS_CheckFileExists("/var/cache/upgradesuccess"))
{
popMsg_doInstall.visible = false
loadingIcon.visible = false
applinkControlUpgrade.QML_UFS_DeleteFile("/var/cache/upgradesuccess")
applinkControlUpgrade.QML_UFS_DeleteFile("/var/cache/applink.tar.bz2")
popMsg_upgradeDone.visible = true
show_timer.start()
}
}
}
//底部动能栏
Row{
id: functionArea
y:1041-161
HMIButton{
id: quitBtn
btnImgOnPressed: imagePath +"Common/M8X_Function_close_Button_p.png"
btnImg: imagePath+"Common/M8X_Function_close_Button.png"
btnIcon: imagePath+"Common/M8X_icon_close.png"
onClicked:{
applinkControlUpgrade.QML_HideAppLinkUpgrade()
}
}
HMIButton{
id: nosw
enabled: false
btnImgOnPressed: imagePath +"Common/M8X_Function_1_Button_NoSwitch_p.png"
btnImg: imagePath+"Common/M8X_Function_1_Button_NoSwitch.png"
}
}
Connections{
target:applinkControlUpgrade
onSignal_sspLinkStatusChanged:{
bConnected = bIsConnectPhone;
if(bConnected){
}
}
onSignal_DoInstallEnd:{
console.log("onSignal_DoInstallEnd")
popMsg_doInstall.visible = false
applinkControlUpgrade.QML_UFS_DeleteFile("/var/cache/applink.tar.bz2")
popMsg_upgradeDone.visible = true
show_timer.start()
}
onSignal_DoInstallFailed:{
console.log("onSignal_DoInstallFailed")
popMsg_doInstall.visible = false
popMsg_upgradeFailed.newspopText = qsTr("升级失败,是否重试?") + applinkControlUpgrade.qsEmptyString
popMsg_upgradeFailed.visible = true
}
onSignalChangeBackground:{
app_home.source = qstrPath
}
}
}
|