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
|
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:carlinkcontacts_page
property int curContactIndex: 0
property string aTozCurrent: ""
Component.onCompleted:
{
console.log("***********************************CARLINK_CONTACTS***********************************")
windowID = WindowsList.CARLINK_CONTACTS
}
onVisibleChanged:
{
bFullWindow = true
}
HMILabel
{
x:24
y:128-128
width:700
height:56
text:"Contacts"
color: "white"
font.pixelSize: 28
verticalAlignment: Label.AlignVCenter
horizontalAlignment: Label.AlignLeft
}
HMIButton
{
id:icon_back
x:500
y:128-128
width: 400
height: 56
btnImg:icon_back.pressed?("qrc:MATERIAL/MATERIAL_M8X_ICON_BACK_P"+bgImageStyle)
:("qrc:MATERIAL/MATERIAL_M8X_ICON_BACK"+bgImageStyle)
onClicked:
{
ScreenManager.changeForm(Layout.FM_OPEN,WindowsList.CARLINK_MAIN)
}
}
Item
{
x:20
y:56
width:700
height: 640
HMIListView
{
id:contact_people
anchors.fill: parent
clip:true
model:carlinkCtrl.getPhoneListFromDB
delegate: phone_Number
keyNavigationWraps: true
orientation: ListView.Vertical
highlightFollowsCurrentItem: true
snapMode: ListView.SnapOneItem
rightMargin: 0
scrollBar:true
scrollBar_edge:0
scrollBar_width:4
spacing: 2
scrollBar_img:"qrc:MATERIAL/MATERIAL_M8X_SLIDER_BAR"+bgImageStyle
}
Component
{
id:phone_Number
HMIButton
{
id:contact_List
enabled: col1=='1'?false:true
height: 62
btnImg:"qrc:MATERIAL/MATERIAL_M8X_LIST"+bgImageStyle
//"qrc:MATERIAL/MATERIAL_M8X_FUNCTION_BUTTON_BK"+bgImageStyle
Image
{
height: 62
visible: (curContactIndex == index) ? true:false
source:(contact_List.pressed)?("qrc:MATERIAL/MATERIAL_M8X_LIST_P"+bgImageStyle):("qrc:MATERIAL/MATERIAL_M8X_LIST_C"+bgImageStyle)
}
Item
{
x:col1=='1'?52-34:73-34
y:211-190
width: 670
height: 37
HMILabel
{
anchors.fill: parent
font.pixelSize:24
text:col0
horizontalAlignment: Label.AlignLeft
elide:Label.ElideRight
}
HMILabel
{
x:100//120 //73-34-120
y: 211-210
width: 520
height: 37
font.pixelSize:24
text:col1
}
}
onPressed:
{
if (curContactIndex != index)
{
curContactIndex = index
}
}
onClicked:
{
ScreenManager.changeForm(Layout.FM_OPEN,WindowsList.CARLINK_CONTACTS_NEW_MSG)
carlinkCtrl.getCarlinkMsgContactUserid(col1);
carlinkCtrl.setCurrentPhoneNum(col1);
carlinkCtrl.setCurrentPhoneName(col0);
}
}
}
}
HMIButton
{
id:icon_contact
x:60//96-15//60
y:822-128//849-131//822-128
width:124// 71//124
height:66//23// 66
labelText: "Contact"
btnImg:"qrc:MATERIAL/MATERIAL_M8X_FUNCTION_BUTTON_4_P"+bgImageStyle
onClicked:
{
//ScreenManager.changeForm(Layout.FM_OPEN,WindowsList.CARLINK_CONTACTS)
}
}
HMIButton
{
id:icon_interact
x:200//200
y:822-128
width: 124//46
height:66// 23//66
labelText: "Interact"
btnImg:icon_interact.pressed?("qrc:MATERIAL/MATERIAL_M8X_FUNCTION_BUTTON_4_P"+bgImageStyle)
:("qrc:MATERIAL/MATERIAL_M8X_FUNCTION_BUTTON_4"+bgImageStyle)
onClicked:
{
ScreenManager.changeForm(Layout.FM_OPEN,WindowsList.CARLINK_CONTACTS_ALL_LIST)
//ScreenManager.changeForm(Layout.FM_OPEN,WindowsList.CARLINK_CONTACTS_NOTUPLOAD)//for test
}
}
HMIButton
{
id:icon_synchro
x:340//360-15
y:822-128//849-131//822-128
width: 124
height: 66
labelText: "Synchro"
btnImg:icon_synchro.pressed?("qrc:MATERIAL/MATERIAL_M8X_FUNCTION_BUTTON_4_P"+bgImageStyle)
:("qrc:MATERIAL/MATERIAL_M8X_FUNCTION_BUTTON_4"+bgImageStyle)
onClicked:
{
//carlinkCtrl.sLPphoneBookListModelClear();
carlinkCtrl.setIsSynchroPopupDisplay(true);
carlinkCtrl.selectPhoneBookList();
}
}
Column{
x:695
id: firstRow
anchors{top:parent.top;topMargin:50}
Repeater{
model:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","#"]
HMILabel{
width:23
height: 24
font.pixelSize: 22
color:aTozCurrent== qsTr(modelData)?"white":"gray"
text:qsTr(modelData);
HMIMouseArea{
anchors.fill: parent
onPressed: {
console.debug(modelData)
aTozCurrent = modelData
contact_people.positionViewAtIndex(carlinkCtrl.getCLInitialSearchIndex(aTozCurrent), ListView.Beginning)
}
}
}
}
}
Connections
{
target: carlinkCtrl
onSigSynchroFaildChanged:
{
console.log("=============================contacts update failed=============")
carlinkCtrl.showPromptInfo ("网络异常" , true);
}
onSigContactsNotuploadChanged:
{
console.log("=============================contacts update failed=============")
ScreenManager.changeForm(Layout.FM_OPEN,WindowsList.CARLINK_CONTACTS_NOTUPLOAD)
}
onSigUpdateDBChanged:
{
contact_people.model=carlinkCtrl.getPhoneListFromDB
}
onSigSynchroSuccessChanged:
{
// contact_people.model=carlinkCtrl.getPhoneListFromDB
}
}
CarLink_Synchro_Popup{
id : synchro
popvisible : carlinkCtrl.isSynchroPopupDisplay
popimageY : bMaxWindow ? 300 : 125
popheight : bMaxWindow ? 700 : 325
}
}
|