blob: 1438e735dd3630e5e874f2d567806a8488f7064e (
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
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
|
import QtQuick 2.0
import "../com/neusoft/auto/widgets"
import "../eventsList.js" as EventsList
import "../layoutList.js" as Layout
import "../windowsList.js" as WindowsList
import Label 2.0
HMIWindow{
id:carlinkhome_page
Component.onCompleted:
{
windowID = WindowsList.CARLINKLOGIN_MAIN
}
onVisibleChanged:
{
bMainWindow = false
bFullWindow = true
if(carlinkhome_page.visible)
{
psw_input.text = "";
if(carlinkCtrl.isCleanCurName)
{
user_input.text = "";
carlinkCtrl.setIsCleanCurName (false);
}
}
isNameScreen =false
}
property bool isNameScreen : false
MouseArea{
width:carlinkhome_page.width
height:carlinkhome_page.height-50 // for close button valid
onClicked: {
console.log("carlinkhome_page------->onClicked ")
isNameScreen = false
}
}
HMILabel{
id:loginTitle
x:51
y:148-132
width:300
height:30
horizontalAlignment: Label.AlignLeft
text:qsTr("Login telematics")+systemCtrl.emptyString;
}
Item{
id:password
x:34
y:257-132
Image {
id: psw_background
x: 0
y: 0
source:psw_input.focus ? "qrc:MATERIAL/MATERIAL_M8X_INPUT-BOX_524_C"+bgImageStyle
: "qrc:MATERIAL/MATERIAL_M8X_INPUT-BOX_524"+bgImageStyle
HMILabel {
id: psw_title
y:7
width: psw_background.width
height: 30
color:"gray"
text:qsTr("Please input password")+systemCtrl.emptyString
font.pixelSize: 24
horizontalAlignment: Label.AlignLeft
visible:psw_input.focus||psw_input.text.length>0?false:true
}
HMIInputText {
id: psw_input
x: 5
y: 8
width: psw_background.width//378
height: psw_background.height//48
focus: false
horizontalAlignment: Label.AlignLeft
color: "white"
text:"admin123"
font.pixelSize: 24
autoScroll: false
echoMode:TextInput.Password
cursorVisible:psw_input.focus?true:false
onCursorPositionChanged: {
if(psw_input.text.length>0)
{
keyBoard.deleteEnable=true
}
else
{
keyBoard.deleteEnable=false
}
}
onContentWidthChanged: {
if (psw_input.text.length > 16)
{
psw_input.text = psw_input.text.substring(0, psw_input.text.length - 1);
}
}
MouseArea
{
anchors.fill: parent
onClicked: {
psw_input.focus = true
keyBoard.opacity = 1
keyBoard.enabled = true
isNameScreen =false
/*****naca 70011*****/
keyBoard.iPassword = true
/*****naca 70011*****/
if(psw_input.text.length > 0)
{
keyBoard.deleteEnable=true
}
else
{
keyBoard.deleteEnable=false
}
systemCtrl.setTextInputHandle(psw_input)
}
}
}
}
}
Item{
id:username
x:34
y:65
Image {
id: user_background
x: 0
y: 0
source:user_input.focus ? "qrc:MATERIAL/MATERIAL_M8X_INPUT-BOX_524_C"+bgImageStyle
: "qrc:MATERIAL/MATERIAL_M8X_INPUT-BOX_524"+bgImageStyle
HMILabel {
id: user_title
y:7
width: user_background.width
height: 30
color:"gray"
text:qsTr("Please input user ID")+systemCtrl.emptyString
font.pixelSize: 24
horizontalAlignment: Label.AlignLeft
visible:user_input.focus||user_input.text.length>0?false:true
}
HMIInputText {
id: user_input
x: 5
y: 8
width: user_background.width
height: user_background.height
focus: false
horizontalAlignment: Label.AlignLeft
color: "white"
text:""
font.pixelSize: 24
autoScroll: false
cursorVisible:user_input.focus?true:false
onCursorPositionChanged: {
console.log("=====================onCursorPositionChanged======================user_input====="+user_input.text)
if(user_input.text.length>0)
{
keyBoard.deleteEnable=true
}
else
{
keyBoard.deleteEnable=false
}
}
onContentWidthChanged: {
if (user_input.text.length > 16)
{
user_input.text = user_input.text.substring(0, user_input.text.length - 1);
}
}
/****************************for naca 69927************************/
onTextChanged: {
psw_input.text = ""
}
/****************************for naca 69927************************/
MouseArea
{
anchors.fill: parent
onClicked: {
user_input.focus = true
/*****naca 70011*****/
keyBoard.iPassword = false
/*****naca 70011*****/
if(user_input.text.length > 0)
{
keyBoard.deleteEnable=true
}
else
{
keyBoard.deleteEnable=false
}
systemCtrl.setTextInputHandle(user_input)
}
}
}
}
}
HMIButton
{
id: btn_login
x:574
y:193-132
labelText: qsTr("Login")+systemCtrl.emptyString
enabled: ((!carlinkCtrl.isLogining) && (psw_input.text.length > 0)&&(user_input.text.length >0)) ? true:false
btnImg: btn_login.enabled?(btn_login.pressed ? "qrc:MATERIAL/MATERIAL_M8X_SETTINGS_BUTTON_PUSHED"+bgImageStyle
:"qrc:MATERIAL/MATERIAL_M8X_SETTINGS_BUTTON"+bgImageStyle)
:"qrc:MATERIAL/MATERIAL_M8X_SETTINGS_BUTTON"+bgImageStyle
/*****NACA69921******/
labelColor: ((!carlinkCtrl.isLogining) && (psw_input.text.length > 0)&&(user_input.text.length >0)) ?"#FFFFFF" : "#656565"
/*****NACA69921******/
onClicked: {
console.log("[btn_login] onClick")
isNameScreen = false
carlinkCtrl.judgeRemainingTime()
if(!carlinkCtrl.isLoginLock)
{
console.log("[CarlinkLogin.qml][btn_login][getlockinfo]--->carlinkCtrl.isLoginLock = false")
carlinkCtrl.get_hmi_user_name_pswd(user_input.text,psw_input.text)
//carlinkCtrl.setIsLogining(true)
}
else
{
console.log("[CarlinkLogin.qml][btn_login][getlockinfo]--->")
carlinkCtrl.setLogfailRemainingTimeText();
}
}
}
HMIButton
{
id: btn_forgetpswd
x:574;
y:253-132;
labelText: qsTr("Forget?")+systemCtrl.emptyString
btnImg: btn_forgetpswd.pressed? "qrc:MATERIAL/MATERIAL_M8X_SETTINGS_BUTTON_PUSHED"+bgImageStyle
:"qrc:MATERIAL/MATERIAL_M8X_SETTINGS_BUTTON"+bgImageStyle
onClicked: {
isNameScreen =false
console.log("[btn_login] onClick ------cancel")
ScreenManager.changeForm(Layout.FM_OPEN,WindowsList.FORGETPASSWORD)
}
}
Item {
id: chinaKeyBoard
x: 0
y: 400
HMIKeyBoard{
id: keyBoard
x: 0
y: 0
opacity: 1
enabled: true
iType:1
isPinyin:true
iSerach:false
iConfirm:true
onClickspell:
{
if(!keyBoard.isPinyin)
{
console.log("====ddddddddddddddddddddd====")
systemCtrl.setKeyPress(spell)
}
}
}
}
HMIButton{
id:btnAccountList
x:516
y:214-132
btnImg:isNameScreen?(btnAccountList.pressed?"qrc:MATERIAL/MATERIAL_M8X_SUB-ARROW_UP_P"+bgImageStyle
:"qrc:MATERIAL/MATERIAL_M8X_SUB-ARROW_UP"+bgImageStyle)
:(btnAccountList.pressed?"qrc:MATERIAL/MATERIAL_M8X_SUB-ARROW_DOWN_P"+bgImageStyle
:"qrc:MATERIAL/MATERIAL_M8X_SUB-ARROW_DOWN"+bgImageStyle)
onClicked:
{
console.log("btnAccountList-->>>onclick")
showAccountList();
carlinkCtrl.getAccountListDisplay();
}
}
LoginAccountList
{
id: imgAccountList
x:242
y:182
visible:isNameScreen
}
function showAccountList()
{
console.log("showAccountList----->>>>>")
if(isNameScreen==false)
{
console.log("isNameScreen-->false")
isNameScreen=true;
}
else
{
console.log("isNameScreen-->true")
isNameScreen=false;
}
}
Connections{
target: imgAccountList
onNameListClicked:{
console.log("onNameListClicked----------->>>")
user_input.text = carlinkCtrl.getUserName()
isNameScreen=false;
}
}
}
|