main.qml 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. import QtQuick 2.7
  2. import QtQuick.Window 2.2
  3. import com.gfa.ipc.appctrl 1.0
  4. Window {
  5. visible: true
  6. width: 640
  7. height: 480
  8. title: qsTr("GfA App Control")
  9. property var appInfoRem: qAppCtrl.appInfo[qAppCtrl.idxRemanent]
  10. property var appInfoRest: qAppCtrl.appInfo[qAppCtrl.idxRest]
  11. property var appInfoMqtt: qAppCtrl.appInfo[qAppCtrl.idxMqttCl]
  12. Text {
  13. x: 50
  14. y: 60
  15. width: 80
  16. height: 40
  17. font.pixelSize: 14
  18. text: appInfoRem.name
  19. }
  20. Text {
  21. x: 150
  22. y: 60
  23. width: 80
  24. height: 40
  25. font.pixelSize: 14
  26. text: appInfoRem.stateText
  27. }
  28. Rectangle
  29. {
  30. x: 250
  31. y: 50
  32. width: 90
  33. height: 40
  34. color: "lightgrey"
  35. Text {
  36. text: "Pause"
  37. font.pixelSize: 14
  38. anchors.centerIn: parent
  39. }
  40. MouseArea {
  41. anchors.fill: parent
  42. onClicked: appInfoRem.pause()
  43. }
  44. }
  45. Rectangle
  46. {
  47. x: 350
  48. y: 50
  49. width: 90
  50. height: 40
  51. color: "lightgrey"
  52. Text {
  53. text: "Resume"
  54. font.pixelSize: 14
  55. anchors.centerIn: parent
  56. }
  57. MouseArea {
  58. anchors.fill: parent
  59. onClicked: appInfoRem.resume()
  60. }
  61. }
  62. Rectangle
  63. {
  64. x: 450
  65. y: 50
  66. width: 90
  67. height: 40
  68. color: "lightgrey"
  69. Text {
  70. text: "Stop"
  71. font.pixelSize: 14
  72. anchors.centerIn: parent
  73. }
  74. MouseArea {
  75. anchors.fill: parent
  76. onClicked: appInfoRem.stop()
  77. }
  78. }
  79. Text {
  80. x: 550
  81. y: 60
  82. width: 80
  83. height: 40
  84. font.pixelSize: 14
  85. text: appInfoRem.cycMin
  86. }
  87. Text {
  88. x: 650
  89. y: 60
  90. width: 80
  91. height: 40
  92. font.pixelSize: 14
  93. text: appInfoRem.cycMax
  94. }
  95. ////////////////////////////////////////////////////////////
  96. Text {
  97. x: 50
  98. y: 110
  99. width: 80
  100. height: 40
  101. font.pixelSize: 14
  102. text: appInfoRest.name
  103. }
  104. Text {
  105. x: 150
  106. y: 110
  107. width: 80
  108. height: 40
  109. font.pixelSize: 14
  110. text: appInfoRest.stateText
  111. }
  112. Rectangle
  113. {
  114. x: 250
  115. y: 100
  116. width: 90
  117. height: 40
  118. color: "lightgrey"
  119. Text {
  120. text: "Pause"
  121. font.pixelSize: 14
  122. anchors.centerIn: parent
  123. }
  124. MouseArea {
  125. anchors.fill: parent
  126. onClicked: appInfoRest.pause()
  127. }
  128. }
  129. Rectangle
  130. {
  131. x: 350
  132. y: 100
  133. width: 90
  134. height: 40
  135. color: "lightgrey"
  136. Text {
  137. text: "Resume"
  138. font.pixelSize: 14
  139. anchors.centerIn: parent
  140. }
  141. MouseArea {
  142. anchors.fill: parent
  143. onClicked: appInfoRest.resume()
  144. }
  145. }
  146. Rectangle
  147. {
  148. x: 450
  149. y: 100
  150. width: 90
  151. height: 40
  152. color: "lightgrey"
  153. Text {
  154. text: "Stop"
  155. font.pixelSize: 14
  156. anchors.centerIn: parent
  157. }
  158. MouseArea {
  159. anchors.fill: parent
  160. onClicked: appInfoRest.stop()
  161. }
  162. }
  163. Text {
  164. x: 550
  165. y: 110
  166. width: 80
  167. height: 40
  168. font.pixelSize: 14
  169. text: appInfoRest.cycMin
  170. }
  171. Text {
  172. x: 650
  173. y: 110
  174. width: 80
  175. height: 40
  176. font.pixelSize: 14
  177. text: appInfoRest.cycMax
  178. }
  179. ////////////////////////////////////////////////////////////
  180. Text {
  181. x: 50
  182. y: 160
  183. width: 80
  184. height: 40
  185. font.pixelSize: 14
  186. text: appInfoMqtt.name
  187. }
  188. Text {
  189. x: 150
  190. y: 160
  191. width: 80
  192. height: 40
  193. font.pixelSize: 14
  194. text: appInfoMqtt.stateText
  195. }
  196. Rectangle
  197. {
  198. x: 250
  199. y: 150
  200. width: 90
  201. height: 40
  202. color: "lightgrey"
  203. Text {
  204. text: "Pause"
  205. font.pixelSize: 14
  206. anchors.centerIn: parent
  207. }
  208. MouseArea {
  209. anchors.fill: parent
  210. onClicked: appInfoMqtt.pause()
  211. }
  212. }
  213. Rectangle
  214. {
  215. x: 350
  216. y: 150
  217. width: 90
  218. height: 40
  219. color: "lightgrey"
  220. Text {
  221. text: "Resume"
  222. font.pixelSize: 14
  223. anchors.centerIn: parent
  224. }
  225. MouseArea {
  226. anchors.fill: parent
  227. onClicked: appInfoMqtt.resume()
  228. }
  229. }
  230. Rectangle
  231. {
  232. x: 450
  233. y: 150
  234. width: 90
  235. height: 40
  236. color: "lightgrey"
  237. Text {
  238. text: "Stop"
  239. font.pixelSize: 14
  240. anchors.centerIn: parent
  241. }
  242. MouseArea {
  243. anchors.fill: parent
  244. onClicked: appInfoMqtt.stop()
  245. }
  246. }
  247. Text {
  248. x: 550
  249. y: 160
  250. width: 80
  251. height: 40
  252. font.pixelSize: 14
  253. text: appInfoMqtt.cycMin
  254. }
  255. Text {
  256. x: 650
  257. y: 160
  258. width: 80
  259. height: 40
  260. font.pixelSize: 14
  261. text: appInfoMqtt.cycMax
  262. }
  263. ////////////////////////////////////////////////////////////
  264. Rectangle
  265. {
  266. x: 50
  267. y: 400
  268. width: 90
  269. height: 40
  270. color: "lightgrey"
  271. Text {
  272. text: "Quit"
  273. font.pixelSize: 14
  274. anchors.centerIn: parent
  275. }
  276. MouseArea {
  277. anchors.fill: parent
  278. onClicked: Qt.quit()
  279. }
  280. }
  281. }