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:main_window property int pyeventx: 15 Component.onCompleted: { windowID = WindowsList.CARLINK_MYLIST } onVisibleChanged: { bMainWindow = false } HMILabel { id : text_title x : 51 -pyeventx y : 148-131 height : 27 width : 250 font.pixelSize:27 horizontalAlignment: Label.AlignLeft text : qsTr("AutoGroup")+systemCtrl.emptyString } HMIButton{ id:back x:689 -pyeventx y:151-131 width:31 height:21 btnImg: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) } } HMIButton{ id:chat_interaction x:70-pyeventx y:bMaxWindow?828-131-3:444-131-3 labelPixelSize:23 labelText: qsTr("Chats")+systemCtrl.emptyString btnImg:chat_interaction.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_CHATINTERACTION) } } HMIButton{ id:auto_list x:192-pyeventx y:bMaxWindow?828-131-3:444-131-3 labelPixelSize:23 labelText: qsTr("Contacts")+systemCtrl.emptyString btnImg:auto_list.pressed?"qrc:MATERIAL/MATERIAL_M8X_FUNCTION_BUTTON_4_P"+bgImageStyle :"qrc:MATERIAL/MATERIAL_M8X_FUNCTION_BUTTON_4_C"+bgImageStyle } HMIButton{ id : refresh x:32-pyeventx y:193-131 btnImg:refresh.pressed?"qrc:MATERIAL/MATERIAL_M8X_MEDIA_BUTTON_TAG_P"+bgImageStyle :"qrc:MATERIAL/MATERIAL_M8X_MEDIA_BUTTON_TAG"+bgImageStyle Image{ x:33 y:14 width:34 height: 28 source:"qrc:MATERIAL/MATERIAL_M8X_ICON_UPDATE"+bgImageStyle } onClicked: { //popup.popvisible = true ; carlinkCtrl.appOrganization_Request() } } Component { id: model_delegate Item { width: 590 height: 62 HMIButton{ id : item btnImg:model.modelData.User_Type!=="0" ?( item.pressed ? "qrc:MATERIAL/MATERIAL_M8X_LIST_590_P"+bgImageStyle: "qrc:MATERIAL/MATERIAL_M8X_LIST_590"+bgImageStyle) : "qrc:MATERIAL/MATERIAL_M8X_TITLE-BG_590"+bgImageStyle enabled: model.modelData.User_Type!=="0"?true:false Image{ x:9 y:8 visible: model.modelData.User_Type!=="0"?true : false sourceSize.height:46 sourceSize.width:46 source: model.modelData.Icon_Path ===""?"qrc:MATERIAL/MATERIAL_M8X_DEFAULT_AVATAR"+bgImageStyle :model.modelData.Icon_Path } HMILabel{ x:model.modelData.User_Type!=="0"?210-144:16 y:20 width:400 height:28 font.pixelSize:23 horizontalAlignment: Label.AlignLeft text: model.modelData.User_Name } onClicked: { if ("1"=== model.modelData.User_Type){ carlinkCtrl.selAutoGroupListforId(model.modelData.User_Id); } else if ("3" === model.modelData.User_Type ){ carlinkCtrl.selAutoGroupListforGroup(model.modelData.User_Id); } else{ //do nothing } carlinkCtrl.setCurrentUseId(model.modelData.User_Id); carlinkCtrl.setCurrentDialogName(model.modelData.User_Name); carlinkCtrl.setCurrentDialogtype(model.modelData.User_Type); ScreenManager.changeForm(Layout.FM_OPEN,WindowsList.CARLINK_DIALOGBOX) ScreenManager.changeForm(Layout.FM_CLOSE,windowID) } } } } HMIListView{ id : list x:144 - pyeventx y:190-131 width:620-15 height: bMaxWindow?638:254-3 model : carlinkCtrl.getMyList() delegate: model_delegate spacing: 1 showBar: true scrollBar:true } MylistPopup{ id:popup popvisible:carlinkCtrl.isMylistpopShow popimageY : bMaxWindow ? 424-131 : 85 mask_height : bMaxWindow ? 695 : 310 } Connections{ target: carlinkCtrl onSigMyListChanged:{ list.model = carlinkCtrl.getMyList() //popup.popvisible = false } } }