main.qml 26 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210
  1. import QtQuick 2.7
  2. import QtQuick.Window 2.2
  3. import QtQuick.Controls 1.4
  4. import com.gfa.ipc.appctrl 1.0
  5. Window {
  6. visible: true
  7. width: 800
  8. height: 480
  9. title: qsTr("GfA App Control")
  10. function stateColor(state)
  11. {
  12. switch(state)
  13. {
  14. case QGfaAppCtrl.STATE_RUNNING:
  15. return "lightgreen";
  16. case QGfaAppCtrl.STATE_PAUSED:
  17. return "lightgrey";
  18. case QGfaAppCtrl.STATE_HANGING:
  19. return "red";
  20. default:
  21. return "white";
  22. }
  23. }
  24. function sec2HMS(sec)
  25. {
  26. var h = parseInt(sec / 3600);
  27. sec -= h * 3600;
  28. var m = parseInt(sec / 60);
  29. sec -= m * 60;
  30. return "" + h + (m < 10 ? ":0" : ":") + m + (sec < 10 ? ":0" : ":") + sec;
  31. }
  32. Rectangle {
  33. x: 10
  34. y: 20
  35. width: 120
  36. height: 460
  37. Rectangle {
  38. x: 0
  39. y: 40
  40. width: parent.width
  41. height: 30
  42. Text {
  43. font.pixelSize: 14
  44. font.italic: true
  45. anchors.verticalCenter: parent.verticalCenter
  46. anchors.left: parent.left
  47. text: "State:"
  48. }
  49. }
  50. Rectangle {
  51. x: 0
  52. y: 70
  53. width: parent.width
  54. height: 30
  55. Text {
  56. font.pixelSize: 14
  57. font.italic: true
  58. anchors.verticalCenter: parent.verticalCenter
  59. anchors.left: parent.left
  60. text: "Cyc. cur. μs:"
  61. }
  62. }
  63. Rectangle {
  64. x: 0
  65. y: 100
  66. width: parent.width
  67. height: 30
  68. Text {
  69. font.pixelSize: 14
  70. font.italic: true
  71. anchors.verticalCenter: parent.verticalCenter
  72. anchors.left: parent.left
  73. text: "Wkt. max. μs:"
  74. }
  75. }
  76. Rectangle {
  77. x: 0
  78. y: 130
  79. width: parent.width
  80. height: 30
  81. Text {
  82. font.pixelSize: 14
  83. font.italic: true
  84. anchors.verticalCenter: parent.verticalCenter
  85. anchors.left: parent.left
  86. text: "Wkt. cur. μs:"
  87. }
  88. }
  89. Rectangle {
  90. x: 0
  91. y: 160
  92. width: parent.width
  93. height: 30
  94. Text {
  95. font.pixelSize: 14
  96. font.italic: true
  97. anchors.verticalCenter: parent.verticalCenter
  98. anchors.left: parent.left
  99. text: "CPU Time sec.:"
  100. }
  101. }
  102. Rectangle {
  103. x: 0
  104. y: 190
  105. width: parent.width
  106. height: 30
  107. Text {
  108. font.pixelSize: 14
  109. font.italic: true
  110. anchors.verticalCenter: parent.verticalCenter
  111. anchors.left: parent.left
  112. text: "CPU avg. %:"
  113. }
  114. }
  115. Rectangle {
  116. x: 0
  117. y: 220
  118. width: parent.width
  119. height: 30
  120. Text {
  121. font.pixelSize: 14
  122. font.italic: true
  123. anchors.verticalCenter: parent.verticalCenter
  124. anchors.left: parent.left
  125. text: "CPU cur. %:"
  126. }
  127. }
  128. Rectangle {
  129. x: 0
  130. y: 250
  131. width: parent.width
  132. height: 30
  133. Text {
  134. font.pixelSize: 14
  135. font.italic: true
  136. anchors.verticalCenter: parent.verticalCenter
  137. anchors.left: parent.left
  138. text: "VM RSS KiB:"
  139. }
  140. }
  141. Rectangle {
  142. x: 0
  143. y: 280
  144. width: parent.width
  145. height: 30
  146. Text {
  147. font.pixelSize: 14
  148. font.italic: true
  149. anchors.verticalCenter: parent.verticalCenter
  150. anchors.left: parent.left
  151. text: "VM Size KiB:"
  152. }
  153. }
  154. Rectangle {
  155. x: 0
  156. y: 330
  157. height: 30
  158. width: parent.width
  159. border.width: 1
  160. border.color: "lightgrey"
  161. radius: 5
  162. Text {
  163. font.pixelSize: 14
  164. anchors.centerIn: parent
  165. text: qGfaAppCtrl.minPass
  166. }
  167. }
  168. Rectangle {
  169. x: 0
  170. y: 370
  171. height: 30
  172. width: parent.width
  173. border.width: 1
  174. border.color: "black"
  175. radius: 5
  176. Text {
  177. font.pixelSize: 14
  178. anchors.centerIn: parent
  179. text: qGfaAppCtrl.avgPass
  180. }
  181. }
  182. Rectangle {
  183. x: 0
  184. y: 410
  185. height: 30
  186. width: parent.width
  187. Button {
  188. text: "Exit"
  189. anchors.fill: parent
  190. onClicked: Qt.quit()
  191. }
  192. }
  193. }
  194. /////////////////////////////////////////////////////////////////////////////////////////////////
  195. Rectangle {
  196. x: 140
  197. y: 20
  198. width: 120
  199. height: 460
  200. property var appInfo: qGfaAppCtrl.appInfo[QGfaAppCtrl.APP_INDEX_REMANENT]
  201. Rectangle {
  202. x: 0
  203. y: 0
  204. width: parent.width
  205. height: 30
  206. Text {
  207. font.pixelSize: 18
  208. font.bold: true
  209. anchors.centerIn: parent
  210. text: parent.parent.appInfo.name
  211. }
  212. }
  213. Rectangle {
  214. x: 0
  215. y: 40
  216. width: parent.width
  217. height: 30
  218. border.width: 1
  219. border.color: "lightgrey"
  220. radius: 5
  221. color: stateColor(parent.appInfo.state)
  222. Text {
  223. font.pixelSize: 14
  224. font.bold: true
  225. anchors.centerIn: parent
  226. text: parent.parent.appInfo.stateText
  227. }
  228. }
  229. Rectangle {
  230. x: 0
  231. y: 70
  232. width: parent.width
  233. height: 30
  234. border.width: 1
  235. border.color: "lightgrey"
  236. radius: 5
  237. Text {
  238. font.pixelSize: 14
  239. anchors.centerIn: parent
  240. text: parent.parent.appInfo.cycCur
  241. }
  242. }
  243. Rectangle {
  244. x: 0
  245. y: 100
  246. width: parent.width
  247. height: 30
  248. border.width: 1
  249. border.color: "lightgrey"
  250. radius: 5
  251. Text {
  252. font.pixelSize: 14
  253. anchors.centerIn: parent
  254. text: parent.parent.appInfo.wktMax
  255. }
  256. }
  257. Rectangle {
  258. x: 0
  259. y: 130
  260. width: parent.width
  261. height: 30
  262. border.width: 1
  263. border.color: "black"
  264. radius: 5
  265. Text {
  266. font.pixelSize: 14
  267. anchors.centerIn: parent
  268. text: parent.parent.appInfo.wktCur
  269. }
  270. }
  271. Rectangle {
  272. x: 0
  273. y: 160
  274. width: parent.width
  275. height: 30
  276. border.width: 1
  277. border.color: "lightgrey"
  278. radius: 5
  279. Text {
  280. font.pixelSize: 14
  281. anchors.centerIn: parent
  282. text: parent.parent.appInfo.cpuTime.toFixed(1)
  283. }
  284. }
  285. Rectangle {
  286. x: 0
  287. y: 190
  288. width: parent.width
  289. height: 30
  290. border.width: 1
  291. border.color: "lightgrey"
  292. radius: 5
  293. Text {
  294. font.pixelSize: 14
  295. anchors.centerIn: parent
  296. text: parent.parent.appInfo.cpuAvg.toFixed(2)
  297. }
  298. }
  299. Rectangle {
  300. x: 0
  301. y: 220
  302. width: parent.width
  303. height: 30
  304. border.width: 1
  305. border.color: "lightgrey"
  306. radius: 5
  307. Text {
  308. font.pixelSize: 14
  309. anchors.centerIn: parent
  310. text: parent.parent.appInfo.cpuCur.toFixed(2)
  311. }
  312. }
  313. Rectangle {
  314. x: 0
  315. y: 250
  316. width: parent.width
  317. height: 30
  318. border.width: 1
  319. border.color: "lightgrey"
  320. radius: 5
  321. Text {
  322. font.pixelSize: 14
  323. anchors.centerIn: parent
  324. text: parent.parent.appInfo.vmRSS
  325. }
  326. }
  327. Rectangle {
  328. x: 0
  329. y: 280
  330. width: parent.width
  331. height: 30
  332. border.width: 1
  333. border.color: "lightgrey"
  334. radius: 5
  335. Text {
  336. font.pixelSize: 14
  337. anchors.centerIn: parent
  338. text: parent.parent.appInfo.vmSize
  339. }
  340. }
  341. Rectangle {
  342. x: 0
  343. y: 330
  344. height: 30
  345. width: parent.width
  346. Button {
  347. text: "Pause"
  348. anchors.fill: parent
  349. onClicked: parent.parent.appInfo.pause()
  350. enabled: (parent.parent.appInfo.state !== QGfaAppCtrl.STATE_NOT_RUNNING) && (parent.parent.appInfo.state !== QGfaAppCtrl.STATE_PAUSED)
  351. }
  352. }
  353. Rectangle {
  354. x: 0
  355. y: 370
  356. height: 30
  357. width: parent.width
  358. Button {
  359. text: "Resume"
  360. anchors.fill: parent
  361. onClicked: parent.parent.appInfo.resume()
  362. enabled: (parent.parent.appInfo.state === QGfaAppCtrl.STATE_PAUSED)
  363. }
  364. }
  365. Rectangle {
  366. x: 0
  367. y: 410
  368. height: 30
  369. width: parent.width
  370. Button {
  371. text: "Stop"
  372. anchors.fill: parent
  373. onClicked: parent.parent.appInfo.stop()
  374. enabled: (parent.parent.appInfo.state !== QGfaAppCtrl.STATE_NOT_RUNNING)
  375. }
  376. }
  377. }
  378. /////////////////////////////////////////////////////////////////////////////////////////////////
  379. Rectangle {
  380. x: 270
  381. y: 20
  382. width: 120
  383. height: 460
  384. property var appInfo: qGfaAppCtrl.appInfo[QGfaAppCtrl.APP_INDEX_MQTTCL]
  385. Rectangle {
  386. x: 0
  387. y: 0
  388. width: parent.width
  389. height: 30
  390. Text {
  391. font.pixelSize: 18
  392. font.bold: true
  393. anchors.centerIn: parent
  394. text: parent.parent.appInfo.name
  395. }
  396. }
  397. Rectangle {
  398. x: 0
  399. y: 40
  400. width: parent.width
  401. height: 30
  402. border.width: 1
  403. border.color: "lightgrey"
  404. radius: 5
  405. color: stateColor(parent.appInfo.state)
  406. Text {
  407. font.pixelSize: 14
  408. font.bold: true
  409. anchors.centerIn: parent
  410. text: parent.parent.appInfo.stateText
  411. }
  412. }
  413. Rectangle {
  414. x: 0
  415. y: 70
  416. width: parent.width
  417. height: 30
  418. border.width: 1
  419. border.color: "lightgrey"
  420. radius: 5
  421. Text {
  422. font.pixelSize: 14
  423. anchors.centerIn: parent
  424. text: parent.parent.appInfo.cycCur
  425. }
  426. }
  427. Rectangle {
  428. x: 0
  429. y: 100
  430. width: parent.width
  431. height: 30
  432. border.width: 1
  433. border.color: "lightgrey"
  434. radius: 5
  435. Text {
  436. font.pixelSize: 14
  437. anchors.centerIn: parent
  438. text: parent.parent.appInfo.wktMax
  439. }
  440. }
  441. Rectangle {
  442. x: 0
  443. y: 130
  444. width: parent.width
  445. height: 30
  446. border.width: 1
  447. border.color: "black"
  448. radius: 5
  449. Text {
  450. font.pixelSize: 14
  451. anchors.centerIn: parent
  452. text: parent.parent.appInfo.wktCur
  453. }
  454. }
  455. Rectangle {
  456. x: 0
  457. y: 160
  458. width: parent.width
  459. height: 30
  460. border.width: 1
  461. border.color: "lightgrey"
  462. radius: 5
  463. Text {
  464. font.pixelSize: 14
  465. anchors.centerIn: parent
  466. text: parent.parent.appInfo.cpuTime.toFixed(1)
  467. }
  468. }
  469. Rectangle {
  470. x: 0
  471. y: 190
  472. width: parent.width
  473. height: 30
  474. border.width: 1
  475. border.color: "lightgrey"
  476. radius: 5
  477. Text {
  478. font.pixelSize: 14
  479. anchors.centerIn: parent
  480. text: parent.parent.appInfo.cpuAvg.toFixed(2)
  481. }
  482. }
  483. Rectangle {
  484. x: 0
  485. y: 220
  486. width: parent.width
  487. height: 30
  488. border.width: 1
  489. border.color: "lightgrey"
  490. radius: 5
  491. Text {
  492. font.pixelSize: 14
  493. anchors.centerIn: parent
  494. text: parent.parent.appInfo.cpuCur.toFixed(2)
  495. }
  496. }
  497. Rectangle {
  498. x: 0
  499. y: 250
  500. width: parent.width
  501. height: 30
  502. border.width: 1
  503. border.color: "lightgrey"
  504. radius: 5
  505. Text {
  506. font.pixelSize: 14
  507. anchors.centerIn: parent
  508. text: parent.parent.appInfo.vmRSS
  509. }
  510. }
  511. Rectangle {
  512. x: 0
  513. y: 280
  514. width: parent.width
  515. height: 30
  516. border.width: 1
  517. border.color: "lightgrey"
  518. radius: 5
  519. Text {
  520. font.pixelSize: 14
  521. anchors.centerIn: parent
  522. text: parent.parent.appInfo.vmSize
  523. }
  524. }
  525. Rectangle {
  526. x: 0
  527. y: 330
  528. height: 30
  529. width: parent.width
  530. Button {
  531. text: "Pause"
  532. anchors.fill: parent
  533. onClicked: parent.parent.appInfo.pause()
  534. enabled: (parent.parent.appInfo.state !== QGfaAppCtrl.STATE_NOT_RUNNING) && (parent.parent.appInfo.state !== QGfaAppCtrl.STATE_PAUSED)
  535. }
  536. }
  537. Rectangle {
  538. x: 0
  539. y: 370
  540. height: 30
  541. width: parent.width
  542. Button {
  543. text: "Resume"
  544. anchors.fill: parent
  545. onClicked: parent.parent.appInfo.resume()
  546. enabled: (parent.parent.appInfo.state === QGfaAppCtrl.STATE_PAUSED)
  547. }
  548. }
  549. Rectangle {
  550. x: 0
  551. y: 410
  552. height: 30
  553. width: parent.width
  554. Button {
  555. text: "Stop"
  556. anchors.fill: parent
  557. onClicked: parent.parent.appInfo.stop()
  558. enabled: (parent.parent.appInfo.state !== QGfaAppCtrl.STATE_NOT_RUNNING)
  559. }
  560. }
  561. }
  562. /////////////////////////////////////////////////////////////////////////////////////////////////
  563. Rectangle {
  564. x: 400
  565. y: 20
  566. width: 120
  567. height: 460
  568. property var appInfo: qGfaAppCtrl.appInfo[QGfaAppCtrl.APP_INDEX_REST]
  569. Rectangle {
  570. x: 0
  571. y: 0
  572. width: parent.width
  573. height: 30
  574. Text {
  575. font.pixelSize: 18
  576. font.bold: true
  577. anchors.centerIn: parent
  578. text: parent.parent.appInfo.name
  579. }
  580. }
  581. Rectangle {
  582. x: 0
  583. y: 40
  584. width: parent.width
  585. height: 30
  586. border.width: 1
  587. border.color: "lightgrey"
  588. radius: 5
  589. color: stateColor(parent.appInfo.state)
  590. Text {
  591. font.pixelSize: 14
  592. font.bold: true
  593. anchors.centerIn: parent
  594. text: parent.parent.appInfo.stateText
  595. }
  596. }
  597. Rectangle {
  598. x: 0
  599. y: 70
  600. width: parent.width
  601. height: 30
  602. border.width: 1
  603. border.color: "lightgrey"
  604. radius: 5
  605. Text {
  606. font.pixelSize: 14
  607. anchors.centerIn: parent
  608. text: parent.parent.appInfo.cycCur
  609. }
  610. }
  611. Rectangle {
  612. x: 0
  613. y: 100
  614. width: parent.width
  615. height: 30
  616. border.width: 1
  617. border.color: "lightgrey"
  618. radius: 5
  619. Text {
  620. font.pixelSize: 14
  621. anchors.centerIn: parent
  622. text: parent.parent.appInfo.wktMax
  623. }
  624. }
  625. Rectangle {
  626. x: 0
  627. y: 130
  628. width: parent.width
  629. height: 30
  630. border.width: 1
  631. border.color: "black"
  632. radius: 5
  633. Text {
  634. font.pixelSize: 14
  635. anchors.centerIn: parent
  636. text: parent.parent.appInfo.wktCur
  637. }
  638. }
  639. Rectangle {
  640. x: 0
  641. y: 160
  642. width: parent.width
  643. height: 30
  644. border.width: 1
  645. border.color: "lightgrey"
  646. radius: 5
  647. Text {
  648. font.pixelSize: 14
  649. anchors.centerIn: parent
  650. text: parent.parent.appInfo.cpuTime.toFixed(1)
  651. }
  652. }
  653. Rectangle {
  654. x: 0
  655. y: 190
  656. width: parent.width
  657. height: 30
  658. border.width: 1
  659. border.color: "lightgrey"
  660. radius: 5
  661. Text {
  662. font.pixelSize: 14
  663. anchors.centerIn: parent
  664. text: parent.parent.appInfo.cpuAvg.toFixed(2)
  665. }
  666. }
  667. Rectangle {
  668. x: 0
  669. y: 220
  670. width: parent.width
  671. height: 30
  672. border.width: 1
  673. border.color: "lightgrey"
  674. radius: 5
  675. Text {
  676. font.pixelSize: 14
  677. anchors.centerIn: parent
  678. text: parent.parent.appInfo.cpuCur.toFixed(2)
  679. }
  680. }
  681. Rectangle {
  682. x: 0
  683. y: 250
  684. width: parent.width
  685. height: 30
  686. border.width: 1
  687. border.color: "lightgrey"
  688. radius: 5
  689. Text {
  690. font.pixelSize: 14
  691. anchors.centerIn: parent
  692. text: parent.parent.appInfo.vmRSS
  693. }
  694. }
  695. Rectangle {
  696. x: 0
  697. y: 280
  698. width: parent.width
  699. height: 30
  700. border.width: 1
  701. border.color: "lightgrey"
  702. radius: 5
  703. Text {
  704. font.pixelSize: 14
  705. anchors.centerIn: parent
  706. text: parent.parent.appInfo.vmSize
  707. }
  708. }
  709. Rectangle {
  710. x: 0
  711. y: 330
  712. height: 30
  713. width: parent.width
  714. Button {
  715. text: "Pause"
  716. anchors.fill: parent
  717. onClicked: parent.parent.appInfo.pause()
  718. enabled: (parent.parent.appInfo.state !== QGfaAppCtrl.STATE_NOT_RUNNING) && (parent.parent.appInfo.state !== QGfaAppCtrl.STATE_PAUSED)
  719. }
  720. }
  721. Rectangle {
  722. x: 0
  723. y: 370
  724. height: 30
  725. width: parent.width
  726. Button {
  727. text: "Resume"
  728. anchors.fill: parent
  729. onClicked: parent.parent.appInfo.resume()
  730. enabled: (parent.parent.appInfo.state === QGfaAppCtrl.STATE_PAUSED)
  731. }
  732. }
  733. Rectangle {
  734. x: 0
  735. y: 410
  736. height: 30
  737. width: parent.width
  738. Button {
  739. text: "Stop"
  740. anchors.fill: parent
  741. onClicked: parent.parent.appInfo.stop()
  742. enabled: (parent.parent.appInfo.state !== QGfaAppCtrl.STATE_NOT_RUNNING)
  743. }
  744. }
  745. }
  746. /////////////////////////////////////////////////////////////////////////////////////////////////
  747. Rectangle {
  748. x: 530
  749. y: 20
  750. width: 120
  751. height: 460
  752. property var appInfo: qGfaAppCtrl.appInfo[QGfaAppCtrl.APP_INDEX_DATALOGGER]
  753. Rectangle {
  754. x: 0
  755. y: 0
  756. width: parent.width
  757. height: 30
  758. Text {
  759. font.pixelSize: 18
  760. font.bold: true
  761. anchors.centerIn: parent
  762. text: parent.parent.appInfo.name
  763. }
  764. }
  765. Rectangle {
  766. x: 0
  767. y: 40
  768. width: parent.width
  769. height: 30
  770. border.width: 1
  771. border.color: "lightgrey"
  772. radius: 5
  773. color: stateColor(parent.appInfo.state)
  774. Text {
  775. font.pixelSize: 14
  776. font.bold: true
  777. anchors.centerIn: parent
  778. text: parent.parent.appInfo.stateText
  779. }
  780. }
  781. Rectangle {
  782. x: 0
  783. y: 70
  784. width: parent.width
  785. height: 30
  786. border.width: 1
  787. border.color: "lightgrey"
  788. radius: 5
  789. Text {
  790. font.pixelSize: 14
  791. anchors.centerIn: parent
  792. text: parent.parent.appInfo.cycCur
  793. }
  794. }
  795. Rectangle {
  796. x: 0
  797. y: 100
  798. width: parent.width
  799. height: 30
  800. border.width: 1
  801. border.color: "lightgrey"
  802. radius: 5
  803. Text {
  804. font.pixelSize: 14
  805. anchors.centerIn: parent
  806. text: parent.parent.appInfo.wktMax
  807. }
  808. }
  809. Rectangle {
  810. x: 0
  811. y: 130
  812. width: parent.width
  813. height: 30
  814. border.width: 1
  815. border.color: "black"
  816. radius: 5
  817. Text {
  818. font.pixelSize: 14
  819. anchors.centerIn: parent
  820. text: parent.parent.appInfo.wktCur
  821. }
  822. }
  823. Rectangle {
  824. x: 0
  825. y: 160
  826. width: parent.width
  827. height: 30
  828. border.width: 1
  829. border.color: "lightgrey"
  830. radius: 5
  831. Text {
  832. font.pixelSize: 14
  833. anchors.centerIn: parent
  834. text: parent.parent.appInfo.cpuTime.toFixed(1)
  835. }
  836. }
  837. Rectangle {
  838. x: 0
  839. y: 190
  840. width: parent.width
  841. height: 30
  842. border.width: 1
  843. border.color: "lightgrey"
  844. radius: 5
  845. Text {
  846. font.pixelSize: 14
  847. anchors.centerIn: parent
  848. text: parent.parent.appInfo.cpuAvg.toFixed(2)
  849. }
  850. }
  851. Rectangle {
  852. x: 0
  853. y: 220
  854. width: parent.width
  855. height: 30
  856. border.width: 1
  857. border.color: "lightgrey"
  858. radius: 5
  859. Text {
  860. font.pixelSize: 14
  861. anchors.centerIn: parent
  862. text: parent.parent.appInfo.cpuCur.toFixed(2)
  863. }
  864. }
  865. Rectangle {
  866. x: 0
  867. y: 250
  868. width: parent.width
  869. height: 30
  870. border.width: 1
  871. border.color: "lightgrey"
  872. radius: 5
  873. Text {
  874. font.pixelSize: 14
  875. anchors.centerIn: parent
  876. text: parent.parent.appInfo.vmRSS
  877. }
  878. }
  879. Rectangle {
  880. x: 0
  881. y: 280
  882. width: parent.width
  883. height: 30
  884. border.width: 1
  885. border.color: "lightgrey"
  886. radius: 5
  887. Text {
  888. font.pixelSize: 14
  889. anchors.centerIn: parent
  890. text: parent.parent.appInfo.vmSize
  891. }
  892. }
  893. Rectangle {
  894. x: 0
  895. y: 330
  896. height: 30
  897. width: parent.width
  898. Button {
  899. text: "Pause"
  900. anchors.fill: parent
  901. onClicked: parent.parent.appInfo.pause()
  902. enabled: (parent.parent.appInfo.state !== QGfaAppCtrl.STATE_NOT_RUNNING) && (parent.parent.appInfo.state !== QGfaAppCtrl.STATE_PAUSED)
  903. }
  904. }
  905. Rectangle {
  906. x: 0
  907. y: 370
  908. height: 30
  909. width: parent.width
  910. Button {
  911. text: "Resume"
  912. anchors.fill: parent
  913. onClicked: parent.parent.appInfo.resume()
  914. enabled: (parent.parent.appInfo.state === QGfaAppCtrl.STATE_PAUSED)
  915. }
  916. }
  917. Rectangle {
  918. x: 0
  919. y: 410
  920. height: 30
  921. width: parent.width
  922. Button {
  923. text: "Stop"
  924. anchors.fill: parent
  925. onClicked: parent.parent.appInfo.stop()
  926. enabled: (parent.parent.appInfo.state !== QGfaAppCtrl.STATE_NOT_RUNNING)
  927. }
  928. }
  929. }
  930. /////////////////////////////////////////////////////////////////////////////////////////////////
  931. Rectangle {
  932. x: 660
  933. y: 20
  934. width: 120
  935. height: 460
  936. property var appInfo: qGfaAppCtrl.appInfo[QGfaAppCtrl.APP_INDEX_SYSINFO]
  937. Rectangle {
  938. x: 0
  939. y: 0
  940. width: parent.width
  941. height: 30
  942. Text {
  943. font.pixelSize: 18
  944. font.bold: true
  945. anchors.centerIn: parent
  946. text: parent.parent.appInfo.name
  947. }
  948. }
  949. Rectangle {
  950. x: 0
  951. y: 40
  952. width: parent.width
  953. height: 30
  954. border.width: 1
  955. border.color: "lightgrey"
  956. radius: 5
  957. color: stateColor(parent.appInfo.state)
  958. Text {
  959. font.pixelSize: 14
  960. font.bold: true
  961. anchors.centerIn: parent
  962. text: parent.parent.appInfo.stateText
  963. }
  964. }
  965. Rectangle {
  966. x: 0
  967. y: 70
  968. width: parent.width
  969. height: 30
  970. border.width: 1
  971. border.color: "lightgrey"
  972. radius: 5
  973. Text {
  974. font.pixelSize: 14
  975. anchors.centerIn: parent
  976. text: parent.parent.appInfo.cycCur
  977. }
  978. }
  979. Rectangle {
  980. x: 0
  981. y: 100
  982. width: parent.width
  983. height: 30
  984. border.width: 1
  985. border.color: "lightgrey"
  986. radius: 5
  987. Text {
  988. font.pixelSize: 14
  989. anchors.centerIn: parent
  990. text: parent.parent.appInfo.wktMax
  991. }
  992. }
  993. Rectangle {
  994. x: 0
  995. y: 130
  996. width: parent.width
  997. height: 30
  998. border.width: 1
  999. border.color: "black"
  1000. radius: 5
  1001. Text {
  1002. font.pixelSize: 14
  1003. anchors.centerIn: parent
  1004. text: parent.parent.appInfo.wktCur
  1005. }
  1006. }
  1007. Rectangle {
  1008. x: 0
  1009. y: 160
  1010. width: parent.width
  1011. height: 30
  1012. border.width: 1
  1013. border.color: "lightgrey"
  1014. radius: 5
  1015. Text {
  1016. font.pixelSize: 14
  1017. anchors.centerIn: parent
  1018. text: parent.parent.appInfo.cpuTime.toFixed(1)
  1019. }
  1020. }
  1021. Rectangle {
  1022. x: 0
  1023. y: 190
  1024. width: parent.width
  1025. height: 30
  1026. border.width: 1
  1027. border.color: "lightgrey"
  1028. radius: 5
  1029. Text {
  1030. font.pixelSize: 14
  1031. anchors.centerIn: parent
  1032. text: parent.parent.appInfo.cpuAvg.toFixed(2)
  1033. }
  1034. }
  1035. Rectangle {
  1036. x: 0
  1037. y: 220
  1038. width: parent.width
  1039. height: 30
  1040. border.width: 1
  1041. border.color: "lightgrey"
  1042. radius: 5
  1043. Text {
  1044. font.pixelSize: 14
  1045. anchors.centerIn: parent
  1046. text: parent.parent.appInfo.cpuCur.toFixed(2)
  1047. }
  1048. }
  1049. Rectangle {
  1050. x: 0
  1051. y: 250
  1052. width: parent.width
  1053. height: 30
  1054. border.width: 1
  1055. border.color: "lightgrey"
  1056. radius: 5
  1057. Text {
  1058. font.pixelSize: 14
  1059. anchors.centerIn: parent
  1060. text: parent.parent.appInfo.vmRSS
  1061. }
  1062. }
  1063. Rectangle {
  1064. x: 0
  1065. y: 280
  1066. width: parent.width
  1067. height: 30
  1068. border.width: 1
  1069. border.color: "lightgrey"
  1070. radius: 5
  1071. Text {
  1072. font.pixelSize: 14
  1073. anchors.centerIn: parent
  1074. text: parent.parent.appInfo.vmSize
  1075. }
  1076. }
  1077. Rectangle {
  1078. x: 0
  1079. y: 330
  1080. height: 30
  1081. width: parent.width
  1082. Button {
  1083. text: "Pause"
  1084. anchors.fill: parent
  1085. onClicked: parent.parent.appInfo.pause()
  1086. enabled: (parent.parent.appInfo.state !== QGfaAppCtrl.STATE_NOT_RUNNING) && (parent.parent.appInfo.state !== QGfaAppCtrl.STATE_PAUSED)
  1087. }
  1088. }
  1089. Rectangle {
  1090. x: 0
  1091. y: 370
  1092. height: 30
  1093. width: parent.width
  1094. Button {
  1095. text: "Resume"
  1096. anchors.fill: parent
  1097. onClicked: parent.parent.appInfo.resume()
  1098. enabled: (parent.parent.appInfo.state === QGfaAppCtrl.STATE_PAUSED)
  1099. }
  1100. }
  1101. Rectangle {
  1102. x: 0
  1103. y: 410
  1104. height: 30
  1105. width: parent.width
  1106. Button {
  1107. text: "Stop"
  1108. anchors.fill: parent
  1109. onClicked: parent.parent.appInfo.stop()
  1110. enabled: (parent.parent.appInfo.state !== QGfaAppCtrl.STATE_NOT_RUNNING)
  1111. }
  1112. }
  1113. }
  1114. }