under_page.py 24 KB

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