blob: edbc3394fff17d8fc5314b38f4bd0a919b1f5ad6 (
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
|
import QtQuick 2.0
import "AC.js" as ACState
Rectangle{
id:acstatebar
x:0
y:0
width: 960
height: 70
color: "black"
property string homestatebartimechangeset:acCtrl.homestatebartimechangeset()
property int acLanguage:acCtrl.get_language()
property int iHourMode:acCtrl.getHourMode()
property int iHour:acCtrl.iHour
property int iMinute:acCtrl.iMinute
property int isecond:acCtrl.isecond
property int chargeState:0
property int btsignal: 0
property int wifiLevel:0
property bool ampmVisible: false
Item
{
id:timeitem
x:-1//0 //add by plc for #344277 344448
y:2//0
width: 168
height: 48
visible: true
Text
{
id:today_time
x:420//423 //add by plc for #344277 344448
y:-7
width: 134
height: 48
color:"#ffffff"//add by lqy 4.17
font.pixelSize: 48
font.family: "Montserrat"
//wtitesize:1
//anchors.verticalCenter: parent.verticalCenter
Timer
{
id:timedisplay
interval: 1000
running: visible
repeat: true
triggeredOnStart: true
onTriggered:
{
timechangeset()
//console.log("####plc----->iHour = "+iHour)
}
}
}
Text
{
id:ampm
x:558//555//540-420 //add by plc for #344277 344448
y:22//29-2
width: 90
height: 20
color:"#afcbd8"//add by lqy0
font.family: "Montserrat"
font.pixelSize: 17
horizontalAlignment: Text.AlignLeft
visible:ampmVisible?((iHourMode == 1)&&(iHour != 0))?true:false:false
//visible:((iHourMode == 1)&&(iHour != 0))?true:false
text:(iHour < 12)?((acLanguage == 1)?"上午"
:(acLanguage == 2)?"Giờ sáng":"AM")
:((acLanguage == 1)?"下午"
:(acLanguage == 2)?"Giờ chiều":"PM")
}
Item
{
id:btphoneItem
x:239//239-236
y:9//11-8
width:12
height: 20
visible:false
Image
{
id:btsignalicon
source:(btsignal == 1)?("qrc:MATERIAL/MATERIAL_ICON_STATUS-BAR_BT_SIGNAL_1"+bgImageStyle):
(btsignal == 2)?("qrc:MATERIAL/MATERIAL_ICON_STATUS-BAR_BT_SIGNAL_2"+bgImageStyle):
(btsignal == 3)?("qrc:MATERIAL/MATERIAL_ICON_STATUS-BAR_BT_SIGNAL_3"+bgImageStyle):
(btsignal == 4)?("qrc:MATERIAL/MATERIAL_ICON_STATUS-BAR_BT_SIGNAL_4"+bgImageStyle):
(btsignal == 5)?("qrc:MATERIAL/MATERIAL_ICON_STATUS-BAR_BT_SIGNAL_4"+bgImageStyle):
("qrc:MATERIAL/MATERIAL_ICON_STATUS-BAR_BT_SIGNAL_0"+bgImageStyle);
}
Image
{
id:btsignaliconbg
x:-3//236
y:-3//8
width:18
height: 26
source:("qrc:MATERIAL/MATERIAL_ICON_STATUS-BAR_BT_SIGNAL_BG"+bgImageStyle)
}
}
Item
{
id:btswitch
x:719//708//708-236//update by ZhangLiXin #348229
y:7//9-8
width:14
height:24
visible:false
Image
{
id:bticon
width:14
height:24
source:"qrc:MATERIAL/MATERIAL_ICON_STATUS-BAR_BT"+bgImageStyle
}
}
Item
{
id:wifiItem
x:302//302-236
y:9//11-8
width:27
height: 20
Image
{
id:wifiImage
width:27
height:20
visible: false
source://(currConnState == false)?("qrc:MATERIAL/MATERIAL_ICON_SETTINGS_WIFI_0"+bgImageStyle):
(wifiLevel == 0)?("qrc:MATERIAL/MATERIAL_ICON_SETTINGS_WIFI_1"+bgImageStyle):
(wifiLevel == 1)?("qrc:MATERIAL/MATERIAL_ICON_SETTINGS_WIFI_2"+bgImageStyle):
(wifiLevel == 2)?("qrc:MATERIAL/MATERIAL_ICON_SETTINGS_WIFI_3"+bgImageStyle):
(wifiLevel == 3)?("qrc:MATERIAL/MATERIAL_ICON_SETTINGS_WIFI_4"+bgImageStyle):
("qrc:MATERIAL/MATERIAL_ICON_SETTINGS_WIFI_0"+bgImageStyle)
}
}
Item
{
id:charges
x:640//629//629-236//update by ZhangLiXin #348229
y:6//8-8
width: 31
visible: false
//verticalAlignment: parent.verticalCenter
height: 27
Image {
id: charge_full
width: 31
height: 27
visible:(2 == chargeState?true:false)
source: "qrc:MATERIAL/MATERIAL_ICON_CHARGE_FULL"+bgImageStyle
}
Image {
id: chargeing
width: 31
height: 27
visible: (1 == chargeState?true:false)
source: "qrc:MATERIAL/MATERIAL_ICON_CHARGE_CHARGING"+bgImageStyle
}
Image {
id: charge_rechargeable
width: 31
height: 27
visible:(0 == chargeState?true:false)
source: "qrc:MATERIAL/MATERIAL_ICON_CHARGE_RECHARGEABLE"+bgImageStyle
}
}
}
Connections
{
target: acCtrl
onHmiMiniTimerItemShow:{
today_time.visible = true
ampmVisible = true
}
onWlcStateChanged:{
console.log("hmi_mini onWlcStateChanged ############## = "+state)
chargeState = state;
}
onWlcSwitchChanged:{
charges.visible = wlcSwitch;
console.log("hmi_mini onWlcSwitchChanged visible = "+charges.visible)
}
onBtSwitchChanged:{
btswitch.visible = btSwitch
console.log("hmi_mini onBtSwitchChanged visible = "+btphoneItem.visible)
}
onBtConnectChanged:{
console.log("hmi_mini onBtConnectChanged visible = "+btphoneItem.visible)
btphoneItem.visible = btConnectState
}
onBtSignalStateChanged:{
btsignal = state;
console.log("hmi_mini onBtSignalStateChanged btsignal = "+btsignal)
}
onWifiSwitchChanged:{
wifiImage.visible = wifiSwitch
}
onWifiStateChanged:{
wifiLevel = wifiState
}
onHourChanged:{
timechangeset
timedisplay.restart()
}
onMinuteChanged:{
timechangeset
timedisplay.restart()
}
onShowAdjustment:
{
acstatebar.color = "transparent"
}
onHideAdjustment:
{
acstatebar.color = "black"
}
}
function timechangeset()
{
homestatebartimechangeset = acCtrl.homestatebartimechangeset()
today_time.text=homestatebartimechangeset
}
}
|