PanelWindow.qml 123 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032
  1. import QtQuick
  2. import QtQuick.Controls 2.5
  3. import QtQuick.Layouts 1.3
  4. import QtQml 2.3
  5. import QtQuick.Window 2.2
  6. import QtMultimedia
  7. import "backend.js" as Backend
  8. /*
  9. 车辆各信息数据展示UI界面
  10. */
  11. Item {
  12. property int currentIndex: 0
  13. property int radarTxtSize: 14
  14. property color popupBgColorErr: "#b44"
  15. property color popupBgColorWarn: "#f7bd3e"
  16. property color popupBgColorOK: "#29b6fb"
  17. property color popupTextColor: "#ffffff"
  18. property int radarRedRange: 1500
  19. property int radarGreenRange: 3000
  20. property int radarGreenOutRange: 5000
  21. property var textList: [{
  22. "text": " ",
  23. "visible": true
  24. }, {
  25. "text": "动臂提升先导压力传感器故障",
  26. "visible": appModel.liftPilotPressureSensor_F
  27. }, {
  28. "text": "动臂下降先导压力传感器故障",
  29. "visible": appModel.loweringPilotPressureSensor_F
  30. }, {
  31. "text": "斗杆提升先导压力传感器故障",
  32. "visible": appModel.leverLiftPilotPressureSensor_F
  33. }, {
  34. "text": "斗杆下降先导压力传感器故障",
  35. "visible": appModel.rodLoweringPilotPressurePensor_F
  36. }, {
  37. "text": "车体左回转先导压力传感器故障",
  38. "visible": appModel.leftTurnPilotPressureSensor_F
  39. }, {
  40. "text": "车体右回转先导压力传感器故障",
  41. "visible": appModel.rightTurnPilotPressureSensor_F
  42. }, {
  43. "text": "支腿伸出先导压力传感器故障",
  44. "visible": appModel.legExtensionPilotPressureSensor_F
  45. }, {
  46. "text": "支腿缩回先导压力传感器故障",
  47. "visible": appModel.legRetractPilotPressureSensor_F
  48. }, {
  49. "text": "抓斗开启先导压力传感器故障",
  50. "visible": appModel.grabOpenPilotPressureSensor_F
  51. }, {
  52. "text": "抓斗闭合先导压力传感器故障",
  53. "visible": appModel.grabClosurePilotPressureSensor_F
  54. }, {
  55. "text": "主泵1压力传感器故障",
  56. "visible": appModel.mainPump1PressureSensor_F
  57. }, {
  58. "text": "主泵2压力传感器故障",
  59. "visible": appModel.mainPump2PressureSensor_F
  60. }, {
  61. "text": "动臂无杆腔压力传感器故障",
  62. "visible": appModel.chamberPressureSensor_F
  63. }, {
  64. "text": "斗杆无杆腔压力传感器故障",
  65. "visible": appModel.bucketRodPressureSensor_F
  66. }, {
  67. "text": "驻车压力传感器故障",
  68. "visible": appModel.parkingPressureSensor_F
  69. }, {
  70. "text": "蓄能器压力传感器故障",
  71. "visible": appModel.accumulatorPressureSensor_F
  72. }, {
  73. "text": "油门踏板故障",
  74. "visible": appModel.gasPedal_F
  75. }, {
  76. "text": "油门旋钮故障",
  77. "visible": appModel.throttleKnob_F
  78. }, {
  79. "text": "支腿手柄故障",
  80. "visible": appModel.legHandle_F
  81. }, {
  82. "text": "抓具旋钮故障",
  83. "visible": appModel.gripKnob_F
  84. }, {
  85. "text": "液压油温传感器故障",
  86. "visible": appModel.hydraulicOilTemperatureSensor_F
  87. }, {
  88. "text": "燃油油位传感器故障",
  89. "visible": appModel.fuelLevelSensor_F
  90. }, {
  91. "text": "动臂倾角传感器故障",
  92. "visible": appModel.boomAngleSensor_F
  93. //"visible": true
  94. }, {
  95. "text": "斗杆倾角传感器通讯故障",
  96. "visible": appModel.bucketLeverTiltSensor_F
  97. }, {
  98. "text": "扩展模块通讯故障",
  99. "visible": appModel.expansionModule_F
  100. }, {
  101. "text": "工作距离超限",
  102. "visible": appModel.workingDistanceOverrun_F
  103. }, {
  104. "text": "燃油油位低",
  105. "visible": appModel.lowOilLevel_F
  106. }, {
  107. "text": "电池电压低",
  108. "visible": appModel.batteryLowVoltage_F
  109. }, {
  110. "text": "电池电压高",
  111. "visible": appModel.batteryHighVoltage_F
  112. }, {
  113. "text": "蓄能器压力异常",
  114. "visible": appModel.accumulatorPressure_F
  115. }, {
  116. "text": "液压油温高",
  117. "visible": appModel.highHydraulicOilTemperature_F
  118. }, {
  119. "text": "机油压力低",
  120. "visible": appModel.lowOilPressure_F
  121. }, {
  122. "text": "冷却液液位低",
  123. "visible": appModel.coolantLevelLow_F
  124. }, {
  125. "text": "冷却液温度高",
  126. "visible": appModel.coolantTemperatureHigh_F
  127. }, {
  128. "text": "系统超载",
  129. "visible": appModel.systemOverload_F
  130. }, {
  131. "text": "安全旁通按下",
  132. "visible": appModel.safebypassPressDown_F
  133. }, {
  134. "text": "发动机SPN故障",
  135. "visible": appModel.engineSPN_F
  136. }, {
  137. "text": "发动机预热中",
  138. "visible": appModel.engineWarmUp_F
  139. }, {
  140. "text": "发动机预热超时",
  141. "visible": appModel.engineWarmUpTimeout_F
  142. }, {
  143. "text": "紧急停止按下",
  144. "visible": appModel.emergencyStopPress_F
  145. }, {
  146. "text": "安全开关阀异常",
  147. "visible": appModel.safetySwitch !==0
  148. }, {
  149. "text": "大臂提升先导比例阀异常",
  150. "visible": appModel.armLiftPilot !==0
  151. }, {
  152. "text": "大臂下降先导比例阀异常",
  153. "visible": appModel.armLoweringPilot !==0
  154. }, {
  155. "text": "斗杆提升先导比例阀异常",
  156. "visible": appModel.leverLiftingLilot !==0
  157. }, {
  158. "text": "斗杆下降先导比例阀异常",
  159. "visible": appModel.rodLoweringPilot !==0
  160. }, {
  161. "text": "左回转先导比例阀异常",
  162. "visible": appModel.leftRotaryPilot !==0
  163. }, {
  164. "text": "右回转先导比例阀异常",
  165. "visible": appModel.rightRotaryPilot !==0
  166. }, {
  167. "text": "抓斗开启先导比例阀异常",
  168. "visible": appModel.grabOpenPilot !==0
  169. }, {
  170. "text": "抓斗闭合先导比例阀异常",
  171. "visible": appModel.grabClosePilot !==0
  172. }
  173. //注释:影响其他报警信息显示
  174. //, {
  175. //"text": "怠速保护报警",
  176. //"visible": appModel.idleProtection
  177. //}
  178. ]
  179. property string back_content: "ask content";
  180. property string move_content: "";
  181. property int uid: 0
  182. property string strArea:""
  183. property string strNo:""
  184. width: 1920
  185. height: 1080
  186. visible: true
  187. FontLoader {
  188. id: alibaba
  189. source: "qrc:/components/font/Alibaba-PuHuiTi-Bold.ttf"
  190. }
  191. FontLoader {
  192. id: fontawesome
  193. source: "qrc:/components/font/fontawesome-webfont.ttf"
  194. }
  195. FontLoader {
  196. id: digtalFont
  197. source: "qrc:/components/font/fontawesome-webfont.ttf"
  198. }
  199. signal loginSuccess(var userName, var password)
  200. function loginUser(uname, pword) {
  201. var ret = Backend.validateUserCredentials(uname, pword)
  202. var message = ""
  203. if (ret) {
  204. message = "用户名或密码输入错误"
  205. subPopup.popMessage = message
  206. subPopup.open()
  207. return
  208. }
  209. // loginSuccess(uname, pword)
  210. appModel.userLogin(uname, pword);
  211. page_car.visible = true
  212. page_car.stack = stack
  213. stack.push(page_car)
  214. }
  215. function moveBegin(area,no)
  216. {
  217. appModel.moveBegin(area,no)
  218. back_content="\t 自动驾驶即将启动 \n\t 是否还需要保持远程监控";
  219. trackDialog.visible=true;
  220. /*
  221. if(appModel.autoClose())
  222. {
  223. page_detail.disconnect()
  224. appModel.leaveCar()
  225. stack.pop()
  226. stack.pop()
  227. }
  228. */
  229. }
  230. function carManage(){
  231. stack.pop()
  232. }
  233. function workManage(){
  234. page_work.visible=true;
  235. page_work.stack=stack;
  236. stack.push(page_work)
  237. }
  238. objectName: "tst"
  239. function popDialog(str,area,no, vid)
  240. {
  241. strArea=String.fromCharCode(0x41+area)+""
  242. no= no+1
  243. strNo=(no<3?"新"+strArea+(no+1).toString()+"罐":strArea+(no-2).toString()+"罐")
  244. back_content=str+"已经到达"+strNo+"区域 \n\t 请求远程操控";
  245. uid=vid;
  246. backDialog.visible=true;
  247. }
  248. function moveErrorDialog(desc)
  249. {
  250. strDesc="不能执行自动驾驶"
  251. if(desc===1)
  252. {
  253. back_content=strDesc+"(未能获取编码器数据)";
  254. }
  255. else
  256. {
  257. back_content=strDesc+"(未知错误)";
  258. }
  259. moveErrorDlg.visible=true;
  260. }
  261. function carSelect(id) {
  262. appModel.connectCar(id)
  263. }
  264. function track()
  265. {
  266. // appModel.track()
  267. }
  268. function unTrack()
  269. {
  270. console.log('1111111');
  271. //appModel.leaveCar()
  272. appModel.ready = false
  273. stack.pop()
  274. page_detail.update()
  275. stack.pop()
  276. }
  277. Popup {
  278. id: subPopup
  279. property alias popMessage: message.text
  280. background: Rectangle {
  281. id: subPopupBg
  282. implicitWidth: 1920
  283. implicitHeight: 60
  284. color: popupBgColorErr
  285. }
  286. y: (parent.height - 60)
  287. modal: true
  288. focus: true
  289. closePolicy: Popup.CloseOnPressOutside
  290. Text {
  291. id: message
  292. anchors.centerIn: parent
  293. font.pointSize: 12
  294. color: popupTextColor
  295. font.family: alibaba.name
  296. }
  297. onOpened: subPopupClose.start()
  298. }
  299. Timer {
  300. id: subPopupClose
  301. interval: 3000
  302. onTriggered: subPopup.close()
  303. }
  304. Rectangle {
  305. anchors.fill: parent
  306. Image {
  307. fillMode: Image.PreserveAspectFit
  308. source: 'qrc:/images/bg.png'
  309. }
  310. //增加声音--用于测试
  311. Rectangle {
  312. id: test222
  313. color: "red"
  314. width: 80
  315. height: 750
  316. z: 101
  317. anchors.top: powerLegImg4.top
  318. anchors.topMargin: 60
  319. anchors.left: powerLegImg4.left
  320. anchors.leftMargin: 10
  321. visible:false
  322. /*
  323. SoundEffect {
  324. id: audio
  325. source: "qrc:/sound/beep-1.wav"
  326. volume: 1.0
  327. loops: SoundEffect.Infinite
  328. }
  329. Component.onCompleted:{
  330. audio.play()
  331. }
  332. Connections {
  333. target: appModel
  334. onSigSoundIsPlay: {
  335. //console.log(par1)
  336. if (Number(par1) === 0) {
  337. audio.stop()
  338. } else {
  339. audio.play()
  340. }
  341. }
  342. }
  343. //发动机声音
  344. SoundEffect {
  345. //Audio{
  346. id: engineSpeedPlaySound
  347. //source: "qrc:/sound/enginSound.wav"
  348. volume: 1.0
  349. loops: SoundEffect.Infinite
  350. //loops:1
  351. }
  352. Connections {
  353. target: appModel
  354. onEngineSpeedPlay: {
  355. //console.log(par2)
  356. if (Number(par2) === 0) {
  357. engineSpeedPlaySound.stop()
  358. } else {
  359. if ((Number)(engineSpeedPlaySound.playing) === 0) {
  360. engineSpeedPlaySound.play()
  361. }
  362. }
  363. }
  364. }
  365. */
  366. //R挡声音
  367. SoundEffect {
  368. id: gearRPlaySound
  369. source: "qrc:/sound/gearRPlaySound.wav"
  370. volume: 1.0
  371. loops: SoundEffect.Infinite
  372. }
  373. Connections {
  374. target: appModel
  375. onGearRPlay: {
  376. //console.log(par5)
  377. if (Number(par5) === 0) {
  378. gearRPlaySound.stop()
  379. } else {
  380. if ((Number)(gearRPlaySound.playing) === 0) {
  381. gearRPlaySound.play()
  382. }
  383. }
  384. }
  385. }
  386. /*
  387. //蜂鸣器声音
  388. SoundEffect {
  389. id: buzzerPlayIt
  390. //source: "qrc:/sound/blowSoundPlayIt.wav"
  391. volume: 1.0
  392. loops: SoundEffect.Infinite
  393. }
  394. Connections {
  395. target: appModel
  396. onBuzzerPlayIt: {
  397. //console.log(par6)
  398. if (Number(par6) === 0) {
  399. buzzerPlayIt.stop()
  400. } else {
  401. if ((Number)(buzzerPlayIt.playing) === 0) {
  402. buzzerPlayIt.play()
  403. }
  404. }
  405. }
  406. }
  407. */
  408. //左转声音
  409. SoundEffect {
  410. id: lightLPlaySound
  411. source: "qrc:/sound/lightLPlaySound.wav"
  412. volume: 1.0
  413. loops: SoundEffect.Infinite
  414. }
  415. Connections {
  416. target: appModel
  417. onLightLPlay: {
  418. //console.log(par3)
  419. if (Number(par3) === 0) {
  420. lightLPlaySound.stop()
  421. } else {
  422. if ((Number)(lightLPlaySound.playing) === 0) {
  423. lightLPlaySound.play()
  424. }
  425. }
  426. }
  427. }
  428. //右转声音
  429. SoundEffect {
  430. id: lightRPlaySound
  431. source: "qrc:/sound/lightRPlaySound.wav"
  432. volume: 1.0
  433. loops: SoundEffect.Infinite
  434. }
  435. Connections {
  436. target: appModel
  437. onLightRPlay: {
  438. //console.log(par4)
  439. if (Number(par4) === 0) {
  440. lightRPlaySound.stop()
  441. } else {
  442. if ((Number)(lightRPlaySound.playing) === 0) {
  443. lightRPlaySound.play()
  444. }
  445. }
  446. }
  447. }
  448. //超声波雷达1的声音
  449. SoundEffect {
  450. id: radarOneSound
  451. source: "qrc:/sound/beep-1.wav"
  452. volume: 1.0
  453. loops: SoundEffect.Infinite
  454. }
  455. Connections {
  456. target: appModel
  457. onSetRadar1Play: {//console.log("------------"+Number(Radar1Value)+appModel.ready+"-----------------")
  458. if (appModel.ready == false||Number(Radar1Value) > 1000) {
  459. radarOneSound.stop()
  460. }
  461. else {//console.log("+++++++++++++++"+(Number)(radarOneSound.playing)+"++++++++++++++++")
  462. if ((Number)(radarOneSound.playing) === 0) {
  463. radarOneSound.play()
  464. }
  465. }
  466. }
  467. }
  468. //超声波雷达2的声音
  469. SoundEffect {
  470. id: radarTwoSound
  471. source: "qrc:/sound/beep-1.wav"
  472. volume: 1.0
  473. loops: SoundEffect.Infinite
  474. }
  475. Connections {
  476. target: appModel
  477. onSetRadar2Play: {
  478. if (appModel.ready == false||Number(Radar2Value) > 1000) {
  479. radarTwoSound.stop()
  480. } else {
  481. if ((Number)(radarTwoSound.playing) === 0) {
  482. radarTwoSound.play()
  483. }
  484. }
  485. }
  486. }
  487. //超声波雷达3的声音
  488. SoundEffect {
  489. id: radarThreeSound
  490. source: "qrc:/sound/beep-1.wav"
  491. volume: 1.0
  492. loops: SoundEffect.Infinite
  493. }
  494. Connections {
  495. target: appModel
  496. onSetRadar3Play: {
  497. if (appModel.ready == false||Number(Radar3Value) > 1000) {
  498. radarThreeSound.stop()
  499. } else {
  500. if ((Number)(radarThreeSound.playing) === 0) {
  501. radarThreeSound.play()
  502. }
  503. }
  504. }
  505. }
  506. //超声波雷达4的声音
  507. SoundEffect {
  508. id: radarFourSound
  509. source: "qrc:/sound/beep-1.wav"
  510. volume: 1.0
  511. loops: SoundEffect.Infinite
  512. }
  513. Connections {
  514. target: appModel
  515. onSetRadar4Play: {
  516. if (appModel.ready == false||Number(Radar4Value) > 1000) {
  517. radarFourSound.stop()
  518. } else {
  519. if ((Number)(radarFourSound.playing) === 0) {
  520. radarFourSound.play()
  521. }
  522. }
  523. }
  524. }
  525. //超声波雷达5的声音
  526. SoundEffect {
  527. id: radarFiveSound
  528. source: "qrc:/sound/beep-1.wav"
  529. volume: 1.0
  530. loops: SoundEffect.Infinite
  531. }
  532. Connections {
  533. target: appModel
  534. onSetRadar5Play: {
  535. if (appModel.ready == false||Number(Radar5Value) > 1000) {
  536. radarFiveSound.stop()
  537. } else {
  538. if ((Number)(radarFiveSound.playing) === 0) {
  539. radarFiveSound.play()
  540. }
  541. }
  542. }
  543. }
  544. //超声波雷达6的声音
  545. SoundEffect {
  546. id: radarSixSound
  547. source:"qrc:/sound/beep-1.wav"
  548. volume: 1.0
  549. loops: SoundEffect.Infinite
  550. }
  551. Connections {
  552. target: appModel
  553. onSetRadar6Play: {
  554. if (appModel.ready == false||Number(Radar6Value) > 1000) {
  555. radarSixSound.stop()
  556. } else {
  557. if ((Number)(radarSixSound.playing) === 0) {
  558. radarSixSound.play()
  559. }
  560. }
  561. }
  562. }
  563. //超声波雷达7的声音
  564. SoundEffect {
  565. id: radarSevenSound
  566. source: "qrc:/sound/beep-1.wav"
  567. volume: 1.0
  568. loops: SoundEffect.Infinite
  569. }
  570. Connections {
  571. target: appModel
  572. onSetRadar7Play: {
  573. if (appModel.ready == false||Number(Radar7Value) > 1000) {
  574. radarSevenSound.stop()
  575. } else {
  576. if ((Number)(radarSevenSound.playing) === 0) {
  577. radarSevenSound.play()
  578. }
  579. }
  580. }
  581. }
  582. //超声波雷达8的声音
  583. SoundEffect {
  584. id: radarEightSound
  585. source: "qrc:/sound/beep-1.wav"
  586. volume: 1.0
  587. loops: SoundEffect.Infinite
  588. }
  589. Connections {
  590. target: appModel
  591. onSetRadar8Play: {
  592. if (appModel.ready == false||Number(Radar8Value) > 1000) {
  593. radarEightSound.stop()
  594. } else {
  595. if ((Number)(radarEightSound.playing) === 0) {
  596. radarEightSound.play()
  597. }
  598. }
  599. }
  600. }
  601. }
  602. //此处加入的
  603. Row {
  604. Rectangle {
  605. id: statusLeftLogin
  606. anchors.fill: parent
  607. visible: false
  608. color: 'transparent'
  609. //登录界面最左侧上边框
  610. Image {
  611. id: sideUp_left
  612. x:-60
  613. z: 99
  614. width:150
  615. height:720
  616. visible: true
  617. source: 'qrc:/images/sideUp_left.png'
  618. }
  619. //登录界面最右侧上边框
  620. Image {
  621. id: sideUp_right
  622. x: 300
  623. z: 99
  624. width:150
  625. height:720
  626. visible: true
  627. source: 'qrc:/images/sideUp_right1.png'
  628. }
  629. //登录界面最左侧下边框
  630. Image {
  631. id: sideDown_left
  632. z: 99
  633. height: 400
  634. anchors.left: statusLeftLogin.left
  635. anchors.leftMargin: 0
  636. anchors.top: sideUp_left.bottom
  637. anchors.topMargin: -7
  638. fillMode: Image.Stretch
  639. visible: true
  640. source: 'qrc:/images/sideDown_left.png'
  641. }
  642. //登录界面最右侧下边框
  643. Image {
  644. id: sideDown_right
  645. z: 99
  646. height: 400
  647. anchors.right: statusLeftLogin.right
  648. anchors.rightMargin: -50 - 400
  649. anchors.top: sideUp_right.bottom
  650. anchors.topMargin: 0 - 10
  651. fillMode: Image.Stretch
  652. visible: true
  653. source: 'qrc:/images/sideDown_right.png'
  654. }
  655. Image {
  656. id:powerLegImg1
  657. visible: appModel.leftFrontLegChosed === true
  658. anchors.top:sideDown_right.top
  659. anchors.topMargin: 270
  660. anchors.left:sideDown_right.right
  661. anchors.leftMargin:30
  662. source: 'qrc:/images/powerLeg.png'
  663. z: 99
  664. }
  665. Text {
  666. id:powerLegText1
  667. z:100
  668. visible: appModel.leftFrontLegChosed === true
  669. anchors.top:powerLegImg1.top
  670. anchors.topMargin: 60
  671. anchors.left:powerLegImg1.left
  672. anchors.leftMargin:10
  673. text:"支腿1"
  674. color:"#00FF66"
  675. font{
  676. family:"Cambria"
  677. pointSize:10
  678. }
  679. }
  680. Image {
  681. id:powerLegImg2
  682. visible: appModel.rightFrontLegChosed === true
  683. anchors.top:sideDown_right.top
  684. anchors.topMargin: 270
  685. anchors.left:sideDown_right.right
  686. anchors.leftMargin:130
  687. source: 'qrc:/images/powerLeg.png'
  688. z: 99
  689. }
  690. Text {
  691. id:powerLegText2
  692. z:100
  693. visible: appModel.rightFrontLegChosed === true
  694. anchors.top:powerLegImg2.top
  695. anchors.topMargin: 60
  696. anchors.left:powerLegImg2.left
  697. anchors.leftMargin:10
  698. text:"支腿2"
  699. color:"#00FF66"
  700. font{
  701. family:"Cambria"
  702. pointSize:10
  703. }
  704. }
  705. Image {
  706. id:powerLegImg3
  707. visible: appModel.leftRearLegChosed === true
  708. anchors.top:sideDown_right.top
  709. anchors.topMargin: 270
  710. anchors.left:sideDown_right.right
  711. anchors.leftMargin:830
  712. source: 'qrc:/images/powerLeg.png'
  713. z: 99
  714. }
  715. Text {
  716. id:powerLegText3
  717. z:100
  718. visible: appModel.leftRearLegChosed === true
  719. anchors.top:powerLegImg3.top
  720. anchors.topMargin: 60
  721. anchors.left:powerLegImg3.left
  722. anchors.leftMargin:10
  723. text:"支腿3"
  724. color:"#00FF66"
  725. font{
  726. family:"Cambria"
  727. pointSize:10
  728. }
  729. }
  730. Image {
  731. id:powerLegImg4
  732. visible: appModel.rightRearLegChosed === true
  733. anchors.top:sideDown_right.top
  734. anchors.topMargin: 270
  735. anchors.left:sideDown_right.right
  736. anchors.leftMargin:930
  737. source: 'qrc:/images/powerLeg.png'
  738. z: 99
  739. }
  740. Text {
  741. id:powerLegText4
  742. z:100
  743. visible: appModel.rightRearLegChosed === true
  744. anchors.top:powerLegImg4.top
  745. anchors.topMargin: 60
  746. anchors.left:powerLegImg4.left
  747. anchors.leftMargin:10
  748. text:"支腿4"
  749. color:"#00FF66"
  750. font{
  751. family:"Cambria"
  752. pointSize:10
  753. }
  754. }
  755. //左侧车辆信息
  756. Column {
  757. id: carDataColumn
  758. width: 80
  759. height: 750
  760. anchors.top: statusLeftLogin.top
  761. anchors.topMargin: 0
  762. //anchors.horizontalCenter: statusData.horizontalCenter
  763. Text {
  764. id: posData
  765. text: "车辆姿态:"
  766. color: mainTextColor
  767. anchors.top: carDataColumn.top
  768. anchors.topMargin: 20
  769. anchors.left: carDataColumn.left
  770. anchors.leftMargin: 20
  771. font.family: alibaba.name
  772. font.pointSize: 20
  773. anchors.horizontalCenter: statusData.horizontalCenter
  774. }
  775. Image {
  776. //抓钢车侧视图片
  777. id: posSide
  778. anchors.top: posData.bottom
  779. anchors.topMargin: -10
  780. anchors.left: posData.left
  781. anchors.leftMargin: 0
  782. width: 360 / 2
  783. height: 240 / 2
  784. fillMode: Image.Stretch
  785. source: 'qrc:/images/side_view.png'
  786. anchors.horizontalCenter: statusData.horizontalCenter
  787. Component.onCompleted: {
  788. posSideTimer.start()
  789. }
  790. }
  791. RotationAnimation {
  792. id: posSideRota
  793. target: posSide
  794. from: 0
  795. to: 0
  796. duration: 100
  797. }
  798. Timer {
  799. id: posSideTimer1
  800. interval: 2000
  801. repeat: true
  802. onTriggered: {
  803. posSideAnim.from = 0
  804. posSideAnim.to = appModel.imux
  805. posSideAnim.start()
  806. }
  807. }
  808. Row {
  809. id: postextRow
  810. anchors.top: posSide.bottom
  811. anchors.topMargin: 0
  812. anchors.left: posSide.left
  813. anchors.leftMargin: 0
  814. Text {
  815. id: yAngleLogin
  816. text: "横向倾角度:"
  817. color: mainTextColor
  818. anchors.left: postextRow.left
  819. anchors.leftMargin: 20
  820. font.family: alibaba.name
  821. font.pointSize: 14
  822. }
  823. spacing: 50
  824. Text {
  825. id: yAngleValueLogin
  826. text: appModel.imux.toFixed(0)
  827. color: appModel.imux >= 30 ? 'red' : '#FFFFFF'
  828. anchors.left: yAngleLogin.right
  829. anchors.leftMargin: 20
  830. font.family: digtalFont.name
  831. font.pointSize: 18
  832. Component.onCompleted: {
  833. console.log("appModel.imux", appModel.imux)
  834. }
  835. }
  836. }
  837. Image {
  838. //抓钢车后视图片
  839. id: posRear
  840. anchors.top: posData.bottom
  841. anchors.topMargin: -10
  842. anchors.left: posData.left
  843. anchors.leftMargin: 170
  844. width: 360 / 2
  845. height: 240 / 2
  846. fillMode: Image.Stretch
  847. source: 'qrc:/images/rear_view.png'
  848. anchors.horizontalCenter: statusData.horizontalCenter
  849. Component.onCompleted: {
  850. posRearTimer.start()
  851. }
  852. }
  853. RotationAnimation {
  854. id: posRearAnim
  855. target: posRear
  856. from: 0
  857. to: 0
  858. duration: 100
  859. }
  860. Timer {
  861. id: posRearTimer1
  862. interval: 2000
  863. repeat: true
  864. onTriggered: {
  865. posRearAnim.from = 0
  866. posRearAnim.to = appModel.imuy
  867. posRearAnim.start()
  868. }
  869. }
  870. Row {
  871. id: xAngleRow
  872. anchors.top: posRear.bottom
  873. anchors.topMargin: 0
  874. anchors.left: posRear.left
  875. anchors.leftMargin: 0
  876. Text {
  877. id: xAngle
  878. text: "纵向倾角度:"
  879. color: mainTextColor
  880. anchors.left: xAngleRow.left
  881. anchors.leftMargin: 40
  882. font.family: alibaba.name
  883. font.pointSize: 14
  884. anchors.horizontalCenter: statusData.horizontalCenter
  885. }
  886. spacing: 50
  887. Text {
  888. id: xAngleValue
  889. text: appModel.imux.toFixed(0)
  890. color: appModel.imux >= 30 ? 'red' : '#FFFFFF'
  891. anchors.left: xAngle.right
  892. anchors.leftMargin: 20
  893. Component.onCompleted: {
  894. console.log("appModel.imux", appModel.imux)
  895. }
  896. font.family: digtalFont.name
  897. font.pointSize: 18
  898. }
  899. }
  900. Row {
  901. //燃油油位
  902. id: fuelLevel
  903. anchors.top: xAngleRow.bottom
  904. anchors.topMargin: 40
  905. anchors.left: carDataColumn.left
  906. anchors.leftMargin: 10
  907. Image {
  908. id: fuelLevelImage
  909. anchors.left: fuelLevel.left
  910. anchors.leftMargin: 30
  911. width: 24
  912. height: 24
  913. fillMode: Image.Stretch
  914. source: 'qrc:/images/fuelLevel.png'
  915. anchors.horizontalCenter: statusData.horizontalCenter
  916. }
  917. Text {
  918. id: fuelLevelText
  919. text: "燃油 油位:"
  920. color: mainTextColor
  921. anchors.left: fuelLevelImage.right
  922. anchors.leftMargin: 30
  923. font.family: alibaba.name
  924. font.pointSize: 14
  925. anchors.horizontalCenter: statusData.horizontalCenter
  926. }
  927. spacing: 50
  928. Text {
  929. id: fuelLevelTextValue
  930. anchors.left: fuelLevelText.right
  931. anchors.leftMargin: 30
  932. text: appModel.fuelLevel.toFixed(0)
  933. //color: appModel.fuelLevel <= 10 ? 'red' : '#FFFFFF'
  934. color:'#FFFFFF'
  935. Component.onCompleted: {
  936. console.log("appModel.fuelLevel",
  937. appModel.fuelLevel)
  938. }
  939. font.family: digtalFont.name
  940. font.pointSize: 18
  941. }
  942. Text {
  943. id: fuelLevelText1
  944. text: "%"
  945. color: mainTextColor
  946. anchors.left: fuelLevelText.right
  947. anchors.leftMargin: 90
  948. font.family: alibaba.name
  949. font.pointSize: 14
  950. anchors.horizontalCenter: statusData.horizontalCenter
  951. }
  952. }
  953. Row {
  954. //发动机水温
  955. id: waterTemperature
  956. anchors.top: fuelLevel.bottom
  957. anchors.topMargin: 30
  958. anchors.left: carDataColumn.left
  959. anchors.leftMargin: 10
  960. Image {
  961. id: waterTemperatureImage
  962. anchors.left: waterTemperature.left
  963. anchors.leftMargin: 30
  964. width: 24
  965. height: 24
  966. fillMode: Image.Stretch
  967. source: 'qrc:/images/waterTemperature.png'
  968. anchors.horizontalCenter: statusData.horizontalCenter
  969. }
  970. Text {
  971. id: waterTemperatureText
  972. text: "发动机水温:"
  973. color: mainTextColor
  974. anchors.left: waterTemperatureImage.right
  975. anchors.leftMargin: 30
  976. font.family: alibaba.name
  977. font.pointSize: 14
  978. anchors.horizontalCenter: statusData.horizontalCenter
  979. }
  980. spacing: 50
  981. Text {
  982. id: waterTemperatureTextValue
  983. anchors.left: waterTemperatureText.right
  984. anchors.leftMargin: 30
  985. text: (appModel.engineTemperature / 100 - 100).toFixed(
  986. 0)
  987. //color: appModel.engineTemperature / 100 >= 100 ? 'red' : '#FFFFFF'
  988. color:'#FFFFFF'
  989. Component.onCompleted: {
  990. console.log("appModel.engineTemperature",
  991. appModel.engineTemperature)
  992. }
  993. font.family: digtalFont.name
  994. font.pointSize: 18
  995. }
  996. Text {
  997. id: waterTemperatureText1
  998. text: "℃"
  999. color: mainTextColor
  1000. anchors.left: waterTemperatureText.right
  1001. anchors.leftMargin: 90
  1002. font.family: alibaba.name
  1003. font.pointSize: 14
  1004. anchors.horizontalCenter: statusData.horizontalCenter
  1005. }
  1006. }
  1007. Row {
  1008. //液压油油温
  1009. id: oilTemperature
  1010. anchors.top: waterTemperature.bottom
  1011. anchors.topMargin: 30
  1012. anchors.left: carDataColumn.left
  1013. anchors.leftMargin: 10
  1014. Image {
  1015. id: oilTemperatureImage
  1016. anchors.left: oilTemperature.left
  1017. anchors.leftMargin: 30
  1018. width: 24
  1019. height: 24
  1020. fillMode: Image.Stretch
  1021. source: 'qrc:/images/oilTemperature.png'
  1022. anchors.horizontalCenter: statusData.horizontalCenter
  1023. }
  1024. Text {
  1025. id: oilTemperatureText
  1026. text: "液压油油温:"
  1027. color: mainTextColor
  1028. anchors.left: oilTemperatureImage.right
  1029. anchors.leftMargin: 30
  1030. font.family: alibaba.name
  1031. font.pointSize: 14
  1032. anchors.horizontalCenter: statusData.horizontalCenter
  1033. }
  1034. spacing: 50
  1035. Text {
  1036. id: oilTemperatureTextValue
  1037. anchors.left: oilTemperatureText.right
  1038. anchors.leftMargin: 30
  1039. text: (appModel.hydraulicOilTemperature / 100).toFixed(
  1040. 0)
  1041. color: appModel.hydraulicOilTemperature / 100 >= 160 ? 'red' : '#FFFFFF'
  1042. Component.onCompleted: {
  1043. console.log("appModel.hydraulicOilTemperature",
  1044. appModel.hydraulicOilTemperature)
  1045. }
  1046. font.family: digtalFont.name
  1047. font.pointSize: 18
  1048. }
  1049. Text {
  1050. id: oilTemperatureText1
  1051. text: "℃"
  1052. color: mainTextColor
  1053. anchors.left: oilTemperatureText.right
  1054. anchors.leftMargin: 90
  1055. font.family: alibaba.name
  1056. font.pointSize: 14
  1057. anchors.horizontalCenter: statusData.horizontalCenter
  1058. }
  1059. }
  1060. Row {
  1061. //主泵1压力
  1062. id: pumpPressure1
  1063. anchors.top: oilTemperature.bottom
  1064. anchors.topMargin: 30
  1065. anchors.left: carDataColumn.left
  1066. anchors.leftMargin: 10
  1067. Image {
  1068. id: pumpPressure1Image
  1069. anchors.left: pumpPressure1.left
  1070. anchors.leftMargin: 30
  1071. width: 24
  1072. height: 24
  1073. fillMode: Image.Stretch
  1074. source: 'qrc:/images/pumpPressure.png'
  1075. anchors.horizontalCenter: statusData.horizontalCenter
  1076. }
  1077. Text {
  1078. id: pumpPressure1Text
  1079. text: "主泵 1 压力:"
  1080. color: mainTextColor
  1081. anchors.left: pumpPressure1Image.right
  1082. anchors.leftMargin: 30
  1083. font.family: alibaba.name
  1084. font.pointSize: 14
  1085. anchors.horizontalCenter: statusData.horizontalCenter
  1086. }
  1087. spacing: 50
  1088. Text {
  1089. id: pumpPressure1TextValue
  1090. anchors.left: pumpPressure1Text.right
  1091. anchors.leftMargin: 30
  1092. text: (appModel.mainPump1Pressure / 100).toFixed(0)
  1093. color: appModel.mainPump1Pressure / 100 >= 260 ? 'red' : '#FFFFFF'
  1094. Component.onCompleted: {
  1095. console.log("appModel.mainPump1Pressure",
  1096. appModel.mainPump1Pressure)
  1097. }
  1098. font.family: digtalFont.name
  1099. font.pointSize: 18
  1100. }
  1101. Text {
  1102. id: pumpPressure1Text1
  1103. text: "bar"
  1104. color: mainTextColor
  1105. anchors.left: pumpPressure1Text.right
  1106. anchors.leftMargin: 90
  1107. font.family: alibaba.name
  1108. font.pointSize: 14
  1109. anchors.horizontalCenter: statusData.horizontalCenter
  1110. }
  1111. }
  1112. Row {
  1113. //主泵2压力
  1114. id: pumpPressure2
  1115. anchors.top: pumpPressure1.bottom
  1116. anchors.topMargin: 30
  1117. anchors.left: carDataColumn.left
  1118. anchors.leftMargin: 10
  1119. Image {
  1120. id: pumpPressure2Image
  1121. anchors.left: pumpPressure2.left
  1122. anchors.leftMargin: 30
  1123. width: 24
  1124. height: 24
  1125. fillMode: Image.Stretch
  1126. source: 'qrc:/images/pumpPressure.png'
  1127. anchors.horizontalCenter: statusData.horizontalCenter
  1128. }
  1129. Text {
  1130. id: pumpPressure2Text
  1131. text: "主泵 2 压力:"
  1132. color: mainTextColor
  1133. anchors.left: pumpPressure2Image.right
  1134. anchors.leftMargin: 30
  1135. font.family: alibaba.name
  1136. font.pointSize: 14
  1137. anchors.horizontalCenter: statusData.horizontalCenter
  1138. }
  1139. spacing: 50
  1140. Text {
  1141. id: pumpPressure2TextValue
  1142. anchors.left: pumpPressure2Text.right
  1143. anchors.leftMargin: 30
  1144. text: (appModel.mainPump2Pressure / 100).toFixed(0)
  1145. color: appModel.mainPump2Pressure / 100 >= 260 ? 'red' : '#FFFFFF'
  1146. Component.onCompleted: {
  1147. console.log("appModel.mainPump2Pressure",
  1148. appModel.mainPump2Pressure)
  1149. }
  1150. font.family: digtalFont.name
  1151. font.pointSize: 18
  1152. }
  1153. Text {
  1154. id: pumpPressure2Text1
  1155. text: "bar"
  1156. color: mainTextColor
  1157. anchors.left: pumpPressure2Text.right
  1158. anchors.leftMargin: 90
  1159. font.family: alibaba.name
  1160. font.pointSize: 14
  1161. anchors.horizontalCenter: statusData.horizontalCenter
  1162. }
  1163. }
  1164. Row {
  1165. //手柄挡位----改为水箱水位
  1166. id: handleGear
  1167. anchors.top: pumpPressure2.bottom
  1168. anchors.topMargin: 30
  1169. anchors.left: carDataColumn.left
  1170. anchors.leftMargin: 10
  1171. Image {
  1172. id: handleGearImage
  1173. anchors.left: handleGear.left
  1174. anchors.leftMargin: 30
  1175. width: 24
  1176. height: 24
  1177. fillMode: Image.Stretch
  1178. source: 'qrc:/images/handleGear.png'
  1179. anchors.horizontalCenter: statusData.horizontalCenter
  1180. }
  1181. Text {
  1182. id: handleGearText
  1183. text: "水箱 水位:"
  1184. color: mainTextColor
  1185. anchors.left: handleGearImage.right
  1186. anchors.leftMargin: 30
  1187. font.family: alibaba.name
  1188. font.pointSize: 14
  1189. anchors.horizontalCenter: statusData.horizontalCenter
  1190. }
  1191. spacing: 50
  1192. Text {
  1193. id: handleGearTextValue
  1194. anchors.left: handleGearText.right
  1195. anchors.leftMargin: 30
  1196. text: appModel.handGear.toFixed(0)
  1197. color: '#FFFFFF'
  1198. Component.onCompleted: {
  1199. console.log("appModel.handGear",
  1200. appModel.handGear)
  1201. }
  1202. font.family: digtalFont.name
  1203. font.pointSize: 18
  1204. }
  1205. Text {
  1206. id: handleGearText1
  1207. text: "%"
  1208. color: mainTextColor
  1209. anchors.left: handleGearText.right
  1210. anchors.leftMargin: 90
  1211. font.family: alibaba.name
  1212. font.pointSize: 14
  1213. anchors.horizontalCenter: statusData.horizontalCenter
  1214. }
  1215. }
  1216. Row {
  1217. //实际挡位------发动机机油压力
  1218. id: gearPosition
  1219. anchors.top: handleGear.bottom
  1220. anchors.topMargin: 30
  1221. anchors.left: carDataColumn.left
  1222. anchors.leftMargin: 10
  1223. Image {
  1224. id: gearPositionImage
  1225. anchors.left: gearPosition.left
  1226. anchors.leftMargin: 30
  1227. width: 24
  1228. height: 24
  1229. fillMode: Image.Stretch
  1230. source: 'qrc:/images/handleGear.png'
  1231. anchors.horizontalCenter: statusData.horizontalCenter
  1232. }
  1233. Text {
  1234. id: gearPositionText
  1235. text: "机油 压力:"
  1236. color: mainTextColor
  1237. anchors.left: gearPositionImage.right
  1238. anchors.leftMargin: 30
  1239. font.family: alibaba.name
  1240. font.pointSize: 14
  1241. anchors.horizontalCenter: statusData.horizontalCenter
  1242. }
  1243. spacing: 50
  1244. Text {
  1245. id: gearPositionTextValue
  1246. anchors.left: gearPositionText.right
  1247. anchors.leftMargin: 30
  1248. text: appModel.actualGear.toFixed(0)
  1249. color: '#FFFFFF'
  1250. Component.onCompleted: {
  1251. console.log("appModel.actualGear",
  1252. appModel.actualGear)
  1253. }
  1254. font.family: digtalFont.name
  1255. font.pointSize: 18
  1256. }
  1257. Text {
  1258. id: gearPositionText1
  1259. text: "Kpa"
  1260. color: mainTextColor
  1261. anchors.left: gearPositionText.right
  1262. anchors.leftMargin: 90
  1263. font.family: alibaba.name
  1264. font.pointSize: 14
  1265. anchors.horizontalCenter: statusData.horizontalCenter
  1266. }
  1267. }
  1268. Row {
  1269. //抓具高度
  1270. id: gripperHeight
  1271. anchors.top: gearPosition.bottom
  1272. anchors.topMargin: 30
  1273. anchors.left: carDataColumn.left
  1274. anchors.leftMargin: 10
  1275. Image {
  1276. id: gripperHeightImage
  1277. anchors.left: gripperHeight.left
  1278. anchors.leftMargin: 30
  1279. width: 24
  1280. height: 24
  1281. fillMode: Image.Stretch
  1282. source: 'qrc:/images/gripperHeight.png'
  1283. anchors.horizontalCenter: statusData.horizontalCenter
  1284. }
  1285. Text {
  1286. id: gripperHeightText
  1287. text: "抓具 高度:"
  1288. color: mainTextColor
  1289. anchors.left: gripperHeightImage.right
  1290. anchors.leftMargin: 30
  1291. font.family: alibaba.name
  1292. font.pointSize: 14
  1293. anchors.horizontalCenter: statusData.horizontalCenter
  1294. }
  1295. spacing: 50
  1296. Text {
  1297. id: gripperHeightTextValue
  1298. anchors.left: gripperHeightText.right
  1299. anchors.leftMargin: 30
  1300. text: appModel.gripperHeight.toFixed(1)
  1301. color: '#FFFFFF'
  1302. Component.onCompleted: {
  1303. console.log("appModel.gripperHeight",
  1304. appModel.gripperHeight)
  1305. }
  1306. font.family: digtalFont.name
  1307. font.pointSize: 18
  1308. }
  1309. Text {
  1310. id: gripperHeightText1
  1311. text: "m"
  1312. color: mainTextColor
  1313. anchors.left: gripperHeightText.right
  1314. anchors.leftMargin: 90
  1315. font.family: alibaba.name
  1316. font.pointSize: 14
  1317. anchors.horizontalCenter: statusData.horizontalCenter
  1318. }
  1319. }
  1320. Row {
  1321. //幅度
  1322. id: amplitude
  1323. anchors.top: gripperHeight.bottom
  1324. anchors.topMargin: 30
  1325. anchors.left: carDataColumn.left
  1326. anchors.leftMargin: 10
  1327. Image {
  1328. id: amplitudeImage
  1329. anchors.left: amplitude.left
  1330. anchors.leftMargin: 30
  1331. width: 24
  1332. height: 24
  1333. fillMode: Image.Stretch
  1334. source: 'qrc:/images/amplitude.png'
  1335. anchors.horizontalCenter: statusData.horizontalCenter
  1336. }
  1337. Text {
  1338. id: amplitudeText
  1339. text: "幅度 :"
  1340. color: mainTextColor
  1341. anchors.left: amplitudeImage.right
  1342. anchors.leftMargin: 30
  1343. font.family: alibaba.name
  1344. font.pointSize: 14
  1345. anchors.horizontalCenter: statusData.horizontalCenter
  1346. }
  1347. spacing: 50
  1348. Text {
  1349. id: amplitudeTextValue
  1350. anchors.left: amplitudeText.right
  1351. anchors.leftMargin: 30
  1352. text: appModel.amplitude1.toFixed(1)
  1353. color: '#FFFFFF'
  1354. Component.onCompleted: {
  1355. console.log("appModel.amplitude",
  1356. appModel.amplitude1)
  1357. }
  1358. font.family: digtalFont.name
  1359. font.pointSize: 18
  1360. }
  1361. Text {
  1362. id: amplitudeText1
  1363. text: "m"
  1364. color: mainTextColor
  1365. anchors.left: amplitudeText.right
  1366. anchors.leftMargin: 90
  1367. font.family: alibaba.name
  1368. font.pointSize: 14
  1369. anchors.horizontalCenter: statusData.horizontalCenter
  1370. }
  1371. }
  1372. Row {
  1373. //动臂角度
  1374. id: boomAngle
  1375. anchors.top: amplitude.bottom
  1376. anchors.topMargin: 30
  1377. anchors.left: carDataColumn.left
  1378. anchors.leftMargin: 10
  1379. Image {
  1380. id: boomAngleImage
  1381. anchors.left: boomAngle.left
  1382. anchors.leftMargin: 30
  1383. width: 24
  1384. height: 24
  1385. fillMode: Image.Stretch
  1386. source: 'qrc:/images/boomAngle.png'
  1387. anchors.horizontalCenter: statusData.horizontalCenter
  1388. }
  1389. Text {
  1390. id: boomAngleText
  1391. text: "动臂 角度:"
  1392. color: mainTextColor
  1393. anchors.left: boomAngleImage.right
  1394. anchors.leftMargin: 30
  1395. font.family: alibaba.name
  1396. font.pointSize: 14
  1397. anchors.horizontalCenter: statusData.horizontalCenter
  1398. }
  1399. spacing: 50
  1400. Text {
  1401. id: boomAngleTextValue
  1402. anchors.left: boomAngleText.right
  1403. anchors.leftMargin: 30
  1404. text: (appModel.boomAngle / 100 - 100).toFixed(0)
  1405. color: '#FFFFFF'
  1406. Component.onCompleted: {
  1407. console.log("appModel.boomAngle",
  1408. appModel.boomAngle / 100 - 100)
  1409. }
  1410. font.family: digtalFont.name
  1411. font.pointSize: 18
  1412. }
  1413. Text {
  1414. id: boomAngleText1
  1415. text: "°"
  1416. color: mainTextColor
  1417. anchors.left: boomAngleText.right
  1418. anchors.leftMargin: 90
  1419. font.family: alibaba.name
  1420. font.pointSize: 14
  1421. anchors.horizontalCenter: statusData.horizontalCenter
  1422. }
  1423. }
  1424. Row {
  1425. //斗杆角度
  1426. id: stickAngle
  1427. anchors.top: boomAngle.bottom
  1428. anchors.topMargin: 30
  1429. anchors.left: carDataColumn.left
  1430. anchors.leftMargin: 10
  1431. Image {
  1432. id: stickAngleImage
  1433. anchors.left: stickAngle.left
  1434. anchors.leftMargin: 30
  1435. width: 24
  1436. height: 24
  1437. fillMode: Image.Stretch
  1438. source: 'qrc:/images/stickAngle.png'
  1439. anchors.horizontalCenter: statusData.horizontalCenter
  1440. }
  1441. Text {
  1442. id: stickAngleText
  1443. text: "斗杆 角度:"
  1444. color: mainTextColor
  1445. anchors.left: stickAngleImage.right
  1446. anchors.leftMargin: 30
  1447. font.family: alibaba.name
  1448. font.pointSize: 14
  1449. anchors.horizontalCenter: statusData.horizontalCenter
  1450. }
  1451. spacing: 50
  1452. Text {
  1453. id: stickAngleTextValue
  1454. anchors.left: stickAngleText.right
  1455. anchors.leftMargin: 30
  1456. text: (appModel.stickAngle / 100 - 180).toFixed(0)
  1457. color: '#FFFFFF'
  1458. Component.onCompleted: {
  1459. console.log("appModel.stickAngle",
  1460. appModel.stickAngle / 100 - 180)
  1461. }
  1462. font.family: digtalFont.name
  1463. font.pointSize: 18
  1464. }
  1465. Text {
  1466. id: stickAngleText1
  1467. text: "°"
  1468. color: mainTextColor
  1469. anchors.left: stickAngleText.right
  1470. anchors.leftMargin: 90
  1471. font.family: alibaba.name
  1472. font.pointSize: 14
  1473. anchors.horizontalCenter: statusData.horizontalCenter
  1474. }
  1475. }
  1476. Row {
  1477. //前轮对中
  1478. id: frontToggle
  1479. anchors.top: stickAngle.bottom
  1480. anchors.topMargin: 30
  1481. anchors.left: carDataColumn.left
  1482. anchors.leftMargin: 10
  1483. Image {
  1484. id: frontToggleImage
  1485. anchors.left: frontToggle.left
  1486. anchors.leftMargin: 30
  1487. width: 24
  1488. height: 24
  1489. fillMode: Image.Stretch
  1490. source: 'qrc:/images/frontToggle.png'
  1491. anchors.horizontalCenter: statusData.horizontalCenter
  1492. }
  1493. Text {
  1494. id: frontToggleText
  1495. text: "前轮 对中:"
  1496. color: mainTextColor
  1497. anchors.left: frontToggleImage.right
  1498. anchors.leftMargin: 30
  1499. font.family: alibaba.name
  1500. font.pointSize: 14
  1501. anchors.horizontalCenter: statusData.horizontalCenter
  1502. }
  1503. spacing: 50
  1504. Text {
  1505. id: frontToggleTextValue
  1506. anchors.left: frontToggleText.right
  1507. anchors.leftMargin: 30
  1508. text: "已对中"
  1509. visible: appModel.frontToggle === true
  1510. color: mainTextColor
  1511. Component.onCompleted: {
  1512. console.log("appModel.frontToggle",
  1513. appModel.frontToggle)
  1514. }
  1515. font.family: alibaba.name
  1516. font.pointSize: 14
  1517. }
  1518. Text {
  1519. id: frontToggleText1
  1520. text: "未对中"
  1521. visible: appModel.frontToggle === false
  1522. color: "red"
  1523. anchors.left: frontToggleText.right
  1524. anchors.leftMargin: 30
  1525. font.family: alibaba.name
  1526. font.pointSize: 14
  1527. anchors.horizontalCenter: statusData.horizontalCenter
  1528. }
  1529. }
  1530. Row {
  1531. //后轮对中
  1532. id: backToggle
  1533. anchors.top: frontToggle.bottom
  1534. anchors.topMargin: 30
  1535. anchors.left: carDataColumn.left
  1536. anchors.leftMargin: 10
  1537. Image {
  1538. id: backToggleImage
  1539. anchors.left: backToggle.left
  1540. anchors.leftMargin: 30
  1541. width: 24
  1542. height: 24
  1543. fillMode: Image.Stretch
  1544. source: 'qrc:/images/backToggle.png'
  1545. anchors.horizontalCenter: statusData.horizontalCenter
  1546. }
  1547. Text {
  1548. id: backToggleText
  1549. text: "后轮 对中:"
  1550. color: mainTextColor
  1551. anchors.left: backToggleImage.right
  1552. anchors.leftMargin: 30
  1553. font.family: alibaba.name
  1554. font.pointSize: 14
  1555. anchors.horizontalCenter: statusData.horizontalCenter
  1556. }
  1557. spacing: 50
  1558. Text {
  1559. id: backToggleTextValue
  1560. anchors.left: backToggleText.right
  1561. anchors.leftMargin: 30
  1562. text: "已对中"
  1563. visible: appModel.backToggle === true
  1564. color: mainTextColor
  1565. Component.onCompleted: {
  1566. console.log("appModel.backToggle",
  1567. appModel.backToggle)
  1568. //sss
  1569. //console.log(appModel.boomAngleSensor_F)
  1570. //console.log(appModel.grabClosurePilotPressureSensor_F)
  1571. }
  1572. font.family: alibaba.name
  1573. font.pointSize: 14
  1574. }
  1575. Text {
  1576. id: backToggleText1
  1577. text: "未对中"
  1578. visible: appModel.backToggle === false
  1579. color: "red"
  1580. anchors.left: backToggleText.right
  1581. anchors.leftMargin: 30
  1582. font.family: alibaba.name
  1583. font.pointSize: 14
  1584. anchors.horizontalCenter: statusData.horizontalCenter
  1585. }
  1586. }
  1587. Row {
  1588. //启动联锁
  1589. id: interLockShow
  1590. anchors.top: backToggle.bottom
  1591. anchors.topMargin: 30
  1592. anchors.left: carDataColumn.left
  1593. anchors.leftMargin: 10
  1594. Image {
  1595. id: interLockImage
  1596. anchors.left: interLockShow.left
  1597. anchors.leftMargin: 30
  1598. width: 24
  1599. height: 24
  1600. fillMode: Image.Stretch
  1601. source: 'qrc:/images/interlock.png'
  1602. anchors.horizontalCenter: statusData.horizontalCenter
  1603. }
  1604. Text {
  1605. id: interLockText
  1606. text: "启动 联锁:"
  1607. color: mainTextColor
  1608. anchors.left: interLockImage.right
  1609. anchors.leftMargin: 30
  1610. font.family: alibaba.name
  1611. font.pointSize: 14
  1612. anchors.horizontalCenter: statusData.horizontalCenter
  1613. }
  1614. spacing: 50
  1615. Text {
  1616. id: interLockTextValue
  1617. anchors.left: interLockText.right
  1618. anchors.leftMargin: 30
  1619. text: "已启动"
  1620. visible: appModel.interLock === 1
  1621. color: mainTextColor
  1622. Component.onCompleted: {
  1623. console.log("appModel.backToggle",
  1624. appModel.backToggle)
  1625. //sss
  1626. //console.log(appModel.boomAngleSensor_F)
  1627. //console.log(appModel.grabClosurePilotPressureSensor_F)
  1628. }
  1629. font.family: alibaba.name
  1630. font.pointSize: 14
  1631. }
  1632. Text {
  1633. id: interLockText1
  1634. text: "未启动"
  1635. visible: appModel.interLock === 0
  1636. color: "red"
  1637. anchors.left: interLockText.right
  1638. anchors.leftMargin: 30
  1639. font.family: alibaba.name
  1640. font.pointSize: 14
  1641. anchors.horizontalCenter: statusData.horizontalCenter
  1642. }
  1643. }
  1644. Row {
  1645. //安全开关阀
  1646. id: safetyValvesShow
  1647. anchors.top: interLockShow.bottom
  1648. anchors.topMargin: 30
  1649. anchors.left: carDataColumn.left
  1650. anchors.leftMargin: 10
  1651. Image {
  1652. id: safetyValvesImage
  1653. anchors.left: safetyValvesShow.left
  1654. anchors.leftMargin: 30
  1655. width: 24
  1656. height: 24
  1657. fillMode: Image.Stretch
  1658. source: 'qrc:/images/safetyvalves.png'
  1659. anchors.horizontalCenter: statusData.horizontalCenter
  1660. }
  1661. Text {
  1662. id: safetyValvesText
  1663. text: "安全 阀门:"
  1664. color: mainTextColor
  1665. anchors.left: safetyValvesImage.right
  1666. anchors.leftMargin: 30
  1667. font.family: alibaba.name
  1668. font.pointSize: 14
  1669. anchors.horizontalCenter: statusData.horizontalCenter
  1670. }
  1671. spacing: 50
  1672. Text {
  1673. id: safetyValvesTextValue
  1674. anchors.left: safetyValvesText.right
  1675. anchors.leftMargin: 30
  1676. text: "已开启"
  1677. visible: appModel.safetyValves === 1
  1678. color: mainTextColor
  1679. Component.onCompleted: {
  1680. console.log("appModel.backToggle",
  1681. appModel.backToggle)
  1682. //sss
  1683. //console.log(appModel.boomAngleSensor_F)
  1684. //console.log(appModel.grabClosurePilotPressureSensor_F)
  1685. }
  1686. font.family: alibaba.name
  1687. font.pointSize: 14
  1688. }
  1689. Text {
  1690. id: safetyValvesText1
  1691. text: "未开启"
  1692. visible: appModel.safetyValves === 0
  1693. color: "red"
  1694. anchors.left: safetyValvesText.right
  1695. anchors.leftMargin: 30
  1696. font.family: alibaba.name
  1697. font.pointSize: 14
  1698. anchors.horizontalCenter: statusData.horizontalCenter
  1699. }
  1700. }
  1701. Row {
  1702. //下位机故障警告
  1703. id: faulty
  1704. anchors.top: safetyValvesShow.bottom
  1705. anchors.topMargin: 30
  1706. anchors.left: carDataColumn.left
  1707. anchors.leftMargin: 10
  1708. Image {
  1709. id: faultyImage
  1710. anchors.left: faulty.left
  1711. anchors.leftMargin: 30
  1712. width: 24
  1713. height: 24
  1714. fillMode: Image.Stretch
  1715. source: 'qrc:/images/faulty.png'
  1716. anchors.horizontalCenter: statusData.horizontalCenter
  1717. }
  1718. Text {
  1719. id: faultyText
  1720. text: "故障:"
  1721. color: mainTextColor
  1722. anchors.left: faultyImage.right
  1723. anchors.leftMargin: 30
  1724. font.family: alibaba.name
  1725. font.pointSize: 14
  1726. anchors.horizontalCenter: statusData.horizontalCenter
  1727. }
  1728. spacing: 20
  1729. Timer {
  1730. id: timer
  1731. interval: textList[currentIndex].visible ? 3000 : 0
  1732. running: true
  1733. repeat: true
  1734. onTriggered: {
  1735. //console.log("动臂倾角故障",appModel.boomAngleSensor_F)
  1736. do {
  1737. currentIndex = (currentIndex + 1) % textList.length
  1738. } while (!textList[currentIndex].visible)
  1739. }
  1740. }
  1741. Text {
  1742. id: faultyTextValue
  1743. anchors.left: faultyText.right
  1744. anchors.leftMargin: 30
  1745. text: textList[currentIndex].text
  1746. color: 'red'
  1747. font.family: alibaba.name
  1748. font.pointSize: 14
  1749. visible: textList[currentIndex].visible
  1750. anchors.horizontalCenter: statusData.horizontalCenter
  1751. }
  1752. }
  1753. Row {
  1754. //仪表盘1
  1755. id: dashboard1
  1756. anchors.top: faulty.bottom
  1757. anchors.topMargin: 100
  1758. anchors.left: carDataColumn.left
  1759. anchors.leftMargin: 10
  1760. Image {
  1761. id: dashboardImage1
  1762. z: 99
  1763. height: 200
  1764. width: 200
  1765. fillMode: Image.Stretch
  1766. visible: true
  1767. source: 'qrc:/images/engineSpeed.png'
  1768. }
  1769. Image {
  1770. id: pointer1
  1771. x: dashboardImage1.width / 2 - pointer1.width / 2 - 20
  1772. y: dashboardImage1.height / 2 - pointer1.height / 2 + 10
  1773. z: 99
  1774. height: 94 / 2
  1775. width: 140 / 2
  1776. fillMode: Image.Stretch
  1777. visible: true
  1778. source: 'qrc:/images/pointer.png'
  1779. Component.onCompleted: {
  1780. posPointer1Timer.start()
  1781. }
  1782. transform: Rotation {
  1783. id: rotation
  1784. origin.x: pointer1.width / 2 + 20
  1785. origin.y: pointer1.height / 2 - 10
  1786. angle: 0
  1787. }
  1788. }
  1789. RotationAnimation {
  1790. id: posPointer1
  1791. target: rotation
  1792. from: 0
  1793. to: 0
  1794. duration: 100
  1795. }
  1796. Timer {
  1797. id: posPointer1Timer
  1798. interval: 500
  1799. repeat: true
  1800. onTriggered: {
  1801. //posPointer1.from = 0
  1802. //posPointer1.to = (appModel.engineSpeed/5000)*240
  1803. posPointer1.to = appModel.engineSpeed / 5000 * 240
  1804. posPointer1.from = posPointer1.to
  1805. posPointer1.start()
  1806. }
  1807. }
  1808. Text {
  1809. id: dashboard1Text
  1810. anchors.bottom: dashboardImage1.bottom
  1811. anchors.bottomMargin: -40
  1812. anchors.left: dashboard1.left
  1813. anchors.leftMargin: 55
  1814. text: "发动机转速"
  1815. color: mainTextColor
  1816. font.family: alibaba.name
  1817. font.pointSize: 14
  1818. anchors.horizontalCenter: statusData.horizontalCenter
  1819. }
  1820. Text {
  1821. id: dashboard1Text1
  1822. anchors.bottom: dashboard1Text.bottom
  1823. anchors.bottomMargin: -20
  1824. anchors.left: dashboard1Text.left
  1825. anchors.leftMargin: 25
  1826. text: "rpm"
  1827. color: mainTextColor
  1828. font.family: alibaba.name
  1829. font.pointSize: 14
  1830. anchors.horizontalCenter: statusData.horizontalCenter
  1831. }
  1832. spacing: 50
  1833. Text {
  1834. id: dashboardImage1TextValue
  1835. anchors.bottom: dashboard1Text1.bottom
  1836. anchors.bottomMargin: -35
  1837. anchors.left: dashboard1Text1.left
  1838. anchors.leftMargin: 0
  1839. text: appModel.engineSpeed
  1840. //color: appModel.engineSpeed >= 4000 ? 'red' : '#FFFFFF'
  1841. color:'#FFFFFF'
  1842. Component.onCompleted: {
  1843. console.log("appModel.engineSpeed",
  1844. appModel.engineSpeed)
  1845. }
  1846. font.family: digtalFont.name
  1847. font.pointSize: 18
  1848. }
  1849. Image {
  1850. id: circle_green1
  1851. anchors.bottom: dashboard1Text1.bottom
  1852. anchors.bottomMargin: -45
  1853. anchors.left: dashboard1Text.left
  1854. anchors.leftMargin: -10
  1855. z: 99
  1856. height: 40
  1857. width: 110
  1858. fillMode: Image.Stretch
  1859. visible: true
  1860. source: 'qrc:/images/circle_green1.png'
  1861. }
  1862. }
  1863. Row {
  1864. //仪表盘2
  1865. id: dashboard2
  1866. anchors.top: faulty.bottom
  1867. anchors.topMargin: 100
  1868. anchors.left: dashboard1.right
  1869. anchors.leftMargin: 230
  1870. Image {
  1871. id: dashboardImage2
  1872. z: 99
  1873. height: 200
  1874. width: 200
  1875. fillMode: Image.Stretch
  1876. visible: true
  1877. source: 'qrc:/images/carSpeed.png'
  1878. }
  1879. Image {
  1880. id: pointer2
  1881. x: dashboardImage2.width / 2 - pointer2.width / 2 - 20
  1882. y: dashboardImage2.height / 2 - pointer2.height / 2 + 10
  1883. z: 99
  1884. height: 94 / 2
  1885. width: 140 / 2
  1886. fillMode: Image.Stretch
  1887. visible: true
  1888. source: 'qrc:/images/pointer.png'
  1889. Component.onCompleted: {
  1890. posPointer2Timer.start()
  1891. }
  1892. transform: Rotation {
  1893. id: rotation2
  1894. origin.x: pointer2.width / 2 + 20
  1895. origin.y: pointer2.height / 2 - 10
  1896. angle: 0
  1897. }
  1898. }
  1899. RotationAnimation {
  1900. id: posPointer2
  1901. target: rotation2
  1902. from: 0
  1903. to: 0
  1904. duration: 100
  1905. }
  1906. Timer {
  1907. id: posPointer2Timer
  1908. interval: 500
  1909. repeat: true
  1910. onTriggered: {
  1911. posPointer2.to = appModel.travelSpeed / 100 / 30 * 240
  1912. posPointer2.from = posPointer2.to
  1913. //posPointer2.to = 240
  1914. posPointer2.start()
  1915. }
  1916. }
  1917. Text {
  1918. id: dashboard2Text
  1919. anchors.bottom: dashboardImage2.bottom
  1920. anchors.bottomMargin: -40
  1921. anchors.left: dashboard2.left
  1922. anchors.leftMargin: 60
  1923. text: "行驶速度"
  1924. color: mainTextColor
  1925. font.family: alibaba.name
  1926. font.pointSize: 14
  1927. anchors.horizontalCenter: statusData.horizontalCenter
  1928. }
  1929. Text {
  1930. id: dashboard2Text1
  1931. anchors.bottom: dashboard2Text.bottom
  1932. anchors.bottomMargin: -20
  1933. anchors.left: dashboard2Text.left
  1934. anchors.leftMargin: 15
  1935. text: "km/h"
  1936. color: mainTextColor
  1937. font.family: alibaba.name
  1938. font.pointSize: 14
  1939. anchors.horizontalCenter: statusData.horizontalCenter
  1940. }
  1941. spacing: 50
  1942. Text {
  1943. id: dashboardImage2TextValue
  1944. anchors.bottom: dashboard2Text1.bottom
  1945. anchors.bottomMargin: -35
  1946. anchors.left: dashboard2Text1.left
  1947. anchors.leftMargin: 10
  1948. text: appModel.travelSpeed / 100
  1949. color: appModel.travelSpeed / 100 >= 30 ? 'red' : '#FFFFFF'
  1950. Component.onCompleted: {
  1951. console.log("appModel.travelSpeed",
  1952. appModel.travelSpeed)
  1953. }
  1954. font.family: digtalFont.name
  1955. font.pointSize: 18
  1956. }
  1957. Image {
  1958. id: circle_green2
  1959. anchors.bottom: dashboard2Text1.bottom
  1960. anchors.bottomMargin: -45
  1961. anchors.left: dashboard2Text.left
  1962. anchors.leftMargin: -20
  1963. z: 99
  1964. height: 40
  1965. width: 110
  1966. fillMode: Image.Stretch
  1967. visible: true
  1968. source: 'qrc:/images/circle_green1.png'
  1969. }
  1970. }
  1971. }
  1972. //登录界面最左侧上边框
  1973. Image {
  1974. id: sideUp_right1
  1975. z: 99
  1976. anchors.left: statusLeftLogin.left
  1977. anchors.leftMargin: 1475
  1978. anchors.top: statusLeftLogin.top
  1979. anchors.topMargin: 0
  1980. fillMode: Image.Stretch
  1981. visible: true
  1982. source: 'qrc:/images/sideUp_right2.png'
  1983. }
  1984. //登录界面最左侧上边框
  1985. Image {
  1986. id: sideUp_left1
  1987. z: 99
  1988. anchors.left: statusLeftLogin.left
  1989. anchors.leftMargin: 1475 + 345
  1990. anchors.top: statusLeftLogin.top
  1991. anchors.topMargin: 0
  1992. fillMode: Image.Stretch
  1993. visible: true
  1994. source: 'qrc:/images/sideUp_left1.png'
  1995. }
  1996. //登录界面最左侧下边框
  1997. Image {
  1998. id: sideDown_left1
  1999. z: 99
  2000. height: 400
  2001. anchors.left: statusLeftLogin.left
  2002. anchors.leftMargin: 1475
  2003. anchors.top: sideUp_left.bottom
  2004. anchors.topMargin: 0
  2005. fillMode: Image.Stretch
  2006. source: 'qrc:/images/sideDown_left.png'
  2007. }
  2008. //登录界面最右侧下边框
  2009. Image {
  2010. id: sideDown_right1
  2011. z: 99
  2012. height: 400
  2013. anchors.left: statusLeftLogin.right
  2014. anchors.leftMargin: 1475 + 295
  2015. anchors.top: sideUp_right.bottom
  2016. anchors.topMargin: 0 - 3
  2017. fillMode: Image.Stretch
  2018. visible: true
  2019. source: 'qrc:/images/sideDown_right.png'
  2020. }
  2021. Rectangle {
  2022. id: statusRightLogin
  2023. anchors.top: statusLeftLogin.top
  2024. anchors.topMargin: 70
  2025. anchors.left: statusLeftLogin.left
  2026. anchors.leftMargin: 1400
  2027. color: 'transparent'
  2028. Image {
  2029. id: iRadar_car_G
  2030. width: 350
  2031. height: 550
  2032. anchors.top: statusRightLogin.top
  2033. anchors.topMargin: 0
  2034. anchors.left: statusRightLogin.left
  2035. anchors.leftMargin: 120
  2036. anchors.horizontalCenter: radarData.horizontalCenter
  2037. fillMode: Image.Stretch
  2038. source: 'qrc:/images/radar_car.png'
  2039. visible: (appModel.radar1 >= radarGreenRange) && (appModel.radar2 >= radarGreenRange) && (appModel.radar3 >= radarGreenRange) && (appModel.radar4 >= radarGreenRange) && (appModel.radar5 >= radarGreenRange) && (appModel.radar6 >= radarGreenRange) && (appModel.radar7 >= radarGreenRange) && (appModel.radar8 >= radarGreenRange)
  2040. }
  2041. Image {
  2042. id: iRadar_car_G1
  2043. z: 99
  2044. width: 350
  2045. height: 550
  2046. anchors.top: statusRightLogin.top
  2047. anchors.topMargin: 0
  2048. anchors.left: statusRightLogin.left
  2049. anchors.leftMargin: 120
  2050. anchors.horizontalCenter: radarData.horizontalCenter
  2051. fillMode: Image.Stretch
  2052. source: 'qrc:/images/radar_car_G1.png'
  2053. visible: (radarGreenOutRange >= appModel.radar1)
  2054. && (appModel.radar1 >= radarGreenRange)
  2055. }
  2056. Image {
  2057. id: iRadar_car_G2
  2058. z: 99
  2059. width: 350
  2060. height: 550
  2061. anchors.top: statusRightLogin.top
  2062. anchors.topMargin: 0
  2063. anchors.left: statusRightLogin.left
  2064. anchors.leftMargin: 120
  2065. anchors.horizontalCenter: radarData.horizontalCenter
  2066. fillMode: Image.Stretch
  2067. source: 'qrc:/images/radar_car_G2.png'
  2068. visible: (radarGreenOutRange >= appModel.radar2)
  2069. && (appModel.radar2 >= radarGreenRange)
  2070. }
  2071. Image {
  2072. id: iRadar_car_G3
  2073. z: 99
  2074. width: 350
  2075. height: 550
  2076. anchors.top: statusRightLogin.top
  2077. anchors.topMargin: 0
  2078. anchors.left: statusRightLogin.left
  2079. anchors.leftMargin: 120
  2080. anchors.horizontalCenter: radarData.horizontalCenter
  2081. fillMode: Image.Stretch
  2082. source: 'qrc:/images/radar_car_G3.png'
  2083. visible: (radarGreenOutRange >= appModel.radar3)
  2084. && (appModel.radar3 >= radarGreenRange)
  2085. }
  2086. Image {
  2087. id: iRadar_car_G4
  2088. z: 99
  2089. width: 350
  2090. height: 550
  2091. anchors.top: statusRightLogin.top
  2092. anchors.topMargin: 0
  2093. anchors.left: statusRightLogin.left
  2094. anchors.leftMargin: 120
  2095. anchors.horizontalCenter: radarData.horizontalCenter
  2096. fillMode: Image.Stretch
  2097. source: 'qrc:/images/radar_car_G4.png'
  2098. visible: (radarGreenOutRange >= appModel.radar4)
  2099. && (appModel.radar4 >= radarGreenRange)
  2100. }
  2101. Image {
  2102. id: iRadar_car_G5
  2103. z: 99
  2104. width: 350
  2105. height: 550
  2106. anchors.top: statusRightLogin.top
  2107. anchors.topMargin: 0
  2108. anchors.left: statusRightLogin.left
  2109. anchors.leftMargin: 120
  2110. anchors.horizontalCenter: radarData.horizontalCenter
  2111. fillMode: Image.Stretch
  2112. source: 'qrc:/images/radar_car_G5.png'
  2113. visible: (radarGreenOutRange >= appModel.radar5)
  2114. && (appModel.radar5 >= radarGreenRange)
  2115. }
  2116. Image {
  2117. id: iRadar_car_G6
  2118. z: 99
  2119. width: 350
  2120. height: 550
  2121. anchors.top: statusRightLogin.top
  2122. anchors.topMargin: 0
  2123. anchors.left: statusRightLogin.left
  2124. anchors.leftMargin: 120
  2125. anchors.horizontalCenter: radarData.horizontalCenter
  2126. fillMode: Image.Stretch
  2127. source: 'qrc:/images/radar_car_G6.png'
  2128. visible: (radarGreenOutRange >= appModel.radar6)
  2129. && (appModel.radar6 >= radarGreenRange)
  2130. }
  2131. Image {
  2132. id: iRadar_car_G7
  2133. z: 99
  2134. width: 350
  2135. height: 550
  2136. anchors.top: statusRightLogin.top
  2137. anchors.topMargin: 0
  2138. anchors.left: statusRightLogin.left
  2139. anchors.leftMargin: 120
  2140. anchors.horizontalCenter: radarData.horizontalCenter
  2141. fillMode: Image.Stretch
  2142. source: 'qrc:/images/radar_car_G7.png'
  2143. visible: (radarGreenOutRange >= appModel.radar7)
  2144. && (appModel.radar7 >= radarGreenRange)
  2145. }
  2146. Image {
  2147. id: iRadar_car_G8
  2148. z: 99
  2149. width: 350
  2150. height: 550
  2151. anchors.top: statusRightLogin.top
  2152. anchors.topMargin: 0
  2153. anchors.left: statusRightLogin.left
  2154. anchors.leftMargin: 120
  2155. anchors.horizontalCenter: radarData.horizontalCenter
  2156. fillMode: Image.Stretch
  2157. source: 'qrc:/images/radar_car_G8.png'
  2158. visible: (radarGreenOutRange >= appModel.radar8)
  2159. && (appModel.radar8 >= radarGreenRange)
  2160. }
  2161. Image {
  2162. id: iRadar_car_R
  2163. width: 350
  2164. height: 550
  2165. anchors.top: statusRightLogin.top
  2166. anchors.topMargin: 0
  2167. anchors.left: statusRightLogin.left
  2168. anchors.leftMargin: 120
  2169. anchors.horizontalCenter: radarData.horizontalCenter
  2170. fillMode: Image.Stretch
  2171. source: 'qrc:/images/radar_car_R0.png'
  2172. visible: appModel.radar1 <= radarRedRange || appModel.radar2
  2173. <= radarRedRange || appModel.radar3
  2174. <= radarRedRange || appModel.radar4
  2175. <= radarRedRange || appModel.radar5
  2176. <= radarRedRange || appModel.radar6
  2177. <= radarRedRange || appModel.radar7
  2178. <= radarRedRange || appModel.radar8 <= radarRedRange
  2179. }
  2180. Image {
  2181. id: iRadar_car_R1
  2182. z: 99
  2183. width: 350
  2184. height: 550
  2185. anchors.top: statusRightLogin.top
  2186. anchors.topMargin: 0
  2187. anchors.left: statusRightLogin.left
  2188. anchors.leftMargin: 120
  2189. anchors.horizontalCenter: radarData.horizontalCenter
  2190. fillMode: Image.Stretch
  2191. source: 'qrc:/images/radar_car_R1.png'
  2192. visible: appModel.radar1 <= radarRedRange
  2193. }
  2194. Image {
  2195. id: iRadar_car_R2
  2196. z: 99
  2197. width: 350
  2198. height: 550
  2199. anchors.top: statusRightLogin.top
  2200. anchors.topMargin: 0
  2201. anchors.left: statusRightLogin.left
  2202. anchors.leftMargin: 120
  2203. anchors.horizontalCenter: radarData.horizontalCenter
  2204. fillMode: Image.Stretch
  2205. source: 'qrc:/images/radar_car_R2.png'
  2206. visible: appModel.radar2 <= radarRedRange
  2207. }
  2208. Image {
  2209. id: iRadar_car_R3
  2210. z: 99
  2211. width: 350
  2212. height: 550
  2213. anchors.top: statusRightLogin.top
  2214. anchors.topMargin: 0
  2215. anchors.left: statusRightLogin.left
  2216. anchors.leftMargin: 120
  2217. anchors.horizontalCenter: radarData.horizontalCenter
  2218. fillMode: Image.Stretch
  2219. source: 'qrc:/images/radar_car_R3.png'
  2220. visible: appModel.radar3 <= radarRedRange
  2221. }
  2222. Image {
  2223. id: iRadar_car_R4
  2224. z: 99
  2225. width: 350
  2226. height: 550
  2227. anchors.top: statusRightLogin.top
  2228. anchors.topMargin: 0
  2229. anchors.left: statusRightLogin.left
  2230. anchors.leftMargin: 120
  2231. anchors.horizontalCenter: radarData.horizontalCenter
  2232. fillMode: Image.Stretch
  2233. source: 'qrc:/images/radar_car_R4.png'
  2234. visible: appModel.radar4 <= radarRedRange
  2235. }
  2236. Image {
  2237. id: iRadar_car_R5
  2238. z: 99
  2239. width: 350
  2240. height: 550
  2241. anchors.top: statusRightLogin.top
  2242. anchors.topMargin: 0
  2243. anchors.left: statusRightLogin.left
  2244. anchors.leftMargin: 120
  2245. anchors.horizontalCenter: radarData.horizontalCenter
  2246. fillMode: Image.Stretch
  2247. source: 'qrc:/images/radar_car_R5.png'
  2248. visible: appModel.radar5 <= radarRedRange
  2249. }
  2250. Image {
  2251. id: iRadar_car_R6
  2252. z: 99
  2253. width: 350
  2254. height: 550
  2255. anchors.top: statusRightLogin.top
  2256. anchors.topMargin: 0
  2257. anchors.left: statusRightLogin.left
  2258. anchors.leftMargin: 120
  2259. anchors.horizontalCenter: radarData.horizontalCenter
  2260. fillMode: Image.Stretch
  2261. source: 'qrc:/images/radar_car_R6.png'
  2262. visible: appModel.radar6 <= radarRedRange
  2263. }
  2264. Image {
  2265. id: iRadar_car_R7
  2266. z: 99
  2267. width: 350
  2268. height: 550
  2269. anchors.top: statusRightLogin.top
  2270. anchors.topMargin: 0
  2271. anchors.left: statusRightLogin.left
  2272. anchors.leftMargin: 120
  2273. anchors.horizontalCenter: radarData.horizontalCenter
  2274. fillMode: Image.Stretch
  2275. source: 'qrc:/images/radar_car_R7.png'
  2276. visible: appModel.radar7 <= radarRedRange
  2277. }
  2278. Image {
  2279. id: iRadar_car_R8
  2280. z: 99
  2281. width: 350
  2282. height: 550
  2283. anchors.top: statusRightLogin.top
  2284. anchors.topMargin: 0
  2285. anchors.left: statusRightLogin.left
  2286. anchors.leftMargin: 120
  2287. anchors.horizontalCenter: radarData.horizontalCenter
  2288. fillMode: Image.Stretch
  2289. source: 'qrc:/images/radar_car_R8.png'
  2290. visible: appModel.radar8 <= radarRedRange
  2291. }
  2292. Image {
  2293. id: iRadar_car_Y
  2294. width: 350
  2295. height: 550
  2296. anchors.top: statusRightLogin.top
  2297. anchors.topMargin: 0
  2298. anchors.left: statusRightLogin.left
  2299. anchors.leftMargin: 120
  2300. anchors.horizontalCenter: radarData.horizontalCenter
  2301. fillMode: Image.Stretch
  2302. source: 'qrc:/images/radar_car_Y0.png'
  2303. 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.radar1 >= radarGreenRange) && (appModel.radar2 >= radarGreenRange) && (appModel.radar3 >= radarGreenRange) && (appModel.radar4 >= radarGreenRange) && (appModel.radar5 >= radarGreenRange) && (appModel.radar6 >= radarGreenRange) && (appModel.radar7 >= radarGreenRange) && (appModel.radar8 >= radarGreenRange))) && (!(appModel.radar1 <= radarRedRange || appModel.radar2 <= radarRedRange || appModel.radar3 <= radarRedRange || appModel.radar4 <= radarRedRange || appModel.radar5 <= radarRedRange || appModel.radar6 <= radarRedRange || appModel.radar7 <= radarRedRange || appModel.radar8 <= radarRedRange))
  2304. }
  2305. Image {
  2306. id: iRadar_car_Y1
  2307. z: 99
  2308. width: 350
  2309. height: 550
  2310. anchors.top: statusRightLogin.top
  2311. anchors.topMargin: 0
  2312. anchors.left: statusRightLogin.left
  2313. anchors.leftMargin: 120
  2314. anchors.horizontalCenter: radarData.horizontalCenter
  2315. fillMode: Image.Stretch
  2316. source: 'qrc:/images/radar_car_Y1.png'
  2317. visible: appModel.radar1 < radarGreenRange
  2318. && appModel.radar1 > radarRedRange
  2319. }
  2320. Image {
  2321. id: iRadar_car_Y2
  2322. z: 99
  2323. width: 350
  2324. height: 550
  2325. anchors.top: statusRightLogin.top
  2326. anchors.topMargin: 0
  2327. anchors.left: statusRightLogin.left
  2328. anchors.leftMargin: 120
  2329. anchors.horizontalCenter: radarData.horizontalCenter
  2330. fillMode: Image.Stretch
  2331. source: 'qrc:/images/radar_car_Y2.png'
  2332. visible: appModel.radar2 < radarGreenRange
  2333. && appModel.radar2 > radarRedRange
  2334. }
  2335. Image {
  2336. id: iRadar_car_Y3
  2337. z: 99
  2338. width: 350
  2339. height: 550
  2340. anchors.top: statusRightLogin.top
  2341. anchors.topMargin: 0
  2342. anchors.left: statusRightLogin.left
  2343. anchors.leftMargin: 120
  2344. anchors.horizontalCenter: radarData.horizontalCenter
  2345. fillMode: Image.Stretch
  2346. source: 'qrc:/images/radar_car_Y3.png'
  2347. visible: appModel.radar3 < radarGreenRange
  2348. && appModel.radar3 > radarRedRange
  2349. }
  2350. Image {
  2351. id: iRadar_car_Y4
  2352. z: 99
  2353. width: 350
  2354. height: 550
  2355. anchors.top: statusRightLogin.top
  2356. anchors.topMargin: 0
  2357. anchors.left: statusRightLogin.left
  2358. anchors.leftMargin: 120
  2359. anchors.horizontalCenter: radarData.horizontalCenter
  2360. fillMode: Image.Stretch
  2361. source: 'qrc:/images/radar_car_Y4.png'
  2362. visible: appModel.radar4 < radarGreenRange
  2363. && appModel.radar4 > radarRedRange
  2364. }
  2365. Image {
  2366. id: iRadar_car_Y5
  2367. z: 99
  2368. width: 350
  2369. height: 550
  2370. anchors.top: statusRightLogin.top
  2371. anchors.topMargin: 0
  2372. anchors.left: statusRightLogin.left
  2373. anchors.leftMargin: 120
  2374. anchors.horizontalCenter: radarData.horizontalCenter
  2375. fillMode: Image.Stretch
  2376. source: 'qrc:/images/radar_car_Y5.png'
  2377. visible: appModel.radar5 < radarGreenRange
  2378. && appModel.radar5 > radarRedRange
  2379. }
  2380. Image {
  2381. id: iRadar_car_Y6
  2382. z: 99
  2383. width: 350
  2384. height: 550
  2385. anchors.top: statusRightLogin.top
  2386. anchors.topMargin: 0
  2387. anchors.left: statusRightLogin.left
  2388. anchors.leftMargin: 120
  2389. anchors.horizontalCenter: radarData.horizontalCenter
  2390. fillMode: Image.Stretch
  2391. source: 'qrc:/images/radar_car_Y6.png'
  2392. visible: appModel.radar6 < radarGreenRange
  2393. && appModel.radar6 > radarRedRange
  2394. }
  2395. Image {
  2396. id: iRadar_car_Y7
  2397. z: 99
  2398. width: 350
  2399. height: 550
  2400. anchors.top: statusRightLogin.top
  2401. anchors.topMargin: 0
  2402. anchors.left: statusRightLogin.left
  2403. anchors.leftMargin: 120
  2404. anchors.horizontalCenter: radarData.horizontalCenter
  2405. fillMode: Image.Stretch
  2406. source: 'qrc:/images/radar_car_Y7.png'
  2407. visible: appModel.radar7 < radarGreenRange
  2408. && appModel.radar7 > radarRedRange
  2409. }
  2410. Image {
  2411. id: iRadar_car_Y8
  2412. z: 99
  2413. width: 350
  2414. height: 550
  2415. anchors.top: statusRightLogin.top
  2416. anchors.topMargin: 0
  2417. anchors.left: statusRightLogin.left
  2418. anchors.leftMargin: 120
  2419. anchors.horizontalCenter: radarData.horizontalCenter
  2420. fillMode: Image.Stretch
  2421. source: 'qrc:/images/radar_car_Y8.png'
  2422. visible: appModel.radar8 < radarGreenRange
  2423. && appModel.radar8 > radarRedRange
  2424. }
  2425. Row {
  2426. id: iText1
  2427. height: parent.height
  2428. anchors.top: statusRightLogin.top
  2429. anchors.topMargin: 50
  2430. anchors.left: statusRightLogin.left
  2431. anchors.leftMargin: 90
  2432. Text {
  2433. text: "雷达前左:"
  2434. color: mainTextColor
  2435. anchors.left: iText1.left
  2436. anchors.leftMargin: 20
  2437. font.family: alibaba.name
  2438. font.pointSize: radarTxtSize
  2439. }
  2440. Text {
  2441. id: radar1
  2442. text: (appModel.radar1 / 1000).toFixed(2)
  2443. color: mainTextColor
  2444. anchors.left: iText1.left
  2445. anchors.leftMargin: 110
  2446. font.family: alibaba.name
  2447. font.pointSize: radarTxtSize
  2448. }
  2449. Text {
  2450. text: "雷达前右:"
  2451. color: mainTextColor
  2452. anchors.left: iText1.left
  2453. anchors.leftMargin: 270
  2454. font.family: alibaba.name
  2455. font.pointSize: radarTxtSize
  2456. }
  2457. Text {
  2458. id: radar2
  2459. text: (appModel.radar2 / 1000).toFixed(2)
  2460. color: mainTextColor
  2461. anchors.left: iText1.left
  2462. anchors.leftMargin: 360
  2463. font.family: alibaba.name
  2464. font.pointSize: radarTxtSize
  2465. }
  2466. }
  2467. Row {
  2468. id: iText2
  2469. height: parent.height
  2470. anchors.top: iText1.bottom
  2471. anchors.topMargin: 35
  2472. anchors.left: statusRightLogin.left
  2473. anchors.leftMargin: 90
  2474. visible: true
  2475. Text {
  2476. text: "雷达左前:"
  2477. color: mainTextColor
  2478. anchors.left: iText2.left
  2479. anchors.leftMargin: 20
  2480. font.family: alibaba.name
  2481. font.pointSize: radarTxtSize
  2482. }
  2483. Text {
  2484. id: radar3
  2485. text: (appModel.radar8 / 1000).toFixed(2)
  2486. color: mainTextColor
  2487. anchors.left: iText2.left
  2488. anchors.leftMargin: 110
  2489. font.family: alibaba.name
  2490. font.pointSize: radarTxtSize
  2491. }
  2492. Text {
  2493. text: "雷达右前:"
  2494. color: mainTextColor
  2495. anchors.left: iText2.left
  2496. anchors.leftMargin: 270
  2497. font.family: alibaba.name
  2498. font.pointSize: radarTxtSize
  2499. }
  2500. Text {
  2501. id: radar4
  2502. text: (appModel.radar3 / 1000).toFixed(2)
  2503. color: mainTextColor
  2504. anchors.left: iText2.left
  2505. anchors.leftMargin: 360
  2506. font.family: alibaba.name
  2507. font.pointSize: radarTxtSize
  2508. }
  2509. }
  2510. Row {
  2511. id: iText3
  2512. height: parent.height
  2513. anchors.top: iText2.bottom
  2514. anchors.topMargin: 35
  2515. anchors.left: statusRightLogin.left
  2516. anchors.leftMargin: 90
  2517. Text {
  2518. text: "雷达左后:"
  2519. color: mainTextColor
  2520. anchors.left: iText3.left
  2521. anchors.leftMargin: 20
  2522. font.family: alibaba.name
  2523. font.pointSize: radarTxtSize
  2524. }
  2525. Text {
  2526. id: radar5
  2527. text: (appModel.radar7 / 1000).toFixed(2)
  2528. color: mainTextColor
  2529. anchors.left: iText3.left
  2530. anchors.leftMargin: 110
  2531. font.family: alibaba.name
  2532. font.pointSize: radarTxtSize
  2533. }
  2534. Text {
  2535. text: "雷达右后:"
  2536. color: mainTextColor
  2537. anchors.left: iText3.left
  2538. anchors.leftMargin: 270
  2539. font.family: alibaba.name
  2540. font.pointSize: radarTxtSize
  2541. }
  2542. Text {
  2543. id: radar6
  2544. text: (appModel.radar4 / 1000).toFixed(2)
  2545. color: mainTextColor
  2546. anchors.left: iText3.left
  2547. anchors.leftMargin: 360
  2548. font.family: alibaba.name
  2549. font.pointSize: radarTxtSize
  2550. }
  2551. }
  2552. Row {
  2553. id: iText4
  2554. height: parent.height
  2555. anchors.top: iText3.bottom
  2556. anchors.topMargin: 35
  2557. anchors.left: statusRightLogin.left
  2558. anchors.leftMargin: 90
  2559. Text {
  2560. text: "雷达后左:"
  2561. color: mainTextColor
  2562. anchors.left: iText4.left
  2563. anchors.leftMargin: 20
  2564. font.family: alibaba.name
  2565. font.pointSize: radarTxtSize
  2566. }
  2567. Text {
  2568. id: radar7
  2569. text: (appModel.radar6 / 1000).toFixed(2)
  2570. color: mainTextColor
  2571. anchors.left: iText4.left
  2572. anchors.leftMargin: 110
  2573. font.family: alibaba.name
  2574. font.pointSize: radarTxtSize
  2575. }
  2576. Text {
  2577. text: "雷达后右:"
  2578. color: mainTextColor
  2579. anchors.left: iText4.left
  2580. anchors.leftMargin: 270
  2581. font.family: alibaba.name
  2582. font.pointSize: radarTxtSize
  2583. }
  2584. Text {
  2585. id: radar8
  2586. text: (appModel.radar5 / 1000).toFixed(2)
  2587. color: mainTextColor
  2588. anchors.left: iText4.left
  2589. anchors.leftMargin: 360
  2590. font.family: alibaba.name
  2591. font.pointSize: radarTxtSize
  2592. }
  2593. }
  2594. /*Rectangle {
  2595. id: rtkState
  2596. width: 357
  2597. height: 35
  2598. color: 'yellow'
  2599. anchors.top: iText4.bottom
  2600. anchors.topMargin: 400
  2601. anchors.left: statusRightLogin.left
  2602. anchors.leftMargin: 120
  2603. radius: 5
  2604. Text {
  2605. id: rtkStatetxt
  2606. text: appModel.imux==1 ? "RTK定位正常":"RTK定位错误"
  2607. color: appModel.imux==1 ? 'green':'red'
  2608. font.family: alibaba.name
  2609. font.pointSize: 18
  2610. anchors.horizontalCenter: rtkState.horizontalCenter
  2611. }
  2612. visible: true
  2613. }*/
  2614. Rectangle {
  2615. id: warning
  2616. width: 357
  2617. height: 35
  2618. color: popupBgColorErr
  2619. anchors.top: iText4.bottom
  2620. anchors.topMargin: 400
  2621. anchors.left: statusRightLogin.left
  2622. anchors.leftMargin: 120
  2623. radius: 5
  2624. Text {
  2625. id: warningtxt
  2626. text: qsTr("注意保持车距")
  2627. color: '#FFFFFF'
  2628. font.family: alibaba.name
  2629. font.pointSize: 18
  2630. anchors.horizontalCenter: warning.horizontalCenter
  2631. }
  2632. visible: (appModel.radar1 <= radarRedRange || appModel.radar2
  2633. <= radarRedRange || appModel.radar3
  2634. <= radarRedRange || appModel.radar4
  2635. <= radarRedRange || appModel.radar5
  2636. <= radarRedRange || appModel.radar6
  2637. <= radarRedRange || appModel.radar7
  2638. <= radarRedRange || appModel.radar8 <= radarRedRange)
  2639. }
  2640. Rectangle {
  2641. id: backImgRect
  2642. width: 400
  2643. height: 320
  2644. color: 'transparent'
  2645. anchors.top: iText4.bottom
  2646. anchors.topMargin: 510
  2647. anchors.left: statusRightLogin.left
  2648. anchors.leftMargin: 100
  2649. border.color: "red"
  2650. border.width: 1
  2651. Image {
  2652. id: backImg
  2653. anchors.topMargin: 140
  2654. width: parent.width
  2655. height: parent.height
  2656. sourceSize: Qt.size(width, height)
  2657. fillMode: Image.Stretch//拉伸模式
  2658. //fillMode: Image.PreserveAspectFit//保持宽高比例适应模式
  2659. //fillMode: Image.PreserveAspectCrop //保持宽高比裁剪模式
  2660. //fillMode: Image.Tile//平铺模式
  2661. z: 98
  2662. }
  2663. //后视摄像头
  2664. Connections {
  2665. target: BackImage
  2666. onCallQmlRefeshBackImg: {
  2667. //aaa
  2668. backImg.source = ""
  2669. backImg.source = "image://BackImage/"+Math.random()
  2670. }
  2671. }
  2672. Image {
  2673. id: backImg_camera1
  2674. anchors.topMargin: 140
  2675. width: parent.width
  2676. height: parent.height
  2677. fillMode: Image.Stretch
  2678. visible: true
  2679. source: 'qrc:/images/panel_camera1.png'
  2680. z: 98
  2681. }
  2682. }
  2683. }
  2684. }
  2685. }
  2686. color: 'transparent'
  2687. }
  2688. Rectangle {
  2689. width: parent.width
  2690. height: 80
  2691. color: 'transparent'
  2692. z: 99
  2693. Image {
  2694. anchors.horizontalCenter: parent.horizontalCenter
  2695. fillMode: Image.PreserveAspectFit
  2696. source: 'qrc:/images/banner.png'
  2697. }
  2698. Text {
  2699. anchors.horizontalCenter: parent.horizontalCenter
  2700. anchors.verticalCenter: parent.verticalCenter
  2701. text: textTitle
  2702. font.family: alibaba.name
  2703. font.pointSize: 24
  2704. color: mainTextColor
  2705. }
  2706. }
  2707. StackView {
  2708. id: stack
  2709. initialItem: page_login
  2710. anchors.fill: parent
  2711. }
  2712. LoginPage {
  2713. id: page_login
  2714. visible: false
  2715. }
  2716. CarPage {
  2717. id: page_car
  2718. visible: false
  2719. }
  2720. WorkPage
  2721. {
  2722. id: page_work
  2723. visible:false
  2724. }
  2725. DetailPage {
  2726. id: page_detail
  2727. visible: false
  2728. }
  2729. Dialog {
  2730. id: backDialog
  2731. visible: false
  2732. modal: true
  2733. x: (parent.width - width) / 2
  2734. y: (parent.height - height) / 2
  2735. closePolicy: Popup.NoAutoClose
  2736. implicitWidth: 600
  2737. implicitHeight: 300
  2738. Text {
  2739. text: back_content
  2740. font.pointSize: 24
  2741. font.family: alibaba.name
  2742. color: '#000000'
  2743. anchors.horizontalCenter: parent.horizontalCenter
  2744. y: 100
  2745. }
  2746. Row {
  2747. height: parent.height
  2748. anchors.horizontalCenter: parent.horizontalCenter
  2749. y: 200
  2750. CButton {
  2751. id: quitButton
  2752. textHeight: 50
  2753. fontHeight: 0.4
  2754. width: 150
  2755. height: 50
  2756. color: pressed ? textClickedColor : mainAppColor
  2757. text: "确定"
  2758. onClicked: {
  2759. appModel.controlCar(uid);
  2760. backDialog.visible = false;
  2761. // videoWindow.close()
  2762. // rootItem.qmlSignalQuit()
  2763. }
  2764. }
  2765. spacing: 50
  2766. CButton {
  2767. id: cancelBtn
  2768. textHeight: 50
  2769. fontHeight: 0.4
  2770. width: 150
  2771. height: 50
  2772. color: pressed ? textClickedColor : mainAppColor
  2773. text: "取消"
  2774. onClicked: {
  2775. appModel.cancelControl()
  2776. backDialog.visible = false
  2777. }
  2778. }
  2779. }
  2780. }
  2781. Dialog {
  2782. id: trackDialog
  2783. visible: false
  2784. modal: true
  2785. x: (parent.width - width) / 2
  2786. y: (parent.height - height) / 2
  2787. closePolicy: Popup.NoAutoClose
  2788. implicitWidth: 600
  2789. implicitHeight: 300
  2790. Text {
  2791. text: back_content
  2792. font.pointSize: 24
  2793. font.family: alibaba.name
  2794. color: '#000000'
  2795. anchors.horizontalCenter: parent.horizontalCenter
  2796. y: 100
  2797. }
  2798. Row {
  2799. height: parent.height
  2800. anchors.horizontalCenter: parent.horizontalCenter
  2801. y: 200
  2802. CButton {
  2803. id: yesBtn
  2804. textHeight: 50
  2805. fontHeight: 0.4
  2806. width: 150
  2807. height: 50
  2808. color: pressed ? textClickedColor : mainAppColor
  2809. text: "是"
  2810. onClicked: {
  2811. track();
  2812. trackDialog.visible = false;
  2813. // videoWindow.close()
  2814. // rootItem.qmlSignalQuit()
  2815. }
  2816. }
  2817. spacing: 50
  2818. CButton {
  2819. id: noBtn
  2820. textHeight: 50
  2821. fontHeight: 0.4
  2822. width: 150
  2823. height: 50
  2824. color: pressed ? textClickedColor : mainAppColor
  2825. text: "否"
  2826. onClicked: {
  2827. unTrack();
  2828. trackDialog.visible = false
  2829. }
  2830. }
  2831. }
  2832. }
  2833. Dialog {
  2834. id: moveErrorDlg
  2835. visible: false
  2836. modal: true
  2837. x: (parent.width - width) / 2
  2838. y: (parent.height - height) / 2
  2839. closePolicy: Popup.NoAutoClose
  2840. implicitWidth: 600
  2841. implicitHeight: 300
  2842. Text {
  2843. text: move_content
  2844. font.pointSize: 24
  2845. font.family: alibaba.name
  2846. color: '#000000'
  2847. anchors.horizontalCenter: parent.horizontalCenter
  2848. y: 100
  2849. }
  2850. Row {
  2851. height: parent.height
  2852. anchors.horizontalCenter: parent.horizontalCenter
  2853. y: 200
  2854. CButton {
  2855. id: exbutton
  2856. textHeight: 50
  2857. fontHeight: 0.4
  2858. width: 150
  2859. height: 50
  2860. color: pressed ? textClickedColor : mainAppColor
  2861. text: "确定"
  2862. onClicked: {
  2863. appModel.controlCar(uid);
  2864. backDialog.visible = false;
  2865. // videoWindow.close()
  2866. // rootItem.qmlSignalQuit()
  2867. }
  2868. }
  2869. }
  2870. }
  2871. }