import QtQml 2.3 import QtQuick 2.6 import QtQuick.Window 2.2 import QtQuick.Controls 2.0 import QtDataVisualization 1.2 import QtQuick3D import QtCharts 2.0 import QtMultimedia import QtQuick.Layouts 1.3 import "backend.js" as Backend /* 智能驾驶系统显示界面 */ Item { id: mainWindow visible: true width: 3840 height: 1080 property int mainHeight: 1000 property int camHeight: 360 property int lineWidth: 10 property int statusWidth: 480 property int leftCamWidth: 620 property int frontCamWidth: 1660 property int rightCamWidth: 620 property int radarWidth: 480 property int radarSize: 120 property int radarRedRange: 2000 property int radarGreenRange: 4000 property string radarRightFGreenImg: 'qrc:/images/right_f_green.png' property string radarRightFYellowImg: 'qrc:/images/right_f_yellow.png' property string radarRightFRedImg: 'qrc:/images/right_f_red.png' property string radarRightRGreenImg: 'qrc:/images/right_r_green.png' property string radarRightRYellowImg: 'qrc:/images/right_r_yellow.png' property string radarRightRRedImg: 'qrc:/images/right_r_red.png' property string radarLeftFGreenImg: 'qrc:/images/left_f_green.png' property string radarLeftFYellowImg: 'qrc:/images/left_f_yellow.png' property string radarLeftFRedImg: 'qrc:/images/left_f_red.png' property string radarLeftRGreenImg: 'qrc:/images/left_r_green.png' property string radarLeftRYellowImg: 'qrc:/images/left_r_yellow.png' property string radarLeftRRedImg: 'qrc:/images/left_r_red.png' property string radarBottomGreenImg: 'qrc:/images/bottom_green.png' property string radarBottomYellowImg: 'qrc:/images/bottom_yellow.png' property string radarBottomRedImg: 'qrc:/images/bottom_red.png' property int radarRightMargin: 40 property int radarTopMargin: 350 property int radarBottomMargin: 280 property int radarleftMargin: 200 property int radarTxtSize: 14 property int currentIndex: 0 property var textList: [{ "text": " ", "visible": true }, { "text": "机油压力低报警", //"visible": true "visible": appModel.lowOilPressureAlarm }, { "text": "发动机水温高报警", "visible": appModel.engineWaterTemperatureAlarm //"visible": true }, { //"text": "发动机油温高报警", "visible": appModel.highEngineOilTemperatureAlarm //"visible": true }, { "text": "发动机水位低报警", "visible": appModel.engineWaterLevelLowAlarm //"visible": true }, { "text": "燃油油位低报警", "visible": appModel.lowFuelOilAlarm //"visible": true }, { "text": "回油滤网堵塞报警", "visible": appModel.returnOilFilterBlockedAlarm //"visible": true }, { "text": "吸油滤网堵塞报警", "visible": appModel.oilFilterBlockedAlarm //"visible": true }, { "text": "控制滤网堵塞报警", "visible": appModel.controlScreenBlockageAlarm //"visible": true }, { "text": "应急滤网堵塞报警", "visible": appModel.emergencyFilterBlockingAlarm //"visible": true }, { "text": "冷却滤网堵塞报警", "visible": appModel.coolingFilterBlockedAlarm //"visible": true }, { "text": "电泵滤网堵塞报警", "visible": appModel.electricPumpScreenBlockedAlarm //"visible": true }, { "text": "制动滤网堵塞报警", "visible": appModel.brakeFilterBlockedAlarm //"visible": true }, { "text": "变速滤网堵塞报警", "visible": appModel.variableSpeedFilterBlockedAlarm //"visible": true }, { "text": "电压低报警", //"visible": appModel.lowVoltageAlarm "visible": true }, { "text": "变速箱油温高", "visible": appModel.highTransmissionOilTemperature //"visible": true }, { "text": "变速箱油压低", "visible": appModel.transmissionOilPressureIsLow //"visible": true }, { "text": "油温传感器1故障", "visible": appModel.oilTemperatureSensor1IsFaulty //"visible": true }, { "text": "油温传感器2故障", "visible": appModel.oilTemperatureSensor2IsFaulty //"visible": true }, { "text": "油位传感器故障", //"visible": true "visible": appModel.oilLevelSensorIsFaulty }, { "text": "前油门故障", "visible": appModel.frontThrottleFault //"visible": true }, { "text": "后油门故障", //"visible": true "visible": appModel.rearThrottleFault }, { "text": "大臂手柄故障", //"visible": true "visible": appModel.handleOfTheUpperArmIsFaulty }, { "text": "左支腿手柄故障", "visible": appModel.leftLegHandleIsFaulty //"visible": true }, { "text": "右支腿手柄故障", //"visible": true "visible": appModel.rightLegHandleIsFaulty }, { "text": "发动机总线故障", //"visible": true "visible": appModel.engineBusFault }, { "text": "变速箱总线故障", //"visible": true "visible": appModel.transmissionBusFault }, { "text": "遥控器总线故", //"visible": true "visible": appModel.remoteControlBusFault }, { "text": "有杆腔传感器故障", //"visible": true "visible": appModel.rodChamberPressureSensorIsFaulty }, { "text": "无杆腔传感器故障", //"visible": true "visible": appModel.noRodChamberPressureSensorIsFaulty }, { "text": "制动压力传感器故障", //"visible": true "visible": appModel.brakePressureSensorIsFaulty }, { "text": "系统压力传感器故障", //"visible": true "visible": appModel.systemPressureSensorIsFaulty }, { "text": "控制压力传感器故障", //"visible": true "visible": appModel.controlPressureSensorIsFaulty }, { "text": "转向压力传感器故障", //"visible": true "visible": appModel.steeringPressureSensorIsFaulty }, { "text": "小臂压力传感器故障", //"visible": true "visible": appModel.pressureSensorOfTheLowerArmIsFaulty }, { "text": "锁销位移传感器L故障", //"visible": true "visible": appModel.lockingPinDisplacementSensorLIsFaulty }, { "text": "锁销位移传感器R故障", //"visible": true "visible": appModel.lockingPinDisplacementSensorRIsFaulty }, { "text": "支腿位移传感器L故障", //"visible": true "visible": appModel.legDisplacementSensorLIsFaulty }, { "text": "支腿位移传感器R故障", //"visible": true "visible": appModel.legDisplacementSensorRIsFaulty }, { "text": "转向编码器故障", //"visible": true "visible": appModel.steeringEncoderFailure } ] function getCurrentDate() { var currentDate = new Date(); var year = currentDate.getFullYear(); var month = currentDate.getMonth() + 1; // 月份是从0开始的,所以要加1 var day = currentDate.getDate(); return year + "-" + (month < 10 ? "0" + month : month) + "-" + (day < 10 ? "0" + day : day); } FontLoader { id: alibaba source: "qrc:/components/font/Alibaba-PuHuiTi-Bold.ttf" } FontLoader { id: fontawesome source: "qrc:/components/font/fontawesome-webfont.ttf" } Rectangle { id: mainForm anchors.fill: parent Image { fillMode: Image.PreserveAspectFit source: 'qrc:/images/bg4k.png'} Rectangle { id: mainFormHeader width: mainForm.width height: 80 color: 'transparent' Image { id: mainFormBannerBg anchors.top: mainFormHeader.top anchors.horizontalCenter: mainFormHeader.horizontalCenter fillMode: Image.PreserveAspectFit source: 'qrc:/images/banner.png' } Text { id: mainFormTitle width: mainFormHeader.width height: mainFormHeader.height horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter text: textTitle font.family: alibaba.name font.pointSize: 24 color: mainTextColor } Text { id: delayms text: '网络延迟: ' + (appModel.ping / 2).toFixed(1) + ' ms' //text: ((appModel.ping / 2).toFixed(1)>20)?('网络延迟: ' + '8' + ' ms'):('网络延迟: ' + '0' + ' ms') color: appModel.ping/2 > 200 ? popupBgColorErr : mainTextColor font.family: alibaba.name font.pointSize: 14 anchors.right: mainFormHeader.right anchors.rightMargin: 1050 anchors.top: mainFormHeader.top anchors.topMargin: 40 } } Rectangle { id: mainFormContent width: mainForm.width height: mainForm.height - 80 anchors.top: mainFormHeader.bottom color: 'transparent' Row { Rectangle { id: statusData width: statusWidth + lineWidth -100 height: mainHeight color: 'transparent' Rectangle { id: carImage width: statusData.width - 200 height: 300 color: 'transparent' anchors.horizontalCenter: statusData.horizontalCenter anchors.top: statusData.top anchors.topMargin: 50 anchors.left: statusData.left anchors.horizontalCenterOffset: 10 Text{ text:"车辆姿态" color: mainTextColor anchors.top: carImage.bottom anchors.topMargin: -300 anchors.left: carImage.left anchors.leftMargin: 50 font.family:alibaba.name font.pointSize:14 } Row{ id: drivePicture width: statusData.width - 100 height: 300 anchors.top: carImage.bottom anchors.topMargin: -250 anchors.left: carImage.left anchors.leftMargin: 50 Image { id:carPicture width: 360/2 height: 240/2 anchors.right:carImage.right anchors.rightMargin:320 source: 'qrc:/images/wagon.png' } Text{ text:"转向角度" color: mainTextColor anchors.left:carPicture.right anchors.leftMargin:10 anchors.top: carPicture.top anchors.topMargin: 60 font.family:alibaba.name font.pointSize:14 } Text { id: trunAngle1 text:appModel.Steer.toFixed(1) //text: "15" color: mainTextColor anchors.left:carPicture.right anchors.leftMargin:100 anchors.top: carPicture.top anchors.topMargin: 63 font.family: digtalFont.name font.pointSize: 14 } Text{ text:"°" color: mainTextColor anchors.left:trunAngle1.right anchors.leftMargin:5 anchors.top: carPicture.top anchors.topMargin: 60 font.family:alibaba.name font.pointSize:14 } spacing:20 } } Row { id: driveDataForm width: statusData.width - 100 height: 300 anchors.bottom: carImage.bottom anchors.bottomMargin: -180 anchors.left: carImage.left anchors.leftMargin: 50 Image{ id:carIDImage source:'qrc:/images/ID.png' } Text { text:"车辆ID:" color: mainTextColor font.family: alibaba.name font.pointSize: 14 anchors.left: carIDImage.left anchors.leftMargin: 60 } Text { id: driveOpType text:appModel.CarName //text:'一号车' color: '#FFFFFF' anchors.bottom: carIDImage.bottom anchors.bottomMargin: 6 font.family: digtalFont.name font.pointSize: 12 anchors.left: carIDImage.left anchors.leftMargin: 180 } Text { text:"No." color: mainTextColor font.family: alibaba.name font.pointSize: 14 anchors.left: carIDImage.left anchors.leftMargin: 280 } //spacing: 30 } Row { id: carDataForm width: statusData.width - 100 height: 300 anchors.bottom: carImage.bottom anchors.bottomMargin: -210 anchors.left: carImage.left anchors.leftMargin: 50 Image{ id:waterTemp source:'qrc:/images/shuiwen.png' } Text { text:"发动机水温 :" color: mainTextColor font.family: digtalFont.name font.pointSize: 14 anchors.left: waterTemp.left anchors.leftMargin: 60 } Text { id: carOpType text:appModel.Cold //text:'65' color: '#FFFFFF' anchors.bottom: waterTemp.bottom anchors.bottomMargin: 6 anchors.left: waterTemp.left anchors.leftMargin: 220 font.family: digtalFont.name font.pointSize: 14 } Text { text:"℃" color: mainTextColor font.family: alibaba.name font.pointSize: 14 anchors.left: waterTemp.left anchors.leftMargin: 280 } //spacing: 30 } Row { id: tempState width: statusData.width - 100 height: 300 anchors.bottom: carImage.bottom anchors.bottomMargin: -240 anchors.left: carImage.left anchors.leftMargin: 50 visible:true Image{ id: enginP source:'qrc:/images/yali.png' } Text { text: "发动机压力:" color: mainTextColor font.family: digtalFont.name font.pointSize: 14 anchors.left: enginP.left anchors.leftMargin: 60 } Text { id: tempValue text: appModel.EngineOilPressure //text:'47' color: '#FFFFFF' anchors.bottom: enginP.bottom anchors.bottomMargin: 6 anchors.left: enginP.left anchors.leftMargin: 220 font.family: digtalFont.name font.pointSize: 14 } Text { text: "Kpa" color: mainTextColor font.family: alibaba.name font.pointSize: 14 anchors.left: enginP.left anchors.leftMargin: 280 } //spacing: 30 } Row { id: steerState width: statusData.width - 100 height: 300 anchors.bottom: carImage.bottom anchors.bottomMargin: -270 anchors.left: carImage.left anchors.leftMargin: 50 visible:true Image{ id:brakeP source:'qrc:/images/yali.png' } Text { text: "制动气压 :" color: mainTextColor font.family: digtalFont.name font.pointSize: 14 anchors.left: brakeP.left anchors.leftMargin: 60 } Text { id: steer text: appModel.BrakePressure //text:'45' color: '#FFFFFF' anchors.bottom: brakeP.bottom anchors.bottomMargin: 6 anchors.left: brakeP.left anchors.leftMargin: 220 font.family: digtalFont.name font.pointSize: 14 } Text { text: "Kpa" color: mainTextColor font.family: alibaba.name font.pointSize: 14 anchors.left: brakeP.left anchors.leftMargin: 280 } //spacing: 30 } Row { id: rpmState width: statusData.width - 100 height: 300 anchors.bottom: carImage.bottom anchors.bottomMargin: -300 anchors.left: carImage.left anchors.leftMargin: 50 visible:appModel.Visible Image{ id:pelotTemp source:'qrc:/images/youwen.png' } Text { text: "变速箱油温:" color: mainTextColor font.family: digtalFont.name font.pointSize: 14 anchors.left: pelotTemp.left anchors.leftMargin: 60 } Text { id: rpmValue text: appModel.GearboxOilTemp //text:'57' color: '#FFFFFF' anchors.bottom: pelotTemp.bottom anchors.bottomMargin: 6 anchors.left: pelotTemp.left anchors.leftMargin: 220 font.family: digtalFont.name font.pointSize: 14 } Text { text: "℃" color: mainTextColor font.family: alibaba.name font.pointSize: 14 anchors.left: pelotTemp.left anchors.leftMargin: 280 } spacing: 30 } Row { id: gpaState width: statusData.width - 100 height: 300 anchors.bottom: carImage.bottom anchors.bottomMargin: -330 anchors.left: carImage.left anchors.leftMargin: 50 visible:appModel.Visible Image{ id:pelotP source:'qrc:/images/youliang.png' } Text { text: "变速箱油压:" color: mainTextColor font.family: digtalFont.name font.pointSize: 14 anchors.left: pelotP.left anchors.leftMargin: 60 } Text { id: gpavalue text: appModel.GearboxOilPressure //text:'51' color: '#FFFFFF' anchors.bottom: pelotP.bottom anchors.bottomMargin: 6 anchors.left: pelotP.left anchors.leftMargin: 220 font.family: digtalFont.name font.pointSize: 14 } Text { text: "Bar" color: mainTextColor font.family: alibaba.name font.pointSize: 14 anchors.left: pelotP.left anchors.leftMargin: 280 } spacing: 30 } Row { id: coldState width: statusData.width - 100 height: 300 anchors.bottom: carImage.bottom anchors.bottomMargin: -360 anchors.left: carImage.left anchors.leftMargin: 50 visible:appModel.Visible Image{ id:engineHour source:'qrc:/images/xiaoshi.png' } Text { text: "发动机工作小时:" color: mainTextColor font.family: digtalFont.name font.pointSize: 14 anchors.left: engineHour.left anchors.leftMargin: 60 } Text { id: coldValue text: appModel.engineTime //text:'8' color: '#FFFFFF' anchors.bottom: engineHour.bottom anchors.bottomMargin: 6 anchors.left: engineHour.left anchors.leftMargin: 220 font.family: digtalFont.name font.pointSize: 14 } Text { text: "h" color: mainTextColor font.family: alibaba.name font.pointSize: 14 anchors.left: engineHour.left anchors.leftMargin: 280 } spacing: 30 } Row { id: paState width: statusData.width - 100 height: 300 anchors.bottom: carImage.bottom anchors.bottomMargin: -390 anchors.left: carImage.left anchors.leftMargin: 50 visible:appModel.Visible Image{ id:bagWeight source:'qrc:/images/zhongliang.png' } Text { text: "渣包重量:" color: mainTextColor font.family: digtalFont.name font.pointSize: 14 anchors.left: bagWeight.left anchors.leftMargin: 60 } Text { id: paValue text: appModel.cargoWeight //text:'12' color: '#FFFFFF' anchors.bottom: bagWeight.bottom anchors.bottomMargin: 6 anchors.left: bagWeight.left anchors.leftMargin: 220 font.family: digtalFont.name font.pointSize: 14 } Text { text: "tons" color: mainTextColor font.family: alibaba.name font.pointSize: 14 anchors.left: bagWeight.left anchors.leftMargin: 280 } spacing: 30 } Row { id: gearState width: statusData.width - 100 height: 300 anchors.bottom: carImage.bottom anchors.bottomMargin: -420 anchors.left: carImage.left anchors.leftMargin: 50 visible:appModel.Visible Image{ id:powerV source:'qrc:/images/dianya.png' } Text { text: "电压:" color: mainTextColor font.family: digtalFont.name font.pointSize: 14 anchors.left: powerV.left anchors.leftMargin: 60 } Text { id: gearValue text: appModel.systemVol //text:'24' color: '#FFFFFF' anchors.bottom: powerV.bottom anchors.bottomMargin: 6 anchors.left: powerV.left anchors.leftMargin: 220 font.family: digtalFont.name font.pointSize: 14 } Text { text: "V" color: mainTextColor font.family: alibaba.name font.pointSize: 14 anchors.left: powerV.left anchors.leftMargin: 280 } spacing: 30 } Row { id: brakeState width: statusData.width - 100 height: 300 anchors.bottom: carImage.bottom anchors.bottomMargin: -450 anchors.left: carImage.left anchors.leftMargin: 50 visible:appModel.Visible Image{ id:oilV source:'qrc:/images/youliang.png' } Text { text: "油量 :" color: mainTextColor font.family: digtalFont.name font.pointSize: 14 anchors.left: oilV.left anchors.leftMargin: 60 } Text { id: brakeValue text: appModel.fuelLevel //text:'70' color: '#FFFFFF' anchors.bottom: oilV.bottom anchors.bottomMargin: 6 anchors.left: oilV.left anchors.leftMargin: 220 font.family: digtalFont.name font.pointSize: 14 } Text { text: "%" color: mainTextColor font.family: alibaba.name font.pointSize: 14 anchors.left: oilV.left anchors.leftMargin: 280 } spacing: 30 } Row { id: presState width: statusData.width - 100 height: 300 anchors.bottom: carImage.bottom anchors.bottomMargin: -480 anchors.left: carImage.left anchors.leftMargin: 50 visible:appModel.Visible spacing: 30 Image{ id:warningN source:'qrc:/images/guzhang.png' } Text { id:faultyText text: "故障信息 :" color: mainTextColor font.family: digtalFont.name font.pointSize: 14 } Timer { id: timer interval: textList[currentIndex].visible ? 3000 : 0 running: true repeat: true onTriggered: { do { currentIndex = (currentIndex + 1) % textList.length } while (!textList[currentIndex].visible) } } Text { id: faultyTextValue anchors.bottom: warningN.bottom anchors.bottomMargin: 3 text: textList[currentIndex].text color: 'red' font.family: alibaba.name font.pointSize: 14 visible: textList[currentIndex].visible } } Rectangle { id: refreshDate width: statusData.width - 100 height: 50 color:"transparent" anchors.top: statusData.top anchors.topMargin: -40 anchors.left: statusData.left anchors.leftMargin: 180 //展示时间 Text { id: localTime width: 140 height: 50 anchors.horizontalCenter: refreshDate.horizontalCenter color: '#FFFFFF' font.family: digtalFont.name font.pointSize: 20 text: new Date().toLocaleTimeString() Component.onCompleted: { localTimeRefresh.start() } } Text { id: localTimeCurrentDate width: 140 height: 50 //anchors.horizontalCenter: refreshDate.horizontalCenter anchors.left:refreshDate.left anchors.leftMargin:-80 color: '#FFFFFF' font.family: digtalFont.name font.pointSize: 20 text: getCurrentDate() Component.onCompleted: { localTimeRefresh.start() } } Timer { id: localTimeRefresh interval: 1000 repeat: true onTriggered: { localTimeCurrentDate.text = getCurrentDate() localTime.text = new Date().toLocaleTimeString() } } } //bb Row { //仪表盘1 id: dashboard1 anchors.top: presState.bottom anchors.topMargin: -180 anchors.left: presState.left anchors.leftMargin: -30 Image { id: dashboardImage1 z: 99 height: 200 width: 200 fillMode: Image.Stretch visible: true source: 'qrc:/images/engineSpeed.png' } Image { id: pointer1 x: dashboardImage1.width / 2 - pointer1.width / 2 - 20 y: dashboardImage1.height / 2 - pointer1.height / 2 + 10 z: 99 height: 94 / 2 width: 140 / 2 fillMode: Image.Stretch visible: true source: 'qrc:/images/pointer.png' Component.onCompleted: { posPointer1Timer.start() } transform: Rotation { id: rotation origin.x: pointer1.width / 2 + 20 origin.y: pointer1.height / 2 - 10 angle: 0 } } RotationAnimation { id: posPointer1 target: rotation from: 0 to: 0 duration: 100 } Timer { id: posPointer1Timer interval: 500 repeat: true onTriggered: { posPointer1.to = appModel.EnginRpm / 5000 * 240 //posPointer1.to = 0 posPointer1.from = posPointer1.to posPointer1.start() } } Text { id: dashboard1Text anchors.bottom: dashboardImage1.bottom anchors.bottomMargin: -40 anchors.left: dashboard1.left anchors.leftMargin: 55 text: "发动机转速" color: mainTextColor font.family: alibaba.name font.pointSize: 14 } Text { id: dashboard1Text1 anchors.bottom: dashboard1Text.bottom anchors.bottomMargin: -20 anchors.left: dashboard1Text.left anchors.leftMargin: 25 text: "rpm" color: mainTextColor font.family: alibaba.name font.pointSize: 14 } spacing: 50 Text { id: dashboardImage1TextValue anchors.bottom: dashboard1Text1.bottom anchors.bottomMargin: -35 anchors.left: dashboard1Text1.left anchors.leftMargin: 0 text: appModel.EnginRpm color:'red' font.family: digtalFont.name font.pointSize: 18 } Image { id: circle_green1 anchors.bottom: dashboard1Text1.bottom anchors.bottomMargin: -45 anchors.left: dashboard1Text.left anchors.leftMargin: -10 z: 99 height: 40 width: 110 fillMode: Image.Stretch visible: true source: 'qrc:/images/circle_green1.png' } } Row { //仪表盘2 id: dashboard2 anchors.top: presState.bottom anchors.topMargin: -180 anchors.left: presState.right anchors.leftMargin: -130 Image { id: dashboardImage2 z: 99 height: 200 width: 200 fillMode: Image.Stretch visible: true source: 'qrc:/images/carSpeed.png' } Image { id: pointer2 x: dashboardImage2.width / 2 - pointer2.width / 2 - 20 y: dashboardImage2.height / 2 - pointer2.height / 2 + 10 z: 99 height: 94 / 2 width: 140 / 2 fillMode: Image.Stretch visible: true source: 'qrc:/images/pointer.png' Component.onCompleted: { posPointer2Timer.start() } transform: Rotation { id: rotation2 origin.x: pointer2.width / 2 + 20 origin.y: pointer2.height / 2 - 10 angle: 0 } } RotationAnimation { id: posPointer2 target: rotation2 from: 0 to: 0 duration: 100 } Timer { id: posPointer2Timer interval: 500 repeat: true onTriggered: { //posPointer2.to = posPointer1.to = appModel.Speed / 5000 * 240 posPointer2.to = appModel.Speed / 5000 * 240 posPointer2.from = posPointer2.to //posPointer2.to = 240 posPointer2.start() } } Text { id: dashboard2Text anchors.bottom: dashboardImage2.bottom anchors.bottomMargin: -40 anchors.left: dashboard2.left anchors.leftMargin: 60 text: "行驶速度" color: mainTextColor font.family: alibaba.name font.pointSize: 14 } Text { id: dashboard2Text1 anchors.bottom: dashboard2Text.bottom anchors.bottomMargin: -20 anchors.left: dashboard2Text.left anchors.leftMargin: 15 text: "km/h" color: mainTextColor font.family: alibaba.name font.pointSize: 14 } spacing: 50 Text { id: dashboardImage2TextValue anchors.bottom: dashboard2Text1.bottom anchors.bottomMargin: -35 anchors.left: dashboard2Text1.left anchors.leftMargin: 10 text:appModel.Speed //text:'0' color:'red' Component.onCompleted: { } font.family: digtalFont.name font.pointSize: 18 } Image { id: circle_green2 anchors.bottom: dashboard2Text1.bottom anchors.bottomMargin: -45 anchors.left: dashboard2Text.left anchors.leftMargin: -20 z: 99 height: 40 width: 110 fillMode: Image.Stretch visible: true source: 'qrc:/images/circle_green1.png' } } //登录界面最左侧上边框 Image { id: sideUp_right1 z: 99 height: 620 anchors.left: statusData.left anchors.leftMargin: -40 anchors.top: statusData.top anchors.topMargin: 0 fillMode: Image.Stretch visible: true source: 'qrc:/images/sideUp_left.png' } //登录界面最左侧上边框 Image { id: sideUp_left1 z: 99 height: 620 anchors.left: statusData.left anchors.leftMargin: 320 anchors.top: statusData.top anchors.topMargin: 0 fillMode: Image.Stretch visible: true source: 'qrc:/images/sideUp_left1.png' } //登录界面最左侧下边框 Image { id: sideDown_left1 z: 99 height: 400 anchors.left: statusData.left anchors.leftMargin: -40+50 anchors.top: statusData.top anchors.topMargin: 600 fillMode: Image.Stretch source: 'qrc:/images/sideDown_left.png' } //登录界面最右侧下边框 Image { id: sideDown_right1 z: 99 height: 400 anchors.left: statusData.left anchors.leftMargin: 320-50 anchors.top: statusData.top anchors.topMargin: 600 fillMode: Image.Stretch visible: true source: 'qrc:/images/sideDown_right.png' } } Rectangle { id: leftCam width: leftCamWidth + lineWidth height: mainHeight color: 'transparent' z:100 Rectangle { id: backImgRect1 width: frontCamWidth height: mainHeight color: 'transparent' x:25 z:100 //y:mainHeight/2+200 border.color: "transparent" border.width: 1 Rectangle { Image { fillMode: Image.Stretch x: 10 y: 440-170 z: 99 visible: true source: 'qrc:/images/left_light1.png' } Image { fillMode: Image.Stretch x: 10 y: 440-170 z: 99 visible: appModel.turnLeft === 1 //visible: true source: 'qrc:/images/left_light.png' } Text { id: leftLight x: 10 y: 470-170 z: 99 text: "左转" color: "#70FFFFFF" font.family: alibaba.name font.pointSize: radarTxtSize } } Rectangle { Image { x: 10 y: 500-170 z: 99 fillMode: Image.Stretch visible: true source: 'qrc:/images/frontlight1.png' } Image { x: 10 y: 500-170 z: 99 fillMode: Image.Stretch visible: appModel.hightBeam === 1 //visible: true source: 'qrc:/images/frontlight.png' } Text { id: frontlight x: 10 y: 530-170 z: 99 text: "远光" color: "#70FFFFFF" font.family: alibaba.name font.pointSize: radarTxtSize } } Rectangle { Image { fillMode: Image.Stretch x: 10 y: 560-170 z: 99 visible: true source: 'qrc:/images/jinguang1.png' } Image { fillMode: Image.Stretch x: 10 y: 560-170 z: 99 visible: appModel.lowBeam === 1 //visible: true source: 'qrc:/images/jinguang.png' } Text { id: emergency x: 10 y: 590-170 z: 99 text: "近光" color: "#70FFFFFF" font.family: alibaba.name font.pointSize: radarTxtSize } } Rectangle { Image { fillMode: Image.Stretch x: 10 y: 620-170 z: 99 visible: true source: 'qrc:/images/emergency1.png' } Image { fillMode: Image.Stretch x: 10 y: 620-170 z: 99 visible: appModel.parking === true //visible:true source: 'qrc:/images/emergency.png' } Text { id: buzzer x: 10 y: 650-170 z: 99 text: "驻车" color: "#70FFFFFF" font.family: alibaba.name font.pointSize: radarTxtSize } } Rectangle { Image { fillMode: Image.Stretch x: 10 y: 680-170 z: 99 visible: true source: 'qrc:/images/shache.png' } Image { fillMode: Image.Stretch x: 10 y: 680-170 z: 99 visible: appModel.brake === 1 //visible:true source: 'qrc:/images/shache_red.png' } Text { id: wiper x: 10 y: 715-170 z: 99 text: "刹车" color: "#70FFFFFF" font.family: alibaba.name font.pointSize: radarTxtSize } } Rectangle { Image { fillMode: Image.Stretch x: 10 y: 745-170 z: 99 visible: true source: 'qrc:/images/daoche.png' } Image { fillMode: Image.Stretch x: 10 y: 745-170 z: 99 visible: appModel.backCar === 1 //visible:true source: 'qrc:/images/daoche_red.png' } Text { id: backForward x: 10 y: 775-170 z: 99 text: "倒车" color: "#70FFFFFF" font.family: alibaba.name font.pointSize: radarTxtSize } } Rectangle { Image { fillMode: Image.Stretch x: 10 y: 810-170 z: 99 visible: true source: 'qrc:/images/wiper1.png' } Image { fillMode: Image.Stretch x: 10 y: 810-170 z: 99 visible: appModel.frontWorkLamp === 1 //visible:true source: 'qrc:/images/wiper.png' } Text { id: frontLight x: 10-10 y: 840-170+10 z: 99 text: "前工作灯" color: "#70FFFFFF" font.family: alibaba.name font.pointSize: radarTxtSize } } Rectangle { Image { fillMode: Image.Stretch x: 10 y: 875-170 z: 99 visible: true source: 'qrc:/images/wiper1.png' } Image { fillMode: Image.Stretch x: 10 y: 875-170 z: 99 visible: appModel.rearWorkLamp === 1 //visible:true source: 'qrc:/images/wiper.png' } Text { id: backLight x: 10-10 y: 905-170+10 z: 99 text: "后工作灯" color: "#70FFFFFF" font.family: alibaba.name font.pointSize: radarTxtSize } } Rectangle { Image { fillMode: Image.Stretch x: 880+550 y: 645-170 z: 100 visible:false source: 'qrc:/images/carStop.png' } Text { id: emergencyLight x: 913+550 y: 775-170 z: 100 visible:false text: "急停" color: "red" font.family: alibaba.name font.pointSize: 24 } } Rectangle { Image { fillMode: Image.Stretch x: 1845+1015 y: 440-170 z: 99 visible: true source: 'qrc:/images/right_light1.png' } Image { fillMode: Image.Stretch x: 1845+1015 y: 440-170 z: 99 //visible: true visible: appModel.turnRight === 1 source: 'qrc:/images/right_light.png' } Text { id: rightLight x: 1845+1015 y: 470-170 z: 99 text: "右转" font.family: alibaba.name font.pointSize: radarTxtSize color: "#70FFFFFF" } } Rectangle { Image { fillMode: Image.Stretch x: 1845+1015 y: 500-170 z: 99 visible: true source: 'qrc:/images/1.png' } Image { fillMode: Image.Stretch x: 1845+1015 y: 500-170 z: 99 visible:appModel.gear1 === 1 //visible: true source: 'qrc:/images/1_green.png' } Text { id: gear_d_1 x: 1845+1015 y: 530-170 z: 99 text: " 1档" font.family: alibaba.name font.pointSize: radarTxtSize color: "#70FFFFFF" } } Rectangle { Image { fillMode: Image.Stretch x: 1845+1015 y: 560-170 z: 99 visible: true source: 'qrc:/images/2.png' } Image { fillMode: Image.Stretch x: 1845+1015 y: 560-170 z: 99 visible:appModel.gear1 === 2 //visible: true source: 'qrc:/images/2_green.png' } Text { id: gear_d_2 x: 1845+1015 y: 590-170 z: 99 text: " 2档" font.family: alibaba.name font.pointSize: radarTxtSize color: "#70FFFFFF" } } Rectangle { Image { fillMode: Image.Stretch x: 1845+1015 y: 620-170 z: 99 visible: true source: 'qrc:/images/3.png' } Image { fillMode: Image.Stretch x: 1845+1015 y: 620-170 z: 99 visible:appModel.gear1 === 3 //visible: true source: 'qrc:/images/3_green.png' } Text { id: gear_d_3 x: 1845+1015 y: 650-170 z: 99 text: " 3档" font.family: alibaba.name font.pointSize: radarTxtSize color: "#70FFFFFF" } } Rectangle { Image { fillMode: Image.Stretch x: 1845+1015 y: 680-170 z: 99 visible: true source: 'qrc:/images/4.png' } Image { fillMode: Image.Stretch x: 1845+1015 y: 680-170 z: 99 visible:appModel.gear1 === 4 //visible: true source: 'qrc:/images/4_green.png' } Text { id: gear_d_4 x: 1845+1015 y: 710-170 z: 99 text: " 4档" font.family: alibaba.name font.pointSize: radarTxtSize color: "#70FFFFFF" } } Rectangle { Image { fillMode: Image.Stretch x: 1845+1015 y: 740-170 z: 99 visible: true source: 'qrc:/images/gear_d1.png' } Image { fillMode: Image.Stretch x: 1845+1015 y: 740-170 z: 99 visible: appModel.fGear === 1 //visible: true source: 'qrc:/images/gear_d.png' } Text { id: gear_d x: 1845+1015 y: 770-170 z: 99 text: " F档" font.family: alibaba.name font.pointSize: radarTxtSize color: "#70FFFFFF" } } Rectangle { Image { fillMode: Image.Stretch x: 1845+1015 y: 800-170 z: 99 visible: true source: 'qrc:/images/gear_n1.png' } Image { fillMode: Image.Stretch x: 1845+1015 y: 800-170 z: 99 visible: appModel.fGear === 3 //visible: true source: 'qrc:/images/gear_n.png' } Text { id: gear_n x: 1845+1015 y: 830-170 z: 99 text: " N档" font.family: alibaba.name font.pointSize: radarTxtSize color: "#70FFFFFF" } } Rectangle { Image { fillMode: Image.Stretch x: 1845+1015 y: 860-170 z: 99 visible: true source: 'qrc:/images/gear_r1.png' } Image { fillMode: Image.Stretch x: 1845+1015 y: 860-170 z: 99 visible: appModel.fGear === 2 //visible: true source: 'qrc:/images/gear_r.png' } Text { id: gear_r x: 1845+1015 y: 890-170 z: 99 text: " R档" font.family: alibaba.name font.pointSize: radarTxtSize color: "#70FFFFFF" } } } Image{ id:mainLeft height: mainHeight+110 source:"qrc:/images/sideUp_left.png" anchors.left: leftCam.left anchors.leftMargin:0 anchors.top: leftCam.top anchors.topMargin: -80 z:98 visible:true } Image{ id:mainLeftSide height: mainHeight/2+50 source:"qrc:/images/imageLeftSide.png" anchors.left: leftCam.left anchors.leftMargin:20 anchors.top: leftCam.top anchors.topMargin: 230 visible:true } //左面摄像头视频显示区域 Rectangle { id:leftCamRec width: leftCamWidth height: mainHeight/2-50 color: 'transparent' anchors.left: leftCam.left anchors.leftMargin: 20+85 border.color: mainAppColor border.width: 1 // CAM Left //aaa Image { id: leftImg width: leftCamWidth height: mainHeight/2-50 fillMode: Image.Stretch } Connections { target: LeftImage //信号的发送者 onCallQmlRefeshLeftImg: //信号 { //槽函数 leftImg.source = "" leftImg.source = "image://LeftImage" } } } Rectangle { width: leftCamWidth height: mainHeight/2 y:mainHeight/2 color: 'transparent' anchors.left: leftCam.left anchors.leftMargin: 20+85 anchors.top: leftCamRec.bottom border.color: mainAppColor border.width: 1 // CAM Left //aaa Image { id: leftan width: leftCamWidth height: mainHeight/2 fillMode: Image.Stretch } Connections { target: LeftAnchor onCallQmlRefeshLeftAnchor: { leftan.source = "" leftan.source = "image://LeftAnchor" } } } } Rectangle { id: centerPanel width: frontCamWidth + 3 * lineWidth height: mainHeight anchors.top: mainFormContent.top anchors.horizontalCenter: mainFormContent.horizontalCenter color: 'transparent' //中间摄像头视频显示区域 Rectangle { width: frontCamWidth-85*2 //height: mainHeight/2+200 height: mainHeight-50 color: 'transparent' anchors.left: centerPanel.left anchors.leftMargin: 20+85 border.color: mainAppColor border.width: 1 // CAM FRONT //aaa Image { id: frontImg anchors.topMargin: 140 width: frontCamWidth-85*2 //height: mainHeight/2+200 height: mainHeight-50 fillMode: Image.Stretch z: 97 } Connections { target: FrontImage onCallQmlRefeshFrontImg: { frontImg.source = "" //frontImg.source = "image://FrontImage" frontImg.source = "image://FrontImage/"+ Math.random() } } } Rectangle { id: backImgRect width: frontCamWidth/2 height: mainHeight / 2-200 color: 'transparent' x:430 y:mainHeight/2+200 border.color: mainAppColor border.width: 1 //visible:true visible:false // CAM BACK REAR //aaa Image { id: backImg anchors.topMargin: 140 width: parent.width height: parent.height fillMode: Image.Stretch z: 98 } Connections { target: BackImage onCallQmlRefeshBackImg: { backImg.source = "" //backImg.source = "image://BackImage" } } } } Rectangle { id: rightCam width: rightCamWidth + lineWidth height: mainHeight color: 'transparent' Image{ id:mainRight height: mainHeight+110 source:"qrc:/images/sideUp_left1.png" anchors.right: rightCam.right anchors.top: rightCam.top anchors.topMargin: -80 visible:true } Image{ id:mainRightSide height: mainHeight/2+50 source:"qrc:/images/imageRightSide.png" anchors.right: rightCam.right anchors.rightMargin: 10 anchors.top: rightCam.top anchors.topMargin: 230 visible:true } //右面摄像头视频显示区域 Rectangle { id:rightCamRec width: rightCamWidth height: mainHeight/2-50 color: 'transparent' anchors.left: rightCam.left anchors.leftMargin:-85 border.color: mainAppColor border.width: 1 // CAM Right //aaa Image { id: rightImg width: rightCamWidth height: mainHeight/2-50 fillMode: Image.Stretch } Connections { target: RightImage onCallQmlRefeshRightImg: { rightImg.source = "" rightImg.source = "image://RightImage" } } } Rectangle { width: rightCamWidth height: mainHeight/2 y:mainHeight/2 color: 'transparent' anchors.left: rightCam.left anchors.leftMargin:-85 anchors.top:rightCamRec.bottom border.color: mainAppColor border.width: 1 // CAM Right //aaa Image { id: rightan width: rightCamWidth height: mainHeight/2 fillMode: Image.Stretch } Connections { target: RightAnchor onCallQmlRefeshRightAnchor: { rightan.source = "" rightan.source = "image://RightAnchor" } } } } //右侧状态 Rectangle { id: radarData width: radarWidth -160 height: mainHeight anchors.top:rightCam.top anchors.topMargin:-70 color: 'transparent' //登录界面最左侧上边框 Image { id: sideUp_right2 z: 99 height: 740 anchors.left: radarData.left anchors.leftMargin:-60 anchors.top: radarData.top anchors.topMargin: -20 fillMode: Image.Stretch visible: true source: 'qrc:/images/sideUp_left.png' } //登录界面最左侧上边框 Image { id: sideUp_left2 z: 99 height: 740 anchors.left: radarData.left anchors.leftMargin:400 anchors.top: radarData.top anchors.topMargin: -20 fillMode: Image.Stretch visible: true source: 'qrc:/images/sideUp_left1.png' } //登录界面最左侧下边框 Image { id: sideDown_left2 z: 99 height: 420 anchors.left: radarData.left anchors.leftMargin:-60+50 anchors.top: radarData.top anchors.topMargin: 680 fillMode: Image.Stretch source: 'qrc:/images/sideDown_left.png' } //登录界面最右侧下边框 Image { id: sideDown_right2 z: 99 height: 420 anchors.left: radarData.left anchors.leftMargin:400-50 anchors.top: radarData.top anchors.topMargin: 680 fillMode: Image.Stretch visible: true source: 'qrc:/images/sideDown_right.png' } Rectangle { id: statusRightLogin height: mainHeight width: radarWidth -160 anchors.left: radarData.left anchors.leftMargin:-60 anchors.top: radarData.top anchors.topMargin: 20 color: 'transparent' Image { id: iRadar_car_G width: 350 height: 550 anchors.top: statusRightLogin.top anchors.topMargin: 100 anchors.left: statusRightLogin.left anchors.leftMargin: 120 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car.png' visible:true } Image { id: iRadar_car_G1 z: 99 width: 350 height: 550 anchors.top: statusRightLogin.top anchors.topMargin: -40 anchors.left: statusRightLogin.left anchors.leftMargin: 120-40 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_G1.png' //visible:true visible: (radarGreenOutRange >= appModel.radar1) && (appModel.radar1 >= radarGreenRange) } Image { id: iRadar_car_G2 z: 99 width: 350 height: 550 anchors.top: statusRightLogin.top anchors.topMargin: -40 anchors.left: statusRightLogin.left anchors.leftMargin: 120+40 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_G2.png' //visible:true visible: (radarGreenOutRange >= appModel.radar2) && (appModel.radar2 >= radarGreenRange) } Image { id: iRadar_car_G3 z: 99 width: 350 height: 550 anchors.top: statusRightLogin.top anchors.topMargin: 0 anchors.left: statusRightLogin.left anchors.leftMargin: 120 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_G3.png' //visible:true visible: (radarGreenOutRange >= appModel.radar3) && (appModel.radar3 >= radarGreenRange) } Image { id: iRadar_car_G4 z: 99 width: 350 height: 550 anchors.top: statusRightLogin.top anchors.topMargin: 0 anchors.left: statusRightLogin.left anchors.leftMargin: 120 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_G4.png' //visible:true visible: (radarGreenOutRange >= appModel.radar4) && (appModel.radar4 >= radarGreenRange) } Image { id: iRadar_car_G5 z: 99 width: 350 height: 550 anchors.top: statusRightLogin.top anchors.topMargin: 100 anchors.left: statusRightLogin.left anchors.leftMargin: 120 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_G5.png' //visible:true visible: (radarGreenOutRange >= appModel.radar5) && (appModel.radar5 >= radarGreenRange) } Image { id: iRadar_car_G6 z: 99 width: 350 height: 550 anchors.top: statusRightLogin.top anchors.topMargin: 100 anchors.left: statusRightLogin.left anchors.leftMargin: 120 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_G6.png' //visible:true visible: (radarGreenOutRange >= appModel.radar6) && (appModel.radar6 >= radarGreenRange) } Image { id: iRadar_car_G7 z: 99 width: 350 height: 550 anchors.top: statusRightLogin.top anchors.topMargin: 0 anchors.left: statusRightLogin.left anchors.leftMargin: 120 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_G7.png' //visible:true visible: (radarGreenOutRange >= appModel.radar7) && (appModel.radar7 >= radarGreenRange) } Image { id: iRadar_car_G8 z: 99 width: 350 height: 550 anchors.top: statusRightLogin.top anchors.topMargin: 0 anchors.left: statusRightLogin.left anchors.leftMargin: 120 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_G8.png' //visible:true visible: (radarGreenOutRange >= appModel.radar8) && (appModel.radar8 >= radarGreenRange) } Image { id: iRadar_car_G9 z: 99 width: 550 height: 350 anchors.top: statusRightLogin.top anchors.topMargin: 80 anchors.left: statusRightLogin.left anchors.leftMargin: -5 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_G0.png' //visible:true visible: (radarGreenOutRange >= appModel.radar9) && (appModel.radar9 >= radarGreenRange) } Image { id: iRadar_car_R1 z: 99 width: 350 height: 550 anchors.top: statusRightLogin.top anchors.topMargin: -40 anchors.left: statusRightLogin.left anchors.leftMargin: 120-40 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_R1.png' //visible:true visible: appModel.radar1 <= radarRedRange } Image { id: iRadar_car_R2 z: 99 width: 350 height: 550 anchors.top: statusRightLogin.top anchors.topMargin: -40 anchors.left: statusRightLogin.left anchors.leftMargin: 120+40 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_R2.png' //visible:true visible: appModel.radar2 <= radarRedRange } Image { id: iRadar_car_R3 z: 99 width: 350 height: 550 anchors.top: statusRightLogin.top anchors.topMargin: 0 anchors.left: statusRightLogin.left anchors.leftMargin: 120 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_R3.png' //visible:true visible: appModel.radar3 <= radarRedRange } Image { id: iRadar_car_R4 z: 99 width: 350 height: 550 anchors.top: statusRightLogin.top anchors.topMargin: 0 anchors.left: statusRightLogin.left anchors.leftMargin: 120 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_R4.png' //visible:true visible: appModel.radar4 <= radarRedRange } Image { id: iRadar_car_R5 z: 99 width: 350 height: 550 anchors.top: statusRightLogin.top anchors.topMargin: 100 anchors.left: statusRightLogin.left anchors.leftMargin: 120 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_R5.png' //visible:true visible: appModel.radar5 <= radarRedRange } Image { id: iRadar_car_R6 z: 99 width: 350 height: 550 anchors.top: statusRightLogin.top anchors.topMargin: 100 anchors.left: statusRightLogin.left anchors.leftMargin: 120 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_R6.png' //visible:true visible: appModel.radar6 <= radarRedRange } Image { id: iRadar_car_R7 z: 99 width: 350 height: 550 anchors.top: statusRightLogin.top anchors.topMargin: 0 anchors.left: statusRightLogin.left anchors.leftMargin: 120 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_R7.png' //visible:true visible: appModel.radar7 <= radarRedRange } Image { id: iRadar_car_R8 z: 99 width: 350 height: 550 anchors.top: statusRightLogin.top anchors.topMargin: 0 anchors.left: statusRightLogin.left anchors.leftMargin: 120 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_R8.png' //visible:true visible: appModel.radar8 <= radarRedRange } Image { id: iRadar_car_R9 z: 99 width: 550 height: 350 anchors.top: statusRightLogin.top anchors.topMargin: 80 anchors.left: statusRightLogin.left anchors.leftMargin: -5 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_R0.png' //visible:true visible: appModel.radar9 <= radarRedRange } Image { id: iRadar_car_Y1 z: 99 width: 350 height: 550 anchors.top: statusRightLogin.top anchors.topMargin: -40 anchors.left: statusRightLogin.left anchors.leftMargin: 120-40 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_Y1.png' //visible:true visible: appModel.radar1 < radarGreenRange&& appModel.radar1 > radarRedRange } Image { id: iRadar_car_Y2 z: 99 width: 350 height: 550 anchors.top: statusRightLogin.top anchors.topMargin: -40 anchors.left: statusRightLogin.left anchors.leftMargin: 120+40 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_Y2.png' //visible:true visible: appModel.radar2 < radarGreenRange&& appModel.radar2 > radarRedRange } Image { id: iRadar_car_Y3 z: 99 width: 350 height: 550 anchors.top: statusRightLogin.top anchors.topMargin: 0 anchors.left: statusRightLogin.left anchors.leftMargin: 120 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_Y3.png' //visible:true visible: appModel.radar3 < radarGreenRange&& appModel.radar3 > radarRedRange } Image { id: iRadar_car_Y4 z: 99 width: 350 height: 550 anchors.top: statusRightLogin.top anchors.topMargin: 0 anchors.left: statusRightLogin.left anchors.leftMargin: 120 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_Y4.png' //visible:true visible: appModel.radar4 < radarGreenRange&& appModel.radar4 > radarRedRange } Image { id: iRadar_car_Y5 z: 99 width: 350 height: 550 anchors.top: statusRightLogin.top anchors.topMargin: 100 anchors.left: statusRightLogin.left anchors.leftMargin: 120 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_Y5.png' //visible:true visible: appModel.radar5 < radarGreenRange&& appModel.radar5 > radarRedRange } Image { id: iRadar_car_Y6 z: 99 width: 350 height: 550 anchors.top: statusRightLogin.top anchors.topMargin: 100 anchors.left: statusRightLogin.left anchors.leftMargin: 120 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_Y6.png' //visible:true visible: appModel.radar6 < radarGreenRange&& appModel.radar6 > radarRedRange } Image { id: iRadar_car_Y7 z: 99 width: 350 height: 550 anchors.top: statusRightLogin.top anchors.topMargin: 0 anchors.left: statusRightLogin.left anchors.leftMargin: 120 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_Y7.png' //visible:true visible: appModel.radar7 < radarGreenRange&& appModel.radar7 > radarRedRange } Image { id: iRadar_car_Y8 z: 99 width: 350 height: 550 anchors.top: statusRightLogin.top anchors.topMargin: 0 anchors.left: statusRightLogin.left anchors.leftMargin: 120 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_Y8.png' //visible:true visible: appModel.radar8 < radarGreenRange&& appModel.radar8 > radarRedRange } Image { id: iRadar_car_Y9 z: 99 width: 550 height: 350 anchors.top: statusRightLogin.top anchors.topMargin: 80 anchors.left: statusRightLogin.left anchors.leftMargin: -5 anchors.horizontalCenter: radarData.horizontalCenter fillMode: Image.Stretch source: 'qrc:/images/radar_car_Y0.png' //visible:true visible: appModel.radar9 < radarGreenRange&& appModel.radar9 > radarRedRange } Row { id: iText0 height: parent.height anchors.top: statusRightLogin.top anchors.topMargin: -50+20 anchors.left: statusRightLogin.left anchors.leftMargin: 90+140 Text { text: "正前:" color: mainTextColor anchors.left: iText1.left anchors.leftMargin: 0 font.family: alibaba.name font.pointSize: radarTxtSize } Text { id: radar9 text: (appModel.radar9 / 1000).toFixed(2) color: mainTextColor anchors.left: iText1.left anchors.leftMargin: 110 font.family: alibaba.name font.pointSize: radarTxtSize } } Row { id: iText1 height: parent.height anchors.top: statusRightLogin.top anchors.topMargin: -20+20 anchors.left: statusRightLogin.left anchors.leftMargin: 90 Text { text: "雷达左前:" color: mainTextColor anchors.left: iText1.left anchors.leftMargin: 0 font.family: alibaba.name font.pointSize: radarTxtSize } Text { id: radar1 text: (appModel.radar1 / 1000).toFixed(2) color: mainTextColor anchors.left: iText1.left anchors.leftMargin: 110 font.family: alibaba.name font.pointSize: radarTxtSize } Text { text: "雷达右前:" color: mainTextColor anchors.left: iText1.left anchors.leftMargin: 250 font.family: alibaba.name font.pointSize: radarTxtSize } Text { id: radar2 text: (appModel.radar2 / 1000).toFixed(2) color: mainTextColor anchors.left: iText1.left anchors.leftMargin: 360 font.family: alibaba.name font.pointSize: radarTxtSize } } Row { id: iText2 height: parent.height anchors.top: statusRightLogin.top anchors.topMargin: 10+20 anchors.left: statusRightLogin.left anchors.leftMargin: 90 //visible: true Text { text: "雷达前左:" color: mainTextColor anchors.left: iText2.left anchors.leftMargin: 0 font.family: alibaba.name font.pointSize: radarTxtSize } Text { id: radar3 text: (appModel.radar8 / 1000).toFixed(2) color: mainTextColor anchors.left: iText2.left anchors.leftMargin: 110 font.family: alibaba.name font.pointSize: radarTxtSize } Text { text: "雷达前右:" color: mainTextColor anchors.left: iText2.left anchors.leftMargin: 250 font.family: alibaba.name font.pointSize: radarTxtSize } Text { id: radar4 text: (appModel.radar3 / 1000).toFixed(2) color: mainTextColor anchors.left: iText2.left anchors.leftMargin: 360 font.family: alibaba.name font.pointSize: radarTxtSize } } Row { id: iText3 height: parent.height anchors.top: statusRightLogin.top anchors.topMargin: 40+20 anchors.left: statusRightLogin.left anchors.leftMargin: 90 Text { text: "雷达后左:" color: mainTextColor anchors.left: iText3.left anchors.leftMargin: 0 font.family: alibaba.name font.pointSize: radarTxtSize } Text { id: radar5 text: (appModel.radar7 / 1000).toFixed(2) color: mainTextColor anchors.left: iText3.left anchors.leftMargin: 110 font.family: alibaba.name font.pointSize: radarTxtSize } Text { text: "雷达后右:" color: mainTextColor anchors.left: iText3.left anchors.leftMargin: 250 font.family: alibaba.name font.pointSize: radarTxtSize } Text { id: radar6 text: (appModel.radar4 / 1000).toFixed(2) color: mainTextColor anchors.left: iText3.left anchors.leftMargin: 360 font.family: alibaba.name font.pointSize: radarTxtSize } } Row { id: iText4 height: parent.height anchors.top: statusRightLogin.top anchors.topMargin: 70+20 anchors.left: statusRightLogin.left anchors.leftMargin: 90 Text { text: "雷达左轮:" color: mainTextColor anchors.left: iText4.left anchors.leftMargin: 0 font.family: alibaba.name font.pointSize: radarTxtSize } Text { id: radar7 text: (appModel.radar6 / 1000).toFixed(2) color: mainTextColor anchors.left: iText4.left anchors.leftMargin: 110 font.family: alibaba.name font.pointSize: radarTxtSize } Text { text: "雷达右轮:" color: mainTextColor anchors.left: iText4.left anchors.leftMargin: 250 font.family: alibaba.name font.pointSize: radarTxtSize } Text { id: radar8 text: (appModel.radar5 / 1000).toFixed(2) color: mainTextColor anchors.left: iText4.left anchors.leftMargin: 360 font.family: alibaba.name font.pointSize: radarTxtSize } } Rectangle { id: warning width: 357 height: 35 color: popupBgColorErr anchors.top: statusRightLogin.top anchors.topMargin: 640 anchors.left: statusRightLogin.left anchors.leftMargin: 120 radius: 5 Text { id: warningtxt text: qsTr("注意保持车距") color: '#FFFFFF' font.family: alibaba.name font.pointSize: 18 anchors.horizontalCenter: warning.horizontalCenter } //visible:true visible: (appModel.radar1 <= radarRedRange || appModel.radar2 <= radarRedRange || appModel.radar3 <= radarRedRange || appModel.radar4 <= radarRedRange || appModel.radar5 <= radarRedRange || appModel.radar6 <= radarRedRange || appModel.radar7 <= radarRedRange || appModel.radar8 <= radarRedRange || appModel.radar9 <= radarRedRange) } } Row{ anchors.top: radarData.top anchors.topMargin: 650 anchors.left: radarData.left anchors.leftMargin: 50 Rectangle { id: chart width: radarData.width/2+40 height: 350 anchors.top: radarData.top anchors.topMargin: 620 anchors.left: radarData.left anchors.leftMargin: 80 color: 'transparent' visible:true ChartView { titleColor: mainTextColor title: " " anchors.fill: parent antialiasing: true backgroundColor: "transparent" titleFont.pixelSize: 22 visible:true StackedBarSeries { id: mySeries axisX: BarCategoryAxis { color: mainTextColor categories: [ "左支腿" ] labelsColor: "white" } axisY: ValueAxis { id: barY gridLineColor: "gray" labelsColor: "white" max: 100 tickCount: 11 labelFormat: "%d%" // 设置具有值的 Y 轴刻度线的颜色 minorTickCount: 10 minorGridLineColor: "gray" onTickCountChanged: { // 设置主要 Y 轴刻度线的颜色 gridLineColor = tickCount > 0 ? "yellow" : "gray"; //gridLineColor = "yellow" labelsColor = tickCount > 0 ? "yellow" : "white"; //labelsColor ="yellow" } } BarSet { values: [(appModel.wireSensorL/430)*100] //values: [50] color: "blue" } } } } Rectangle{ id: chart1 width: radarData.width/2+40 height: 350 anchors.top: radarData.top anchors.topMargin: 620 anchors.left: radarData.left anchors.leftMargin: 80 color: 'transparent' visible:true ChartView { titleColor: mainTextColor title: " " anchors.fill: parent antialiasing: true backgroundColor: "transparent" titleFont.pixelSize: 22 visible:true StackedBarSeries { id: mySeries1 axisX: BarCategoryAxis { color: mainTextColor categories: [ "右支腿" ] labelsColor: "white" //barsWidth: 0.5 } axisY: ValueAxis { id: barY1 gridLineColor: "gray" labelsColor: "white" max: 100 tickCount: 11 labelFormat: "%d%" // 设置具有值的 Y 轴刻度线的颜色 minorTickCount: 10 minorGridLineColor: "gray" onTickCountChanged: { // 设置主要 Y 轴刻度线的颜色 gridLineColor = tickCount > 0 ? "yellow" : "gray"; labelsColor = tickCount > 0 ? "yellow" : "white"; } } BarSet { values: [(appModel.wireSensorR / 430)*100] //values: [80] color: "green" } } } } } Row{ id:showStat anchors.top: radarData.top anchors.topMargin: 1000 anchors.left: radarData.left anchors.leftMargin: 50 Text{ id:close text:'倾翻油缸伸缩状态' color:'white' anchors.top: showStat.top anchors.topMargin: 5 anchors.left: radarData.left anchors.leftMargin: 50 } Image{ id:falseLight source:'qrc:/images/true-light.png' anchors.left: close.left anchors.leftMargin: 100 visible:appModel.tipLimit===1 } Image{ id:trueLight source:'qrc:/images/false-light.png' anchors.left: close.left anchors.leftMargin: 140 visible:appModel.tipLimit===0 } Text{ id:close2 text:'锁钩闭合状态' color:'white' anchors.top: showStat.top anchors.topMargin: 5 anchors.left: close.left anchors.leftMargin: 240 } Image{ id:lClose source:'qrc:/images/L-close.png' anchors.left: close2.left anchors.leftMargin: 80 visible:appModel.lockSwitchL===1 } Image{ id:rClose source:'qrc:/images/R-close.png' anchors.left: close2.left anchors.leftMargin: 110 visible:appModel.lockSwitchR===1 } } } } } } }