under_page.py 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470
  1. #!/usr/bin/env python
  2. # -*- encoding: utf-8 -*-
  3. import os
  4. from ui.own.frame_theme import MyFrame
  5. from ui.own.palette_theme import set_edt_bg
  6. from utils.qt import QtWidgets, Qt, QColor
  7. from utils.globalvar import SD
  8. class UnderPage(QtWidgets.QWidget):
  9. def __init__(self, parent=None):
  10. super(UnderPage, self).__init__(parent)
  11. self.initUI()
  12. def initUI(self):
  13. self.verticalLayout = QtWidgets.QVBoxLayout(self)
  14. self.verticalLayout.setContentsMargins(0, 0, 0, 0)
  15. self.verticalLayout.setSpacing(0)
  16. # 设置参数
  17. self.under_widget = MyFrame(self)
  18. self.under_layout = QtWidgets.QHBoxLayout(self.under_widget)
  19. self.under_layout.setContentsMargins(0, 0, 0, 0)
  20. self.under_layout.setSpacing(0)
  21. self.under_left_groupbox = QtWidgets.QGroupBox(self.under_widget)
  22. self.under_left_groupbox.setTitle("运行状态")
  23. self.under_left_groupbox_layout = QtWidgets.QGridLayout(self.under_left_groupbox)
  24. self.lb_status = QtWidgets.QLabel("(灰色:断开/状态不成立 绿色:闭合/状态成立 红色:禁止)")
  25. self.under_left_groupbox_layout.addWidget(self.lb_status, 0, 0, 1, 5)
  26. self.sys_status = QtWidgets.QLineEdit(self.under_left_groupbox)
  27. self.sys_status.setText("系统状态")
  28. self.sys_status.setAlignment(Qt.AlignCenter)
  29. self.sys_status.setReadOnly(True)
  30. set_edt_bg(self.sys_status, QColor("#99CC99"))
  31. self.under_left_groupbox_layout.addWidget(self.sys_status, 1, 0)
  32. # spacerItem1 = QtWidgets.QSpacerItem(30, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
  33. # self.under_left_groupbox_layout.addItem(spacerItem1)
  34. self.sys_status_no = QtWidgets.QLineEdit(self.under_left_groupbox)
  35. self.sys_status_no.setText("上电")
  36. self.sys_status_no.setAlignment(Qt.AlignCenter)
  37. self.sys_status_no.setReadOnly(True)
  38. set_edt_bg(self.sys_status_no, QColor(Qt.gray))
  39. self.under_left_groupbox_layout.addWidget(self.sys_status_no, 1, 1)
  40. self.sys_status_high_no = QtWidgets.QLineEdit(self.under_left_groupbox)
  41. self.sys_status_high_no.setText("待机")
  42. self.sys_status_high_no.setAlignment(Qt.AlignCenter)
  43. self.sys_status_high_no.setReadOnly(True)
  44. set_edt_bg(self.sys_status_high_no, QColor(Qt.gray))
  45. self.under_left_groupbox_layout.addWidget(self.sys_status_high_no, 1, 2)
  46. # self.sys_status_high_no = QtWidgets.QLineEdit(self.under_left_groupbox)
  47. # self.sys_status_high_no.setText("高压待机")
  48. # self.sys_status_high_no.setAlignment(Qt.AlignCenter)
  49. # self.sys_status_high_no.setReadOnly(True)
  50. # set_edt_bg(self.sys_status_high_no, QColor(Qt.gray))
  51. # self.under_left_groupbox_layout.addWidget(self.sys_status_high_no, 1, 7, 1, 2)
  52. self.sys_status_chg = QtWidgets.QLineEdit(self.under_left_groupbox)
  53. self.sys_status_chg.setText("充电")
  54. self.sys_status_chg.setAlignment(Qt.AlignCenter)
  55. self.sys_status_chg.setReadOnly(True)
  56. set_edt_bg(self.sys_status_chg, QColor(Qt.gray))
  57. self.under_left_groupbox_layout.addWidget(self.sys_status_chg, 1, 3)
  58. self.sys_status_dchg = QtWidgets.QLineEdit(self.under_left_groupbox)
  59. self.sys_status_dchg.setText("放电")
  60. self.sys_status_dchg.setAlignment(Qt.AlignCenter)
  61. self.sys_status_dchg.setReadOnly(True)
  62. set_edt_bg(self.sys_status_dchg, QColor(Qt.gray))
  63. self.under_left_groupbox_layout.addWidget(self.sys_status_dchg, 1, 4)
  64. self.sys_status_stop = QtWidgets.QLineEdit(self.under_left_groupbox)
  65. self.sys_status_stop.setText("停机")
  66. self.sys_status_stop.setAlignment(Qt.AlignCenter)
  67. self.sys_status_stop.setReadOnly(True)
  68. set_edt_bg(self.sys_status_stop, QColor(Qt.gray))
  69. self.under_left_groupbox_layout.addWidget(self.sys_status_stop, 1, 5)
  70. self.sys_status_sleep = QtWidgets.QLineEdit(self.under_left_groupbox)
  71. self.sys_status_sleep.setText("休眠")
  72. self.sys_status_sleep.setAlignment(Qt.AlignCenter)
  73. self.sys_status_sleep.setReadOnly(True)
  74. set_edt_bg(self.sys_status_sleep, QColor(Qt.gray))
  75. self.under_left_groupbox_layout.addWidget(self.sys_status_sleep, 1, 6)
  76. # self.sys_status_nononono = QtWidgets.QLabel(" ")
  77. # self.under_left_groupbox_layout.addWidget(self.sys_status_nononono, 0, 9, 1, 1)
  78. # spacerItem2 = QtWidgets.QSpacerItem(30, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
  79. # self.under_left_groupbox_layout.addItem(spacerItem2)
  80. # self.up_and_down = QtWidgets.QLineEdit(self.under_left_groupbox)
  81. # self.up_and_down.setText("指令")
  82. # self.up_and_down.setAlignment(Qt.AlignCenter)
  83. # self.up_and_down.setReadOnly(True)
  84. # set_edt_bg(self.up_and_down, QColor("#99CC99"))
  85. # self.under_left_groupbox_layout.addWidget(self.up_and_down, 2, 0, 1, 2)
  86. # spacerItem2 = QtWidgets.QSpacerItem(30, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
  87. # self.under_left_groupbox_layout.addItem(spacerItem2)
  88. # self.sys_up = QtWidgets.QLineEdit(self.under_left_groupbox)
  89. # self.sys_up.setText("上电")
  90. # self.sys_up.setAlignment(Qt.AlignCenter)
  91. # self.sys_up.setReadOnly(True)
  92. # set_edt_bg(self.sys_up, QColor(Qt.gray))
  93. # self.under_left_groupbox_layout.addWidget(self.sys_up, 2, 3, 1, 3)
  94. # self.sys_down = QtWidgets.QLineEdit(self.under_left_groupbox)
  95. # self.sys_down.setText("下电")
  96. # self.sys_down.setAlignment(Qt.AlignCenter)
  97. # self.sys_down.setReadOnly(True)
  98. # set_edt_bg(self.sys_down, QColor(Qt.gray))
  99. # self.under_left_groupbox_layout.addWidget(self.sys_down, 2, 6, 1, 3)
  100. # spacerItem2 = QtWidgets.QSpacerItem(30, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
  101. # self.under_left_groupbox_layout.addItem(spacerItem2)
  102. if SD.CCU_TYPE == 1:
  103. self.do_status = QtWidgets.QLineEdit(self.under_left_groupbox)
  104. self.do_status.setText("DO状态")
  105. self.do_status.setAlignment(Qt.AlignCenter)
  106. self.do_status.setReadOnly(True)
  107. set_edt_bg(self.do_status, QColor("#99CC99"))
  108. self.under_left_groupbox_layout.addWidget(self.do_status, 3, 0)
  109. spacerItem2 = QtWidgets.QSpacerItem(30, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
  110. self.under_left_groupbox_layout.addItem(spacerItem2)
  111. self.do_1 = QtWidgets.QLineEdit(self.under_left_groupbox)
  112. self.do_1.setText("主正接触器")
  113. self.do_1.setAlignment(Qt.AlignCenter)
  114. self.do_1.setReadOnly(True)
  115. set_edt_bg(self.do_1, QColor(Qt.gray))
  116. self.under_left_groupbox_layout.addWidget(self.do_1, 3, 1)
  117. self.do_2 = QtWidgets.QLineEdit(self.under_left_groupbox)
  118. self.do_2.setText("主负接触器")
  119. self.do_2.setAlignment(Qt.AlignCenter)
  120. self.do_2.setReadOnly(True)
  121. set_edt_bg(self.do_2, QColor(Qt.gray))
  122. self.under_left_groupbox_layout.addWidget(self.do_2, 3, 2)
  123. self.do_3 = QtWidgets.QLineEdit(self.under_left_groupbox)
  124. self.do_3.setText("预充接触器")
  125. self.do_3.setAlignment(Qt.AlignCenter)
  126. self.do_3.setReadOnly(True)
  127. set_edt_bg(self.do_3, QColor(Qt.gray))
  128. self.under_left_groupbox_layout.addWidget(self.do_3, 3, 3)
  129. self.do_4 = QtWidgets.QLineEdit(self.under_left_groupbox)
  130. self.do_4.setText("中间接触器")
  131. self.do_4.setAlignment(Qt.AlignCenter)
  132. self.do_4.setReadOnly(True)
  133. set_edt_bg(self.do_4, QColor(Qt.gray))
  134. self.under_left_groupbox_layout.addWidget(self.do_4, 3, 4)
  135. self.do_5 = QtWidgets.QLineEdit(self.under_left_groupbox)
  136. self.do_5.setText("断路器控制")
  137. self.do_5.setAlignment(Qt.AlignCenter)
  138. self.do_5.setReadOnly(True)
  139. set_edt_bg(self.do_5, QColor(Qt.gray))
  140. self.under_left_groupbox_layout.addWidget(self.do_5, 4, 1)
  141. self.do_6 = QtWidgets.QLineEdit(self.under_left_groupbox)
  142. self.do_6.setText("DO6")
  143. self.do_6.setAlignment(Qt.AlignCenter)
  144. self.do_6.setReadOnly(True)
  145. set_edt_bg(self.do_6, QColor(Qt.gray))
  146. self.under_left_groupbox_layout.addWidget(self.do_6, 4, 2)
  147. self.do_7 = QtWidgets.QLineEdit(self.under_left_groupbox)
  148. self.do_7.setText("干接点1")
  149. self.do_7.setAlignment(Qt.AlignCenter)
  150. self.do_7.setReadOnly(True)
  151. set_edt_bg(self.do_7, QColor(Qt.gray))
  152. self.under_left_groupbox_layout.addWidget(self.do_7, 4, 3)
  153. self.do_8 = QtWidgets.QLineEdit(self.under_left_groupbox)
  154. self.do_8.setText("干接点2")
  155. self.do_8.setAlignment(Qt.AlignCenter)
  156. self.do_8.setReadOnly(True)
  157. set_edt_bg(self.do_8, QColor(Qt.gray))
  158. self.under_left_groupbox_layout.addWidget(self.do_8, 4, 4)
  159. self.di_status = QtWidgets.QLineEdit(self.under_left_groupbox)
  160. self.di_status.setText("DI状态")
  161. self.di_status.setAlignment(Qt.AlignCenter)
  162. self.di_status.setReadOnly(True)
  163. set_edt_bg(self.di_status, QColor("#99CC99"))
  164. self.under_left_groupbox_layout.addWidget(self.di_status, 5, 0)
  165. spacerItem2 = QtWidgets.QSpacerItem(30, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
  166. self.under_left_groupbox_layout.addItem(spacerItem2)
  167. self.di_1 = QtWidgets.QLineEdit(self.under_left_groupbox)
  168. self.di_1.setText("DI1")
  169. self.di_1.setAlignment(Qt.AlignCenter)
  170. self.di_1.setReadOnly(True)
  171. set_edt_bg(self.di_1, QColor(Qt.gray))
  172. self.under_left_groupbox_layout.addWidget(self.di_1, 5, 1)
  173. self.di_2 = QtWidgets.QLineEdit(self.under_left_groupbox)
  174. self.di_2.setText("DI2")
  175. self.di_2.setAlignment(Qt.AlignCenter)
  176. self.di_2.setReadOnly(True)
  177. set_edt_bg(self.di_2, QColor(Qt.gray))
  178. self.under_left_groupbox_layout.addWidget(self.di_2, 5, 2)
  179. self.di_3 = QtWidgets.QLineEdit(self.under_left_groupbox)
  180. self.di_3.setText("DI3")
  181. self.di_3.setAlignment(Qt.AlignCenter)
  182. self.di_3.setReadOnly(True)
  183. set_edt_bg(self.di_3, QColor(Qt.gray))
  184. self.under_left_groupbox_layout.addWidget(self.di_3, 5, 3)
  185. self.di_4 = QtWidgets.QLineEdit(self.under_left_groupbox)
  186. self.di_4.setText("DI4")
  187. self.di_4.setAlignment(Qt.AlignCenter)
  188. self.di_4.setReadOnly(True)
  189. set_edt_bg(self.di_4, QColor(Qt.gray))
  190. self.under_left_groupbox_layout.addWidget(self.di_4, 5, 4)
  191. self.di_5 = QtWidgets.QLineEdit(self.under_left_groupbox)
  192. self.di_5.setText("DI5")
  193. self.di_5.setAlignment(Qt.AlignCenter)
  194. self.di_5.setReadOnly(True)
  195. set_edt_bg(self.di_5, QColor(Qt.gray))
  196. self.under_left_groupbox_layout.addWidget(self.di_5, 6, 1)
  197. self.di_6 = QtWidgets.QLineEdit(self.under_left_groupbox)
  198. self.di_6.setText("DI6")
  199. self.di_6.setAlignment(Qt.AlignCenter)
  200. self.di_6.setReadOnly(True)
  201. set_edt_bg(self.di_6, QColor(Qt.gray))
  202. self.under_left_groupbox_layout.addWidget(self.di_6, 6, 2)
  203. self.di_7 = QtWidgets.QLineEdit(self.under_left_groupbox)
  204. self.di_7.setText("DI7")
  205. self.di_7.setAlignment(Qt.AlignCenter)
  206. self.di_7.setReadOnly(True)
  207. set_edt_bg(self.di_7, QColor(Qt.gray))
  208. self.under_left_groupbox_layout.addWidget(self.di_7, 6, 3)
  209. self.di_8 = QtWidgets.QLineEdit(self.under_left_groupbox)
  210. self.di_8.setText("DI8")
  211. self.di_8.setAlignment(Qt.AlignCenter)
  212. self.di_8.setReadOnly(True)
  213. set_edt_bg(self.di_8, QColor(Qt.gray))
  214. self.under_left_groupbox_layout.addWidget(self.di_8, 6, 4)
  215. else:
  216. # self.sys_sleep = QtWidgets.QLineEdit(self.under_left_groupbox)
  217. # self.sys_sleep.setText("休眠")
  218. # self.sys_sleep.setAlignment(Qt.AlignCenter)
  219. # self.sys_sleep.setReadOnly(True)
  220. # set_edt_bg(self.sys_sleep, QColor(Qt.gray))
  221. # self.under_left_groupbox_layout.addWidget(self.sys_sleep, 2, 9, 1, 3)
  222. self.mos_status = QtWidgets.QLineEdit(self.under_left_groupbox)
  223. self.mos_status.setText("MOS状态")
  224. self.mos_status.setAlignment(Qt.AlignCenter)
  225. self.mos_status.setReadOnly(True)
  226. set_edt_bg(self.mos_status, QColor("#99CC99"))
  227. self.under_left_groupbox_layout.addWidget(self.mos_status, 3, 0)
  228. spacerItem2 = QtWidgets.QSpacerItem(30, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
  229. self.under_left_groupbox_layout.addItem(spacerItem2)
  230. self.mos_chg = QtWidgets.QLineEdit(self.under_left_groupbox)
  231. self.mos_chg.setText("充电MOS")
  232. self.mos_chg.setAlignment(Qt.AlignCenter)
  233. self.mos_chg.setReadOnly(True)
  234. set_edt_bg(self.mos_chg, QColor(Qt.gray))
  235. self.under_left_groupbox_layout.addWidget(self.mos_chg, 3, 1)
  236. self.mos_dchg = QtWidgets.QLineEdit(self.under_left_groupbox)
  237. self.mos_dchg.setText("放电MOS")
  238. self.mos_dchg.setAlignment(Qt.AlignCenter)
  239. self.mos_dchg.setReadOnly(True)
  240. set_edt_bg(self.mos_dchg, QColor(Qt.gray))
  241. self.under_left_groupbox_layout.addWidget(self.mos_dchg, 3, 2)
  242. self.mos_pre = QtWidgets.QLineEdit(self.under_left_groupbox)
  243. self.mos_pre.setText("预充MOS")
  244. self.mos_pre.setAlignment(Qt.AlignCenter)
  245. self.mos_pre.setReadOnly(True)
  246. set_edt_bg(self.mos_pre, QColor(Qt.gray))
  247. self.under_left_groupbox_layout.addWidget(self.mos_pre, 3, 3)
  248. self.fjd_status = QtWidgets.QLineEdit(self.under_left_groupbox)
  249. self.fjd_status.setText("干接点状态")
  250. self.fjd_status.setAlignment(Qt.AlignCenter)
  251. self.fjd_status.setReadOnly(True)
  252. set_edt_bg(self.fjd_status, QColor("#99CC99"))
  253. self.under_left_groupbox_layout.addWidget(self.fjd_status, 5, 0)
  254. spacerItem2 = QtWidgets.QSpacerItem(30, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
  255. self.under_left_groupbox_layout.addItem(spacerItem2)
  256. self.fjd_1 = QtWidgets.QLineEdit(self.under_left_groupbox)
  257. self.fjd_1.setText("干接点1")
  258. self.fjd_1.setAlignment(Qt.AlignCenter)
  259. self.fjd_1.setReadOnly(True)
  260. set_edt_bg(self.fjd_1, QColor(Qt.gray))
  261. self.under_left_groupbox_layout.addWidget(self.fjd_1, 5, 1)
  262. self.fjd_2 = QtWidgets.QLineEdit(self.under_left_groupbox)
  263. self.fjd_2.setText("干接点2")
  264. self.fjd_2.setAlignment(Qt.AlignCenter)
  265. self.fjd_2.setReadOnly(True)
  266. set_edt_bg(self.fjd_2, QColor(Qt.gray))
  267. self.under_left_groupbox_layout.addWidget(self.fjd_2, 5, 2)
  268. self.chd_dsg_status = QtWidgets.QLineEdit(self.under_left_groupbox)
  269. self.chd_dsg_status.setText("标志位")
  270. self.chd_dsg_status.setAlignment(Qt.AlignCenter)
  271. self.chd_dsg_status.setReadOnly(True)
  272. set_edt_bg(self.chd_dsg_status, QColor("#99CC99"))
  273. self.under_left_groupbox_layout.addWidget(self.chd_dsg_status, 7, 0)
  274. spacerItem2 = QtWidgets.QSpacerItem(30, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
  275. self.under_left_groupbox_layout.addItem(spacerItem2)
  276. self.permit_chg = QtWidgets.QLineEdit(self.under_left_groupbox)
  277. self.permit_chg.setText("禁止充电")
  278. self.permit_chg.setAlignment(Qt.AlignCenter)
  279. self.permit_chg.setReadOnly(True)
  280. set_edt_bg(self.permit_chg, QColor(Qt.gray))
  281. self.under_left_groupbox_layout.addWidget(self.permit_chg, 7, 1)
  282. self.permit_dchg = QtWidgets.QLineEdit(self.under_left_groupbox)
  283. self.permit_dchg.setText("禁止放电")
  284. self.permit_dchg.setAlignment(Qt.AlignCenter)
  285. self.permit_dchg.setReadOnly(True)
  286. set_edt_bg(self.permit_dchg, QColor(Qt.gray))
  287. self.under_left_groupbox_layout.addWidget(self.permit_dchg, 7, 2)
  288. self.under_layout.addWidget(self.under_left_groupbox, 1)
  289. self.under_right_groupbox = QtWidgets.QGroupBox(self.under_widget)
  290. self.under_right_groupbox.setTitle("控制指令")
  291. self.under_right_groupbox_layout = QtWidgets.QGridLayout(self.under_right_groupbox)
  292. self.btn_up = QtWidgets.QPushButton("系统上电")
  293. self.under_right_groupbox_layout.addWidget(self.btn_up, 0, 0, 1, 2)
  294. self.btn_down = QtWidgets.QPushButton("系统下电")
  295. self.under_right_groupbox_layout.addWidget(self.btn_down, 0, 2, 1, 2)
  296. self.lb_snkz = QtWidgets.QLabel("使能控制")
  297. self.under_right_groupbox_layout.addWidget(self.lb_snkz, 0, 4, 1, 1)
  298. self.snkz_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  299. self.under_right_groupbox_layout.addWidget(self.snkz_check_box, 0, 5, 1, 1)
  300. self.lb_p = QtWidgets.QLabel("主正控制")
  301. self.p_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  302. self.lb_do7 = QtWidgets.QLabel("干接点1")
  303. self.do7_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  304. self.lb_n = QtWidgets.QLabel("主负控制")
  305. self.n_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  306. self.lb_do8 = QtWidgets.QLabel("干接点2")
  307. self.do8_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  308. self.lb_center = QtWidgets.QLabel("中间控制")
  309. self.center_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  310. self.lb_dlq = QtWidgets.QLabel("断路器控制")
  311. self.dlq_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  312. self.lb_do6 = QtWidgets.QLabel("DO6")
  313. self.do6_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  314. self.lb_chg_1 = QtWidgets.QLabel("充电控制")
  315. self.chg_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  316. self.lb_dchg_1 = QtWidgets.QLabel("放电控制")
  317. self.dchg_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  318. self.lb_gjd_1 = QtWidgets.QLabel("干接点1")
  319. self.gjd1_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  320. self.lb_gjd2_1 = QtWidgets.QLabel("干接点2")
  321. self.gjd2_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  322. if SD.CCU_TYPE == 1:
  323. self.chg_check_box.setHidden(True)
  324. self.dchg_check_box.setHidden(True)
  325. self.gjd1_check_box.setHidden(True)
  326. self.gjd2_check_box.setHidden(True)
  327. self.under_right_groupbox_layout.addWidget(self.lb_p, 1, 0, 1, 1)
  328. self.under_right_groupbox_layout.addWidget(self.p_check_box, 1, 1, 1, 1)
  329. self.under_right_groupbox_layout.addWidget(self.lb_n, 2, 0, 1, 1)
  330. self.under_right_groupbox_layout.addWidget(self.n_check_box, 2, 1, 1, 1)
  331. self.under_right_groupbox_layout.addWidget(self.lb_do7, 1, 3, 1, 1)
  332. self.under_right_groupbox_layout.addWidget(self.do7_check_box, 1, 4, 1, 1)
  333. self.under_right_groupbox_layout.addWidget(self.lb_do8, 2, 3, 1, 1)
  334. self.under_right_groupbox_layout.addWidget(self.do8_check_box, 2, 4, 1, 1)
  335. self.under_right_groupbox_layout.addWidget(self.lb_center, 4, 0, 1, 1)
  336. self.under_right_groupbox_layout.addWidget(self.center_check_box, 4, 1, 1, 1)
  337. self.under_right_groupbox_layout.addWidget(self.lb_dlq, 5, 0, 1, 1)
  338. self.under_right_groupbox_layout.addWidget(self.dlq_check_box, 5, 1, 1, 1)
  339. self.under_right_groupbox_layout.addWidget(self.lb_do6, 6, 0, 1, 1)
  340. self.under_right_groupbox_layout.addWidget(self.do6_check_box, 6, 1, 1, 1)
  341. else:
  342. self.p_check_box.setHidden(True)
  343. self.do7_check_box.setHidden(True)
  344. self.n_check_box.setHidden(True)
  345. self.do8_check_box.setHidden(True)
  346. self.center_check_box.setHidden(True)
  347. self.dlq_check_box.setHidden(True)
  348. self.do6_check_box.setHidden(True)
  349. self.under_right_groupbox_layout.addWidget(self.lb_chg_1, 1, 0, 1, 1)
  350. self.under_right_groupbox_layout.addWidget(self.chg_check_box, 1, 1, 1, 1)
  351. self.under_right_groupbox_layout.addWidget(self.lb_dchg_1, 2, 0, 1, 1)
  352. self.under_right_groupbox_layout.addWidget(self.dchg_check_box, 2, 1, 1, 1)
  353. self.under_right_groupbox_layout.addWidget(self.lb_gjd_1, 4, 0, 1, 1)
  354. self.under_right_groupbox_layout.addWidget(self.gjd1_check_box, 4, 1, 1, 1)
  355. self.under_right_groupbox_layout.addWidget(self.lb_gjd2_1, 5, 0, 1, 1)
  356. self.under_right_groupbox_layout.addWidget(self.gjd2_check_box, 5, 1, 1, 1)
  357. self.lb_fault = QtWidgets.QLabel("故障强制释放")
  358. self.under_right_groupbox_layout.addWidget(self.lb_fault, 1, 6, 1, 1)
  359. self.fault_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  360. self.under_right_groupbox_layout.addWidget(self.fault_check_box, 1, 7, 1, 1)
  361. self.lb_clear_balance = QtWidgets.QLabel("清空均衡时间")
  362. self.under_right_groupbox_layout.addWidget(self.lb_clear_balance, 1, 9, 1, 1)
  363. self.clear_balance_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  364. self.under_right_groupbox_layout.addWidget(self.clear_balance_check_box, 1, 10, 1, 1)
  365. self.lb_again = QtWidgets.QLabel("绝缘检测")
  366. self.under_right_groupbox_layout.addWidget(self.lb_again, 2, 6, 1, 1)
  367. self.again_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  368. self.under_right_groupbox_layout.addWidget(self.again_check_box, 2, 7, 1, 1)
  369. self.lb_fan = QtWidgets.QLabel("开启风扇")
  370. self.under_right_groupbox_layout.addWidget(self.lb_fan, 2, 9, 1, 1)
  371. self.fan_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  372. self.under_right_groupbox_layout.addWidget(self.fan_check_box, 2, 10, 1, 1)
  373. self.lb_pre = QtWidgets.QLabel("预充控制")
  374. self.under_right_groupbox_layout.addWidget(self.lb_pre, 3, 0, 1, 1)
  375. self.pre_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  376. self.under_right_groupbox_layout.addWidget(self.pre_check_box, 3, 1, 1, 1)
  377. self.lb_again_one = QtWidgets.QLabel("绝缘检测开启一次")
  378. self.under_right_groupbox_layout.addWidget(self.lb_again_one, 3, 6, 1, 1)
  379. self.again_one_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  380. self.under_right_groupbox_layout.addWidget(self.again_one_check_box, 3, 7, 1, 1)
  381. self.lb_chg = QtWidgets.QLabel("强制充电指令")
  382. self.under_right_groupbox_layout.addWidget(self.lb_chg, 4, 6, 1, 1)
  383. self.qiangzhi_chg_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  384. self.under_right_groupbox_layout.addWidget(self.qiangzhi_chg_check_box, 4, 7, 1, 1)
  385. self.lb_sleep = QtWidgets.QLabel("系统休眠指令")
  386. self.under_right_groupbox_layout.addWidget(self.lb_sleep, 5, 6, 1, 1)
  387. self.sleep_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  388. self.under_right_groupbox_layout.addWidget(self.sleep_check_box, 5, 7, 1, 1)
  389. self.lb_reset = QtWidgets.QLabel("系统复位指令")
  390. self.under_right_groupbox_layout.addWidget(self.lb_reset, 6, 6, 1, 1)
  391. self.reset_check_box = QtWidgets.QCheckBox(self.under_right_groupbox)
  392. self.under_right_groupbox_layout.addWidget(self.reset_check_box, 6, 7, 1, 1)
  393. self.under_layout.addWidget(self.under_right_groupbox, 1)
  394. self.verticalLayout.addWidget(self.under_widget)