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 { id: btNameSearchWindow property int curContactIndex: 0 Component.onCompleted: { windowID = WindowsList.BTM_SEARCH } onVisibleChanged: { bNoSwitchBarVisiable = true bKeyboardVisiable = true bFullWindow = true systemCtrl.setTextInputHandle(nameSearchInput) nameSearch_keyBoard.visible = true nameSearch_list_view.visible = false if(visible == false) { btCtrl.btpMsgSearchSavedState = nameSearchInput.text nameSearchInput.text = "" } //ADD #105313 2016/12/07 liduo begin if(handWrite.visible==true) bhandwritebar=true if(keyBoard.visible==true) bhandwritebar=false if(handWrite.changecanvas==false){ handWrite.changecanvas=true } //ADD #105313 2016/12/07 liduo begin } HMIButton { id:nameSearchBack_button x: 0//3 y: 5//-4 width: 138//130 height: 70//80 btnImg:nameSearchBack_button.pressed?("qrc:MATERIAL/MATERIAL_M8X_BACK_BUTTON_P"+bgImageStyle) :("qrc:MATERIAL/MATERIAL_M8X_BACK_BUTTON"+bgImageStyle) Image { id:nameSearchBack_image x:20//12 //y:20 width: 20//24 height:34//40 source: "qrc:MATERIAL/MATERIAL_M8X_ICON_BACK"+bgImageStyle anchors.verticalCenter:parent.verticalCenter } HMILabel { id:nameSearchBack_label x:58//36 //y:25 //Fod #F0017 2016/10/11 wangshuang begin width: 64//60//98 //Fod #F0017 2016/10/11 wangshuang end height:30//35 text: qsTr("Back")+ systemCtrl.emptyString font.pixelSize: 30 anchors.verticalCenter:parent.verticalCenter } onClicked: { ScreenManager.changeForm(Layout.FM_OPEN,WindowsList.BTM_SELECT_CONT) } } Image { id: nameSearchInput_bg //Fod #F0008 2016/10/10 wangshuang begin x: 58//55 y: 81//73 width:842 //Fod #F0008 2016/10/10 wangshuang end height:78 //Fod #141091 2016/12/29 wangshuang begin source: "qrc:MATERIAL/MATERIAL_M8X_LIST_78"+bgImageStyle//"qrc:MATERIAL/MATERIAL_M8X_LIST_78_P"+bgImageStyle //Fod #141091 2016/12/29 wangshuang end } TextInput { id: nameSearchInput x: 143//134 //Fod #F0008 2016/10/10 wangshuang begin y: 81//73 //Fod #F0008 2016/10/10 wangshuang end anchors.verticalCenter: nameSearchInput_bg.verticalCenter width: 632 font.pixelSize: 30//24 readOnly: false enabled: true clip: true horizontalAlignment: Text.AlignLeft text:"" color:"white" //ADD #F0148 2017/1/10 wangshuang begin selectionColor: "#676767" //ADD #F0148 2017/1/10 wangshuang end cursorVisible:true HMIMouseArea{ anchors.fill: parent //DEL #105313 2016/12/07 liduo begin //visible: !nameSearch_keyBoard.visible //enabled: !nameSearch_keyBoard.visible //DEL #105313 2016/12/07 liduo end onClicked: { if(false == nameSearch_keyBoard.visible) { // console.debug("2$$$$$$$$$$$$") nameSearch_keyBoard.visible = true bKeyboardVisiable = true //ADD #105313 2016/12/07 liduo begin if(handWrite.visible==true) bhandwritebar=true if(keyBoard.visible==true) bhandwritebar=false if(handWrite.changecanvas==false){ handWrite.changecanvas=true } //ADD #105313 2016/12/07 liduo end } //ADD #105313 2016/12/07 liduo begin if(handWrite.visible==true) bhandwritebar=true if(keyBoard.visible==true) bhandwritebar=false if(handWrite.changecanvas==false){ handWrite.changecanvas=true } //ADD #105313 2016/12/07 liduo end //ADD #105313 2016/12/07 liduo begin nameSearchInput.cursorPosition = nameSearchInput.positionAt(mouseX,mouseY) //ADD #105313 2016/12/07 liduo end //ADD #145225 2017/01/18 wangs begin systemCtrl.pinyinsreachclear() //ADD #145225 2017/01/18 wangs end } } } HMIButton { id:nameSearchClear_button x: 835 anchors.verticalCenter: nameSearchInput_bg.verticalCenter btnImg:nameSearchClear_button.pressed?"qrc:MATERIAL/MATERIAL_M8X_ICON_CLEAR_P"+bgImageStyle:"qrc:MATERIAL/MATERIAL_M8X_ICON_CLEAR"+bgImageStyle onClicked: { nameSearchInput.text = "" //ADD #145225 2017/1/22 ld begin systemCtrl.clearPinyinSearchInfo() //ADD #145225 2017/1/22 ld end } } HMIListView { id: nameSearch_list_view //Fod #F0008 2016/10/10 wangshuang begin x: 58//55 y: 161//152 //Fod #F0008 2016/10/10 wangshuang end //Fod #F0144 2016/12/22 wangshuang begin width: 895//892//922 //Fod #F0144 2016/12/22 wangshuang end //Fod #121463 2016/10/13 wangshuang begin height: (true == nameSearch_keyBoard.visible)?320:720//326:731//574 //Fod #121463 2016/10/13 wangshuang end spacing: 2 rightMargin:16 scrollBar:true scrollBar_edge:0 scrollBar_width:8//4 scrollBar_img:"qrc:MATERIAL/MATERIAL_M8X_SLIDER_BAR"+bgImageStyle model:btCtrl.btPhoneBookSearchListModel delegate: phone_Number snapMode:ListView.SnapToItem boundsBehavior: Flickable.StopAtBounds focus: true } Component { id: phone_Number HMIButton { id:contact_List enabled: col1=='1'?false:true y:12 height: 78 //Fod #F0018 2016/10/11 wangshuang begin btnImg:(contact_List.pressed)?("qrc:MATERIAL/MATERIAL_M8X_LIST_78_P"+bgImageStyle):("qrc:MATERIAL/MATERIAL_M8X_LIST_78"+bgImageStyle)//"qrc:MATERIAL/MATERIAL_M8X_LIST_78"+bgImageStyle // Image // { // height: 78 // visible: (curContactIndex == index) ? true:false // source:(contact_List.pressed)?("qrc:MATERIAL/MATERIAL_M8X_LIST_78_P"+bgImageStyle):("qrc:MATERIAL/MATERIAL_M8X_LIST_78_P"+bgImageStyle) // } //Fod #F0018 2016/10/11 wangshuang end Item { //Fod #F0013 2016/10/11 wangshuang begin x:84//80 //Fod #F0013 2016/10/11 wangshuang end y:7 width: 610 height: 37 HMILabel { anchors.fill: parent horizontalAlignment: Text.AlignLeft elide: Label.ElideRight font.pixelSize:30 text:col7//(col1 == '3')?(col0):(col7==""?col0:(col7+" "+col0))//col0 } } Item { //Fod #F0013 2016/10/11 wangshuang begin x:84//80 y:39//36 //Fod #F0013 2016/10/11 wangshuang end width: 610 height: 37 HMILabel { anchors.fill: parent font.pixelSize:22 wtitesize:1 text:col0//(col1 == '3')?(col0):(col7==""?col0:(col7+" "+col0)) //Fod #F0013 2016/10/11 wangshuang begin color:(contact_List.pressed)?"white":"#808080" //Fod #F0013 2016/10/11 wangshuang end horizontalAlignment: Label.AlignLeft elide:Label.ElideRight } } HMIButton { id:checkbox_List1 x: 710 y: 6 width: 64 height: 62 //Fod #F0060 2016/10/19 wangshuang begin visible: ((col1=='1')||(col0=="")||(col2 == "1"))?false:true//((col1=='1')||(col0==""))?false:true //Fod #F0060 2016/10/19 wangshuang end btnImg:checkbox_List1.pressed?("qrc:MATERIAL/MATERIAL_M8X_CHOICE_BOX_PUSHED"+bgImageStyle) :("qrc:MATERIAL/MATERIAL_M8X_CHOICE_BOX"+bgImageStyle) onClicked: { if(col2 == "0") { btCtrl.setBtMsgSearchContactSelected(index) } else{ btCtrl.setBtMsgSearchContactUnSelected(index) } } } HMIButton { id:checkbox_List2 x: 710 y: 6 width: 64 height: 62 visible: ((col1=='1')||(col0=="")||(col2 == "0"))?false:true btnImg: checkbox_List2.pressed?("qrc:MATERIAL/MATERIAL_M8X_CHOICE_BOX_CHECK_PUSHED"+bgImageStyle) :("qrc:MATERIAL/MATERIAL_M8X_CHOICE_BOX_CHECK"+bgImageStyle) onClicked: { if(col2 == "0") { btCtrl.setBtMsgSearchContactSelected(index) } else{ btCtrl.setBtMsgSearchContactUnSelected(index) } } } onPressed: { if( true == btCtrl.btConnectState ) { if (curContactIndex != index) { curContactIndex = index } } } onClicked: { // console.debug("setBtMsgContactSelected col2="+col2+"col1"+ col1) if(col1 == "1") { // console.log("[BTM_Select_Cont]btCtrl.setBtMsgContactSelected()------") } else { if(col2 == "0") { btCtrl.setBtMsgSearchContactSelected(index) } else{ btCtrl.setBtMsgSearchContactUnSelected(index) } } } } } //Add #129445 2016/11/30 wangs begin MouseArea { id:scroolbarcover x:58+842 y:161 width:60 height: (true == nameSearch_keyBoard.visible)?320:720 } //Add #129445 2016/11/30 wangs end Item { id:nameSearch_keyBoard x: -2 y: 562 HMIKeyBoard { id: keyBoard enabled:true iSerach: true onClickspell: { if(!keyBoard.isPinyin) systemCtrl.setKeyPress(spell) } onSearchStart: { nameSearch_keyBoard.visible = false btCtrl.btPhoneBookSearchInfo(nameSearchInput.text) nameSearch_list_view.visible = true bKeyboardVisiable = false } onHandwriteborad: { keyBoard.visible=false handWrite.visible=true //ADD #105313 2016/12/07 liduo begin bhandwritebar=true //ADD #105313 2016/12/07 liduo end } onCloseKeyBoardSignal: { nameSearch_keyBoard.visible=false; bKeyboardVisiable = false //ADD #105313 2016/12/07 liduo begin bhandwritebar=false //ADD #105313 2016/12/07 liduo end } } HMIHandWrite{ id:handWrite y: 0 iSerach: true visible: false onKeyborad: { // console.log("#############################################") keyBoard.iType=itype keyBoard.visible=true handWrite.visible=false //ADD #105313 2016/12/07 liduo begin bhandwritebar=false //ADD #105313 2016/12/07 liduo end } onCloseKeyBoardSignal: { nameSearch_keyBoard.visible=false; bKeyboardVisiable = false //ADD #105313 2016/12/07 liduo begin bhandwritebar=false //ADD #105313 2016/12/07 liduo end } onSearchStart: { nameSearch_keyBoard.visible = false btCtrl.btPhoneBookSearchInfo(nameSearchInput.text) nameSearch_list_view.visible = true bKeyboardVisiable = false } } } Connections { target:btCtrl onBtConnectStatusChanged: { if( false == btCtrl.btConnectState ) { if(btNameSearchWindow.visible == true) { ScreenManager.changeForm(Layout.FM_OPEN,WindowsList.BTP_HOME) } } } } Connections{ target:ScreenManager // onBtHungupPageReset:{//del by lium for screenchange begin // nameSearchInput.text=btCtrl.btpMsgSearchSavedState // }//del by lium for screenchange end } }