PeopleCoverHoleValve.qml 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887
  1. import QtQuick 2.11
  2. import QtQuick.VirtualKeyboard 2.14
  3. import QtQuick.VirtualKeyboard.Settings 2.14
  4. import QtQuick.Controls 1.4
  5. import "modbus.js" as ModbusJs
  6. import "peopleCoverHoleValveTest.js" as PeopleCoverHoleValveTestJs
  7. import Qt.labs.platform 1.1
  8. Item {
  9. id:root
  10. //阀门生产厂家
  11. property string manufacture
  12. //阀门类型
  13. property string type
  14. //阀门编号
  15. property string serialNumber
  16. //使用单位
  17. property string user
  18. //车牌号
  19. property string carplate
  20. //试验次数
  21. property int count:1
  22. //试验类型
  23. property int testType
  24. //阀 状态
  25. property string state
  26. Loader{
  27. id:loader
  28. anchors.fill: parent
  29. anchors.margins: 5
  30. }
  31. function show(){
  32. if(loader.sourceComponent === null){
  33. loader.sourceComponent = componet
  34. }
  35. loader.item.show()
  36. }
  37. function exit(){
  38. if(loader.sourceComponent !== null){
  39. loader.item.exit()
  40. }
  41. }
  42. Component{
  43. id:componet
  44. GroupBox{
  45. id:groupbox
  46. x:width
  47. title: "人孔盖试验"
  48. property bool running:startStopButton.running
  49. property int pressureCnt:0
  50. property var dataArray: []
  51. signal pressureDisplaySigFun(var pressureNumber)
  52. signal resultSigFun(var result)
  53. property var pointList0:[]
  54. property var pointList1:[]
  55. property var pointList2:[]
  56. property var pointList3:[]
  57. property var pointList4:[]
  58. property var pointList5:[]
  59. property int delayCnt: 0
  60. property int delayType: 0
  61. property int currentIndex :0
  62. onResultSigFun: {
  63. //需要区分第一次 第二次 第三次
  64. switch(groupbox.currentIndex){
  65. case 0:
  66. resultSetPressure1.paraResult = result.openPressureNumber
  67. resultSealPressure1.paraResult = result.sealPressureNumber
  68. break;
  69. case 1:
  70. resultSetPressure2.paraResult = result.openPressureNumber
  71. resultSealPressure2.paraResult = result.sealPressureNumber
  72. break;
  73. case 2:
  74. resultSetPressure3.paraResult = result.openPressureNumber
  75. resultSealPressure3.paraResult = result.sealPressureNumber
  76. break;
  77. }
  78. }
  79. function pressureDisplayInput(number){
  80. pressureCnt++
  81. //console.log("pressureDisplayInput number:%f", number)
  82. if(number+2 > curveDisplay.axisyMax ){
  83. curveDisplay.axisyMax = number +2
  84. }
  85. if(pressureCnt <= 61){
  86. dataArray.push(number)
  87. curveDisplay.spline.append(pressureCnt-1,number)
  88. }
  89. else{
  90. dataArray.push(number)
  91. //dataArray.shift()
  92. curveDisplay.spline.clear()
  93. curveDisplay.axisxMax = pressureCnt+1
  94. for(var i=0; i<pressureCnt; i++){
  95. curveDisplay.spline.append(i,dataArray[i])
  96. }
  97. }
  98. gauge.value = number
  99. }
  100. onPressureDisplaySigFun: {
  101. pressureDisplayInput(pressureNumber)
  102. }
  103. onRunningChanged: {
  104. PeopleCoverHoleValveTestJs.running = running
  105. if(running === true){
  106. startTimer.start()
  107. }
  108. }
  109. Timer{
  110. id:stopTimer
  111. repeat: false
  112. interval: 500
  113. onTriggered: {
  114. ModbusJs.closeAllValve(controlSerial)
  115. testStop()
  116. }
  117. }
  118. Timer{
  119. id:delayTimer
  120. repeat: false
  121. interval: 5000
  122. onTriggered: {
  123. if(delayType === 0){
  124. PeopleCoverHoleValveTestJs.airCylinderHoldUp()
  125. }else{
  126. PeopleCoverHoleValveTestJs.airCylinderHoldDown()
  127. }
  128. delayCnt = 0
  129. }
  130. }
  131. Timer{
  132. id:startTimer
  133. repeat: false
  134. interval: 500
  135. onTriggered: {
  136. choosevalve.menuEnable = false
  137. PeopleCoverHoleValveTestJs.exit = false
  138. console.log("正在自检....")
  139. var ret = ModbusJs.checkModebusDevice(controlSerial,sensorSerial,log)
  140. if(ret === false){
  141. log.show("自检错误")
  142. testStop()
  143. choosevalve.menuEnable = true
  144. return
  145. }else{
  146. }
  147. curveDisplay.spline.clear()
  148. groupbox.pressureCnt =0
  149. groupbox.dataArray = []
  150. groupbox.currentIndex = 0
  151. do{
  152. //let tab = tabview1.getTab(groupbox.currentIndex)
  153. //let sealPressureModel = tab.item.modelData
  154. //sealPressureModel.clear()
  155. var tab = tabview1.getTab(groupbox.currentIndex)
  156. var tabView = tabview1
  157. var openPressureModel = tab.item.modelData
  158. tab = tabview1.getTab(groupbox.currentIndex+3)
  159. var sealPressureModel = tab.item.modelData
  160. openPressureModel.clear()
  161. sealPressureModel.clear()
  162. reuslt.visible = false
  163. ret = PeopleCoverHoleValveTestJs.testStart(groupbox.currentIndex,tabview1,processWindow,controlSerial,sensorSerial,
  164. openPressureModel,sealPressureModel,
  165. pressureDisplaySigFun,resultSigFun,spy,log)
  166. if(ret === false){
  167. processWindow.show("测试退出,泄气中...")
  168. PeopleCoverHoleValveTestJs.runningBackup = groupbox.running
  169. PeopleCoverHoleValveTestJs.releasePressure(controlSerial,pressureDisplaySigFun,spy,log)
  170. }
  171. spy.wait(500) //延时 确认全关继电器
  172. groupbox.currentIndex++
  173. }while(groupbox.currentIndex <root.count && ret === true)
  174. groupbox.testStop()
  175. choosevalve.menuEnable = true
  176. }
  177. }
  178. function testStop(){
  179. processWindow.exit()
  180. reuslt.visible = true
  181. startStopButton.running = false
  182. PeopleCoverHoleValveTestJs.resetio()
  183. }
  184. Connections{
  185. target: reportButton
  186. onUserClicked:{
  187. var tab = tabview1.getTab(0)
  188. var axisxMin = 0;var axisyMin = 0; var axisyMax=50;
  189. tab = tabview1.getTab(0)
  190. reportPicture0.generateTabPicture(tab,0,axisxMin,axisyMin,axisyMax)
  191. groupbox.pointList0 = reportPicture0.pointList;
  192. tab = tabview1.getTab(1)
  193. reportPicture1.generateTabPicture(tab,1,axisxMin,axisyMin,axisyMax)
  194. groupbox.pointList1 = reportPicture1.pointList;
  195. tab = tabview1.getTab(2)
  196. reportPicture2.generateTabPicture(tab,2,axisxMin,axisyMin,axisyMax)
  197. groupbox.pointList2 = reportPicture2.pointList;
  198. tab = tabview1.getTab(3)
  199. reportPicture3.generateTabPicture(tab,3,axisxMin,axisyMin,axisyMax)
  200. groupbox.pointList3 = reportPicture3.pointList;
  201. tab = tabview1.getTab(4)
  202. reportPicture4.generateTabPicture(tab,4,axisxMin,axisyMin,axisyMax)
  203. groupbox.pointList4 = reportPicture4.pointList;
  204. tab = tabview1.getTab(5)
  205. reportPicture5.generateTabPicture(tab,5,axisxMin,axisyMin,axisyMax)
  206. groupbox.pointList5 = reportPicture5.pointList;
  207. var fileName = root.manufacture+"_"+root.type+"_"+root.serialNumber+"_"+root.carplate
  208. var text = getWordSaveFileName(fileName)
  209. saveWordDialog.currentFile = getWordSaveFileName(text)
  210. saveWordDialog.open()
  211. }
  212. }
  213. FileDialog {
  214. id: saveWordDialog
  215. title: "保存为"
  216. nameFilters: [ "Word files (*.doc)"]
  217. fileMode: FileDialog.SaveFile
  218. onAccepted: {
  219. var savePath = file.toString().substring(8)
  220. var obj={}
  221. obj.pointList0 = groupbox.pointList0
  222. obj.pointList1 = groupbox.pointList1
  223. obj.pointList2 = groupbox.pointList2
  224. obj.pointList3 = groupbox.pointList3
  225. obj.pointList4 = groupbox.pointList4
  226. obj.pointList5 = groupbox.pointList5
  227. obj.manufacture = root.manufacture
  228. obj.type = root.type
  229. obj.serialNumber = root.serialNumber
  230. obj.user = root.user
  231. obj.carplate = root.carplate
  232. obj.state = root.state
  233. obj.setPressure = ""
  234. obj.valve="人孔盖"
  235. obj.resultSetPressure1 = resultSetPressure1.paraResult
  236. obj.resultSetPressure2 = resultSetPressure2.paraResult
  237. obj.resultSetPressure3 = resultSetPressure3.paraResult
  238. obj.resultSealPressure1 = resultSealPressure1.paraResult
  239. obj.resultSealPressure2 = resultSealPressure2.paraResult
  240. obj.resultSealPressure3 = resultSealPressure3.paraResult
  241. reportWord.generateWord(savePath,obj)
  242. }
  243. }
  244. function show(){
  245. animationShow.running = true
  246. }
  247. function exit(){
  248. PeopleCoverHoleValveTestJs.exit = true
  249. animationExit.running = true
  250. startStopButton.running = false
  251. stopTimer.start()
  252. PeopleCoverHoleValveTestJs.resetio()
  253. PeopleCoverHoleValveTestJs.reset_airCylinder()
  254. PeopleCoverHoleValveTestJs.exit = true
  255. }
  256. //加载任务动画效果
  257. NumberAnimation {
  258. id: animationShow
  259. target: groupbox
  260. property: "x"
  261. from: groupbox.x
  262. to: 0
  263. duration: 500
  264. }
  265. NumberAnimation {
  266. id: animationExit
  267. target: groupbox
  268. property: "x"
  269. from: groupbox.x
  270. to: 1024
  271. duration: 500
  272. }
  273. Column{
  274. anchors.left: parent.left
  275. anchors.leftMargin: 2
  276. anchors.top: parent.top
  277. anchors.topMargin: 10
  278. spacing: 0
  279. //参数
  280. Rectangle{
  281. width: 980
  282. height: 70+35
  283. color: "white"
  284. radius: 6
  285. Row{
  286. spacing: 23
  287. Item {
  288. width: 790//820
  289. height: 70+35
  290. Column{
  291. anchors.left: parent.left
  292. anchors.leftMargin: 10
  293. anchors.top: parent.top
  294. anchors.topMargin: 10
  295. spacing: 8
  296. Row{
  297. spacing: 15
  298. InputLine{
  299. id:manufactureInputLine
  300. paraName: "制造单位:"
  301. paraLength: 180
  302. onTextChanged: {
  303. root.manufacture = text
  304. }
  305. }
  306. InputLine{
  307. id:typeInputLine
  308. paraName: "型号:"
  309. paraLength: 180
  310. validator:RegExpValidator {
  311. regExp: /[0-9a-zA-Z.-]*/
  312. }
  313. onTextChanged: {
  314. root.type = text
  315. }
  316. }
  317. InputLine{
  318. id:serialNumberInputLine
  319. paraName: "编号:"
  320. paraLength: 180
  321. validator:RegExpValidator {
  322. regExp: /[0-9a-zA-Z.-]*/
  323. }
  324. onTextChanged: {
  325. root.serialNumber = text
  326. }
  327. }
  328. }
  329. Row{
  330. spacing: 15
  331. InputLine{
  332. id:userInputLine
  333. paraName: "使用单位:"
  334. paraLength: 180
  335. onTextChanged: {
  336. root.user = text
  337. }
  338. }
  339. CarPlate{
  340. id:carplateInputLine
  341. paraName: "车牌:"
  342. paraLength: 180-55
  343. onPlattextChanged: {
  344. root.carplate = plattext
  345. console.log("PeopleCoverHoleValve Carplattext:" + plattext)
  346. }
  347. }
  348. UserComboBox{
  349. id:valveStateComboBox
  350. anchors.verticalCenter: parent.verticalCenter
  351. width: 80
  352. height:25
  353. bgColor:"#D2D5D9"
  354. model: ["在用阀","新阀"]
  355. onCurrentTextChanged: {
  356. root.state = currentText
  357. }
  358. }
  359. UserComboBox{
  360. id:countComboBox
  361. width: 120
  362. height:25
  363. bgColor:"#D2D5D9"
  364. model: ["试验1次","试验2次", "试验3次"]
  365. onActivated: {
  366. }
  367. Binding{
  368. target: root
  369. property: "count"
  370. value: countComboBox.currentIndex+1
  371. }
  372. }
  373. }
  374. Row{
  375. spacing: 15
  376. Button{
  377. id:upButton
  378. text: "压抓上升"
  379. width: 115
  380. height: 25
  381. onClicked: {
  382. if(delayCnt === 0){
  383. PeopleCoverHoleValveTestJs.airCylinderUp()
  384. delayType = 0
  385. delayCnt = 5
  386. delayTimer.start()
  387. }else{
  388. }
  389. }
  390. }
  391. Button{
  392. id:downButton
  393. text: "压抓下降"
  394. width: 115
  395. height: 25
  396. onClicked: {
  397. //PeopleCoverHoleValveTestJs.airCylinderDown()
  398. if(delayCnt === 0){
  399. PeopleCoverHoleValveTestJs.airCylinderDown()
  400. delayType = 1
  401. delayCnt = 5
  402. delayTimer.start()
  403. }else{
  404. }
  405. }
  406. }
  407. InputLine{
  408. id:openPressure_min
  409. paraName: "最小开启压力(kPa):"
  410. paraLength: 40
  411. text: PeopleCoverHoleValveTestJs.openPressureMin
  412. validator:RegExpValidator {
  413. regExp: /[0-9]*/
  414. }
  415. inputMethodHints: Qt.ImhDigitsOnly
  416. onTextChanged: {
  417. PeopleCoverHoleValveTestJs.openPressureMin = Number(text)
  418. console.log("openPressureMin:",PeopleCoverHoleValveTestJs.openPressureMin)
  419. }
  420. }
  421. InputLine{
  422. id:openPressure_max
  423. paraName: "最大开启压力(kPa):"
  424. paraLength: 40
  425. text: PeopleCoverHoleValveTestJs.openPressureMax
  426. validator:RegExpValidator {
  427. regExp: /[0-9]*/
  428. }
  429. inputMethodHints: Qt.ImhDigitsOnly
  430. onTextChanged: {
  431. PeopleCoverHoleValveTestJs.openPressureMax = Number(text)
  432. console.log("openPressureMax:",PeopleCoverHoleValveTestJs.openPressureMax)
  433. }
  434. }
  435. InputLine{
  436. id:max_testtime
  437. paraName: "压力平稳时间(秒):"
  438. paraLength: 40
  439. text: PeopleCoverHoleValveTestJs.maxPressureStableTime
  440. validator:RegExpValidator {
  441. regExp: /[0-9]*/
  442. }
  443. inputMethodHints: Qt.ImhDigitsOnly
  444. onTextChanged: {
  445. PeopleCoverHoleValveTestJs.maxPressureStableTime = Number(text)
  446. console.log("maxPressureStableTime:",PeopleCoverHoleValveTestJs.maxPressureStableTime)
  447. }
  448. }
  449. // Button{
  450. // id:setzero
  451. // text: "压力传感器标零"
  452. // width: 120
  453. // height: 25
  454. // onClicked: {
  455. // if(true === ModbusJs.mh_PressureSetZeroReq(sensorSerial)){
  456. // log.show("压力传感器标零成功")
  457. // }else{
  458. // log.show("压力传感器标零失败")
  459. // }
  460. // }
  461. // }
  462. }
  463. }
  464. }
  465. Item {
  466. width: 130
  467. height: 70
  468. Row{
  469. anchors.verticalCenter: parent.verticalCenter
  470. spacing: 30
  471. StartStopButton{
  472. id:startStopButton
  473. width: 50
  474. height: 50
  475. anchors.verticalCenter: parent.verticalCenter
  476. }
  477. ReportButton{
  478. id:reportButton
  479. width: 50
  480. height: 50
  481. anchors.verticalCenter: parent.verticalCenter
  482. }
  483. }
  484. }
  485. }
  486. }
  487. //曲线 仪表 结果
  488. Row{
  489. x:-10
  490. //曲线
  491. CurveDisplay{
  492. id:curveDisplay
  493. anchors.verticalCenter: parent.verticalCenter
  494. width: 450
  495. height: 300
  496. axisxMax:60
  497. axisxMin:0
  498. axisyMax:35
  499. axisyMin:0
  500. name:"横轴时间(秒) 纵轴压力(kPa)"
  501. }
  502. //仪表
  503. Rectangle{
  504. width: (300-18)*0.75
  505. height: 300-18
  506. color: "white"
  507. radius: 6
  508. anchors.verticalCenter: parent.verticalCenter
  509. Gauge {
  510. id:gauge
  511. width: parent.width
  512. height: parent.width
  513. anchors.centerIn: parent
  514. value: 0
  515. maximumValue: 50
  516. minimumValue: 0
  517. tickmarkStepSize:5
  518. labelStepSize:5
  519. Behavior on value { NumberAnimation { duration: 1000 }}
  520. }
  521. }
  522. //试验结果
  523. Item {
  524. width: 338
  525. height: 300
  526. anchors.verticalCenter: parent.verticalCenter
  527. Rectangle{
  528. id:resultWindow
  529. anchors.fill: parent
  530. anchors.margins: 10
  531. color: "white"
  532. radius: 6
  533. ProcessWindow{
  534. id:processWindow
  535. width: 280
  536. height: 50
  537. hideWith:resultWindow.width
  538. anchors.centerIn: parent
  539. }
  540. Item {
  541. id:reuslt
  542. //visible: false
  543. anchors.fill: parent
  544. anchors.margins: 10
  545. property int resultHeight: 25
  546. Column{
  547. anchors.centerIn: parent
  548. ResultDisplayText{
  549. width: reuslt.width
  550. height: reuslt.resultHeight
  551. color: "white"
  552. paraName: "开启压力"
  553. paraResult:""
  554. paraUnit:""
  555. }
  556. ResultDisplayText{
  557. id:resultSetPressure1
  558. width: reuslt.width
  559. height: reuslt.resultHeight
  560. color: "#D2D5D9"
  561. paraName: "第一次:"
  562. paraResult:""
  563. paraUnit:"kPa"
  564. }
  565. ResultDisplayText{
  566. id:resultSetPressure2
  567. width: reuslt.width
  568. height: reuslt.resultHeight
  569. color: "#DFE2E6"
  570. paraName: "第二次:"
  571. paraResult:""
  572. paraUnit:"kPa"
  573. }
  574. ResultDisplayText{
  575. id:resultSetPressure3
  576. width: reuslt.width
  577. height: reuslt.resultHeight
  578. color: "#D2D5D9"
  579. paraName: "第三次:"
  580. paraResult:""
  581. paraUnit:"kPa"
  582. }
  583. ResultDisplayText{
  584. width: reuslt.width
  585. height: reuslt.resultHeight
  586. color: "white"
  587. paraName: ""
  588. paraResult:""
  589. paraUnit:""
  590. }
  591. ResultDisplayText{
  592. width: reuslt.width
  593. height: reuslt.resultHeight
  594. color: "white"
  595. paraName: "密封压力"
  596. paraResult:""
  597. paraUnit:""
  598. }
  599. ResultDisplayText{
  600. id:resultSealPressure1
  601. width: reuslt.width
  602. height: reuslt.resultHeight
  603. color: "#DFE2E6"
  604. paraName: "第一次:"
  605. paraResult:""
  606. paraUnit:"kPa"
  607. }
  608. ResultDisplayText{
  609. id:resultSealPressure2
  610. width: reuslt.width
  611. height: reuslt.resultHeight
  612. color: "#D2D5D9"
  613. paraName: "第二次:"
  614. paraResult:""
  615. paraUnit:"kPa"
  616. }
  617. ResultDisplayText{
  618. id:resultSealPressure3
  619. width: reuslt.width
  620. height: reuslt.resultHeight
  621. color: "#DFE2E6"
  622. paraName: "第三次:"
  623. paraResult:""
  624. paraUnit:"kPa"
  625. }
  626. }
  627. }
  628. }
  629. }
  630. }
  631. //记录
  632. Row{
  633. id:record
  634. spacing: 10
  635. property int tableWidth:980
  636. function dataRandomSet(modelData,max){
  637. for(var i=0;i<max; i++){
  638. var number= Math.round(Math.random()*50)
  639. var obj={}
  640. obj.pressure=number
  641. modelData.append(obj)
  642. }
  643. }
  644. TabView {
  645. id:tabview1
  646. width: record.tableWidth
  647. height: 265-35
  648. GraphButton{
  649. id:graphButton
  650. x:870
  651. y:-25
  652. width: 48
  653. height: 24
  654. onUserClicked: {
  655. var tab = tabview1.getTab(tabview1.currentIndex)
  656. var axisxMax = tab.item.modelData.count
  657. generateCurve.show(0,axisxMax,0,50,tab.item.modelData,tab.title,"横轴时间(秒) 纵轴压力(kPa)")
  658. }
  659. }
  660. Tab {
  661. title: "第一次开启记录"
  662. active: true
  663. RecordTable{
  664. // Component.onCompleted: {
  665. // record.dataRandomSet(modelData,20)
  666. // }
  667. }
  668. }
  669. Tab {
  670. title: "第二次开启记录"
  671. active: true
  672. RecordTable{
  673. // Component.onCompleted: {
  674. // record.dataRandomSet(modelData,20)
  675. // }
  676. }
  677. }
  678. Tab {
  679. title: "第三次开启记录"
  680. active: true
  681. RecordTable{
  682. // Component.onCompleted: {
  683. // record.dataRandomSet(modelData,20)
  684. // }
  685. }
  686. }
  687. Tab {
  688. title: "第一次密封记录"
  689. active: true
  690. RecordTable{
  691. // Component.onCompleted: {
  692. // record.dataRandomSet(modelData,20)
  693. // }
  694. }
  695. }
  696. Tab {
  697. title: "第二次密封记录"
  698. active: true
  699. RecordTable{
  700. // Component.onCompleted: {
  701. // record.dataRandomSet(modelData,20)
  702. // }
  703. }
  704. }
  705. Tab {
  706. title: "第三次密封记录"
  707. active: true
  708. RecordTable{
  709. // Component.onCompleted: {
  710. // record.dataRandomSet(modelData,20)
  711. // }
  712. }
  713. }
  714. }
  715. }
  716. }
  717. InputPanel {
  718. id: inputPanel
  719. visible: window.virtualkeyboard
  720. z: 99
  721. x: -13
  722. y: window.height
  723. width: window.width
  724. onActiveChanged: {
  725. if(!active)
  726. {
  727. manufactureInputLine.textFocus = false
  728. typeInputLine.textFocus = false
  729. serialNumberInputLine.textFocus = false
  730. userInputLine.textFocus = false
  731. carplateInputLine.textFocus = false
  732. releasePressureTimeMaxInputLine.textFocus = false
  733. sealPressureTimemaxInputLine.textFocus = false
  734. }
  735. }
  736. states:
  737. State {
  738. name: "visible"
  739. when: inputPanel.active
  740. PropertyChanges {
  741. target: inputPanel
  742. y: window.height/2
  743. }
  744. }
  745. transitions: Transition {
  746. from: ""
  747. to: "visible"
  748. reversible: true
  749. ParallelAnimation {
  750. NumberAnimation {
  751. properties: "y"
  752. duration: 250
  753. easing.type: Easing.InOutQuad
  754. }
  755. }
  756. }
  757. Component.onCompleted: {
  758. VirtualKeyboardSettings.styleName = "retro"
  759. VirtualKeyboardSettings.activeLocales=["en_GB","zh_CN"]
  760. VirtualKeyboardSettings.locale = "en_GB";//"fi_FI";
  761. }
  762. }
  763. }
  764. }
  765. }