import QtQuick 2.0 import Label 2.0 import "../../com/neusoft/auto/widgets" import "../../layoutList.js" as Layout import "../../windowsList.js" as WindowsList import "../" DiagInstallWindow { id:part1level_home Component.onCompleted: { visible = true } property string bgImageStyle: systemCtrl.style property string currentRadioFreq: radioCtrl.currentFreq visible:false onVisibleChanged: { } Item { id:part1level_home_title x:0 y:0 width: 960 height: 35 HMILabel { width: 480//120 height: 35 text:qsTr("Radio Part1 level") + systemCtrl.emptyString font.pixelSize: 30 color:"#e1e1e1" anchors.horizontalCenter: parent.horizontalCenter verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter } } HMIButton { id:back_btn x:0 y:165 - part1level_home.y width: 138 height: 70 btnImg: pressed?"qrc:MATERIAL/MATERIAL_M8X_BACK_BUTTON_P" + bgImageStyle:"qrc:MATERIAL/MATERIAL_M8X_BACK_BUTTON" + bgImageStyle Image { id:back_btn_image x:20 anchors.verticalCenter: parent.verticalCenter width: 20 height:34 source: "qrc:MATERIAL/MATERIAL_M8X_ICON_BACK" + bgImageStyle } HMILabel { id:back_btn_label x:44 width: 94//60 height: 70 text: qsTr("Back") + systemCtrl.emptyString font.pixelSize: 30 verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignLeft } onClicked: { console.debug("DiagInstallWindow Back Button Clicked") //diagCtrl.bInstallMode = false ScreenManager.changeForm(Layout.FM_OPEN, WindowsList.DIAG_RADIOPART1) } } Item { id: diag_part1level_home_Flickable x: 0 - part1level_home.x y: 265 - part1level_home.y width: 842 height: 760//636//760-124 Column { id:flick1 width: 842 spacing: 2 Image { id: title_fm x: 20 width: 842 height: 78 source: "qrc:MATERIAL/MATERIAL_M8X_LIST_78" + bgImageStyle visible: true HMILabel { id:fm x: 20 width: 200 height: 78 anchors.verticalCenter: parent.verticalCenter horizontalAlignment: Text.AlignLeft font.pixelSize: 24 text:"FM SG:" color:"white" } HMILabel { id:freq_fm x: 250 width: 200 height: 78 visible: (radioCtrl.currentBand == 0)?true:false anchors.verticalCenter: parent.verticalCenter horizontalAlignment: Text.AlignLeft font.pixelSize: 24 text:currentRadioFreq + "MHz" color:"white" } } Row { id: fmAlignment_ROW width: 842 height: 78 visible: true Item { width: 842 height: 78 HMIButton // the button of FM Alignment { id:fmAlignment x: 20 width: 262 height: 78 visible: true btnImg: pressed?"qrc:MATERIAL/MATERIAL_M8X_SETTINGS_BUTTON_W262_P" + bgImageStyle:"qrc:MATERIAL/MATERIAL_M8X_SETTINGS_BUTTON_W262" + bgImageStyle HMILabel { id:fmAlignment_txt width: 262 height: 78 anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter font.pixelSize: 24 text:"Alignment" color:"white" } onClicked: { popResult.visible = true popResultText.text = "-" diagCtrl.reqAlignment(0) } } } } Image { id: title_am x: 20 width: 842 height: 78 visible: true source: "qrc:MATERIAL/MATERIAL_M8X_LIST_78" + bgImageStyle HMILabel { id:am x: 20 width: 200 height: 78 anchors.verticalCenter: parent.verticalCenter horizontalAlignment: Text.AlignLeft font.pixelSize: 24 text:"AM SG:" color:"white" } HMILabel { id:freq_am x: 250 width: 200 height: 78 visible: (radioCtrl.currentBand == 1)?true:false anchors.verticalCenter: parent.verticalCenter horizontalAlignment: Text.AlignLeft font.pixelSize: 24 text:currentRadioFreq + "kHz" color:"white" } } Row { id: amAlignment_ROW width: 842 height: 78 visible: true Item { width: 842 height: 78 HMIButton // the button of AM Alignment { id:amAlignment x: 20 width: 262 height: 78 visible: true btnImg: pressed?"qrc:MATERIAL/MATERIAL_M8X_SETTINGS_BUTTON_W262_P" + bgImageStyle:"qrc:MATERIAL/MATERIAL_M8X_SETTINGS_BUTTON_W262" + bgImageStyle HMILabel { id:amAlignment_txt width: 262 height: 78 anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter font.pixelSize: 24 text:"Alignment" color:"white" } onClicked: { popResult.visible = true popResultText.text = "-" diagCtrl.reqAlignment(1) } } } } } } Item { id:popResult visible: false anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter Image { anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter width: 844 height: 352 source: "qrc:MATERIAL/MATERIAL_M8X_POPUP_BG_WARNING" + bgImageStyle Rectangle { anchors.fill: parent color: "black" } HMILabel { id:popResultText width: 844 height: 352 anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter text:qsTr("-") color:"red" } HMIMouseArea { anchors.fill: parent onClicked: { console.log("popResult onClicked +++++++++++++++++") } } } } /* Pop up result Timer */ Timer { id:popUpResultTimer interval: 2000 running: false repeat: false onTriggered: { popResult.visible = false popUpResultTimer.stop() } } Connections { target: diagCtrl onAliStatusSuccess: { console.log("Diag_RadioPart1Level.qml onSepStatusSuccess -->") popResultText.text = qsTr("OK") popUpResultTimer.start() } onAliStatusFailed: { console.log("Diag_RadioPart1Level.qml onSepStatusFailed -->") popResultText.text = qsTr("NG") popUpResultTimer.start() } } }