import QtQuick 2.0 import "../eventsList.js" as EventsList import "../com/neusoft/auto/widgets" import "../layoutList.js" as Layout import "../windowsList.js" as WindowsList import "../Setting/Settinglist.js" as Settinglist import Label 2.0 HMIWindow { property int curContactIndex: 0 property bool changevisiblenum: true property bool selectState: true property string aTozCurrent: "" Component.onCompleted: { windowID = WindowsList.CARLINK_CONTACTS_SELECT_CONT } onVisibleChanged: { bFullWindow = true changevisiblenum=true } HMILabel { x:24 y:128-128 width:700 height:56 text:"Interact" color: "white" font.pixelSize: 28 verticalAlignment: Label.AlignVCenter horizontalAlignment: Label.AlignLeft } HMIButton { id:icon_back x:650 y:10 width: 90 height: 21 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_CONTACTS_NEW_MSG) } } HMIButton { id:icon_return x:650 y:75 width: 90 height: 21 labelText: "V" btnImg:icon_return.pressed?("qrc:MATERIAL/MATERIAL_M8X_FUNCTION_BUTTON_1_P"+bgImageStyle) :("qrc:MATERIAL/MATERIAL_M8X_FUNCTION_BUTTON_1"+bgImageStyle) onClicked: { ScreenManager.changeForm(Layout.FM_OPEN,WindowsList.CARLINK_CONTACTS_NEW_MSG) } } Item { x:20 y:135 width:700 height: 540 HMIListView { id:contact_people anchors.fill: parent clip:true model: carlinkCtrl.getPhoneListFromDB//carlinkPhoneBookListModel 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: 520 height: 37 HMILabel { anchors.fill: parent horizontalAlignment: Text.AlignLeft elide: Label.ElideRight font.pixelSize:24 text:col0 } } HMILabel { x:100// 73-34-80 y: 211-190 width: 520 height: 37 font.pixelSize:24 text:col1 } HMILabel { x: 609-34-12 y: 211-190-2 width: 30 height: 25 font.pixelSize:24 visible: col1=='1'?false:true text:"[" } HMILabel { x: 609-34+12 y: 211-190-2 width: 30 height: 25 font.pixelSize:24 visible: col1=="1"?false:true text:"]" } Image { id:check x: 615-34 y: 211-190 width: 18 height: 19 visible: false source: "qrc:MATERIAL/MATERIAL_M8X_ICON_CLOSE"+bgImageStyle onVisibleChanged: { if(changevisiblenum===true) { changevisiblenum=false if(visible==true) { console.debug("-------mo ren visible------ ") console.debug("getCarlinkMsgContactUserid =") carlinkCtrl.getCarlinkMsgContactUserid(col1); carlinkCtrl.setCurrentPhoneNum(col1); carlinkCtrl.setCurrentPhoneName(col0); carlinkCtrl.setContactsChecked(true); console.debug("-------mo ren visible jiesu------ ") } } } } onPressed: { if (curContactIndex != index) { curContactIndex = index } } onClicked: { console.debug("tututuuttu") if(carlinkCtrl.contactsChecked==false) { console.debug("333333333333333333333333333") if(check.visible==false) { console.debug("getCarlinkMsgContactUserid =") check.visible=true carlinkCtrl.getCarlinkMsgContactUserid(col1); carlinkCtrl.setCurrentPhoneNum(col1); carlinkCtrl.setCurrentPhoneName(col0); carlinkCtrl.setContactsChecked(true); } } else { if(check.visible==true) { check.visible=false carlinkCtrl.clearCurrentPhoneNum(); carlinkCtrl.clearCurrentPhoneName(); carlinkCtrl.setContactsChecked(false); } } } } } } HMIButton { id:icon_Send x:60 y:822-128 width: 100 height: 66 labelText: "Send" btnImg:icon_Send.pressed?("qrc:MATERIAL/MATERIAL_M8X_FUNCTION_BUTTON_3_P"+bgImageStyle) :("qrc:MATERIAL/MATERIAL_M8X_FUNCTION_BUTTON_3"+bgImageStyle) onClicked: { carlinkCtrl.carLinkContactsMsgSend(newMsgInput.text) newMsgInput.text = "" ScreenManager.changeForm(Layout.FM_OPEN,WindowsList.CARLINK_CONTACTS_ALL_LIST) } } Column{ x:695 y:120 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: 21//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) } } } } } }