import QtQuick 2.0 import "../../com/neusoft/auto/widgets" import "../../windowsList.js" as WindowsList import "../../layoutList.js" as Layout import "../../Setting/Settinglist.js" as Settinglist import "../../eventsList.js" as EventsList Item { id: diag_seat_home x: 20 y: 0 width: right1.width height: right1.height //fod F0109 2016/11/26 liuming begin //property int iSeatPositioningChecked: settingCtrl.iSeatPositioning //property int iMirrorAutoFoldChecked: settingCtrl.iMirrorAutoFold //property int iSeatPositioning: 1 //property int iMirrorAutoFold: 1 property string style: systemCtrl.style property int currMirrorAutoFold:1 property int currEasy: 1 property int currBELTUP: 1 property int currACCON: 1 property int currMemorymode: 0 onVisibleChanged: { if(diag_seat_home.visible== true) { diagCtrl.getSeatInfo(); //console.log("[diag_seat_home] onVisibleChanged iSeatPositioningChecked----------------->" + iSeatPositioningChecked) //console.log("[diag_seat_home] onVisibleChanged iMirrorAutoFoldChecked----------------->" + iMirrorAutoFoldChecked) // switch(iSeatPositioningChecked) // { // case Settinglist.SEAT_POSITIONING_CHOICE_CHECKED: // { // iSeatPositioning = iSeatPositioningChecked // positioning_btn.text = "ON" // break; // } // case Settinglist.SEAT_POSITIONING_CHOICE_BOX: // { // iSeatPositioning = iSeatPositioningChecked // positioning_btn.text = "OFF" // break; // } // default: // { // break; // } // } // switch(iMirrorAutoFoldChecked) // { // case Settinglist.MIRROR_AUTO_FOLD_CHOICE_CHECKED: // { // iMirrorAutoFold = iMirrorAutoFoldChecked // fold_btn.text = "ON" // break; // } // case Settinglist.MIRROR_AUTO_FOLD_CHOICE_BOX: // { // iMirrorAutoFold = iMirrorAutoFoldChecked // fold_btn.text = "OFF" // break; // } // default: // { // break; // } // } if (systemCtrl.checkAppCommCodingData(EventsList.HMI_CODING_MIRROR_FOLD) == 0) { mirror_fold.visible = false } else if(systemCtrl.checkAppCommCodingData(EventsList.HMI_CODING_MIRROR_FOLD) == 1) { mirror_fold.visible = true } else { //do nothing } if (systemCtrl.checkAppCommCodingData(EventsList.HMI_CODING_SEAT_MOEMORY) == 0) { positioning.visible = false belt.visible = false easy.visible = false memory.visible = false } else if(systemCtrl.checkAppCommCodingData(EventsList.HMI_CODING_SEAT_MOEMORY) == 1) { positioning.visible = true belt.visible = true easy.visible = true memory.visible = true } else { //do nothing } } else { //do nothing } } Column { id:right1 x: 0 y: 0 width: 842 anchors.topMargin: 0 spacing: 2 Row { id: positioning width: right1.width height: 78 Item //for Occupying { width: 18 height: 1 } HMILabel { id: positioning_text width:480//24*20 height: 78 text:qsTr("Seat memory positioning")+ systemCtrl.emptyString color:"#e1e1e1" font.pixelSize: 30 verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignLeft } Item //for Occupying { //width: 842 - positioning_text.width - positioning_btn.width - 36 width: 842 - positioning_text.width - positioning_btn.width - 36 - acc_text.width height: 1 } HMILabel { id: acc_text width: 150 height: 78 text:qsTr("ACC ON") + systemCtrl.emptyString color:"#e1e1e1" font.pixelSize: 30 verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignRight } HMILabel //the button of SeatPositioning { id:positioning_btn width: 100 height: 78 text:(Settinglist.ACCON_CHOICE_CHECKED == currACCON)?qsTr("ON")+ systemCtrl.emptyString:qsTr("OFF")+ systemCtrl.emptyString color:"#e1e1e1" font.pixelSize: 30 verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignRight } } Row { id: belt width: right1.width height: 78 Item //for Occupying { //width: 18 width:18+480 height: 1 } Item //for Occupying { //width: 842 - positioning_text.width - positioning_btn.width - 36 width: 842 - 480 - belt_text.width - 36 - belt_btn.width height: 1 } HMILabel { id: belt_text width: 150 height: 78 text:qsTr("belt up") + systemCtrl.emptyString color:"#e1e1e1" font.pixelSize: 30 verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignRight } HMILabel //the button of SeatPositioning { id:belt_btn width: 100 height: 78 text:( Settinglist.BELTUP_CHOICE_CHECKED == currBELTUP)?qsTr("ON")+ systemCtrl.emptyString:qsTr("OFF")+ systemCtrl.emptyString color:"#e1e1e1" font.pixelSize: 30 verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignRight } } Row { id: easy width: right1.width height: 78 Item //for Occupying { width: 18 height: 1 } HMILabel { id: easy_text width:480//24*20 height: 78 text:qsTr("Easy entry/Easy exit") + systemCtrl.emptyString color:"#e1e1e1" font.pixelSize: 30 verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignLeft } Item //for Occupying { width: 842 - easy_text.width - easy_btn.width - 36 height: 1 } HMILabel //the button of MirrorAutoFold { id:easy_btn width: 100 height: 78 text:( Settinglist.EASYENTRY_EASYEXIT_CHOICE_CHECKED == currEasy)?qsTr("ON")+ systemCtrl.emptyString:qsTr("OFF")+ systemCtrl.emptyString color:"#e1e1e1" font.pixelSize: 30 verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignRight } } Row { id: memory width: right1.width height: 78 Item //for Occupying { width: 18 height: 1 } HMILabel { id: memory_text width:480//24*20 height: 78 text:qsTr("Memory mode") + systemCtrl.emptyString color:"#e1e1e1" font.pixelSize: 30 verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignLeft } Item //for Occupying { width: 842 - memory_text.width - memory_btn.width - 36 height: 1 } HMILabel //the button of MirrorAutoFold { id:memory_btn width: 180 height: 78 text:( Settinglist.MEMORYMODE_KEY == currMemorymode)?qsTr("Key")+ systemCtrl.emptyString:qsTr("vehicle")+ systemCtrl.emptyString color:"#e1e1e1" font.pixelSize: 30 verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignRight } } Row { id: mirror_fold width: right1.width height: 78 Item //for Occupying { width: 18 height: 1 } HMILabel { id: mirror_fold_text width:480//24*20 height: 78 text:qsTr("Mirror auto fold") + systemCtrl.emptyString color:"#e1e1e1" font.pixelSize: 30 verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignLeft } Item //for Occupying { width: 842 - mirror_fold_text.width - fold_btn.width - 36 height: 1 } HMILabel //the button of MirrorAutoFold { id:fold_btn width: 100 height: 78 text:(Settinglist.MIRROR_AUTO_FOLD_CHOICE_CHECKED == currMirrorAutoFold)?qsTr("ON")+ systemCtrl.emptyString:qsTr("OFF")+ systemCtrl.emptyString color:"#e1e1e1" font.pixelSize: 30 verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignRight } } } Connections { // target: settingCtrl // onSeatPositioningChanged: // { // switch(iSeatPositioningChecked) // { // case Settinglist.SEAT_POSITIONING_CHOICE_CHECKED: // { // iSeatPositioning = iSeatPositioningChecked // positioning_btn.text = "ON" // break; // } // case Settinglist.SEAT_POSITIONING_CHOICE_BOX: // { // iSeatPositioning = iSeatPositioningChecked // positioning_btn.text = "OFF" // break; // } // default: // { // break; // } // } // } // onMirrorAutoFoldChanged: // { // switch(iMirrorAutoFoldChecked) // { // case Settinglist.MIRROR_AUTO_FOLD_CHOICE_CHECKED: // { // iMirrorAutoFold = iMirrorAutoFoldChecked // fold_btn.text = "ON" // break; // } // case Settinglist.MIRROR_AUTO_FOLD_CHOICE_BOX: // { // iMirrorAutoFold = iMirrorAutoFoldChecked // fold_btn.text = "OFF" // break; // } // default: // { // break; // } // } // } target: diagCtrl onSeatInfoChanged: { currACCON = icurrACCON currBELTUP = icurrBELTUP currEasy = icurrEasy currMemorymode = icurrMemorymode currMirrorAutoFold = icurrMirrorAutoFold } } //fod F0109 2016/11/26 liuming end }