center_page.py 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  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 CenterPage(QtWidgets.QWidget):
  8. def __init__(self, parent=None):
  9. super(CenterPage, 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.center_widget = MyFrame(self)
  17. self.center_layout = QtWidgets.QVBoxLayout(self.center_widget)
  18. self.center_layout.setContentsMargins(0, 0, 0, 0)
  19. self.center_layout.setSpacing(0)
  20. self.center_groupbox = QtWidgets.QGroupBox(self.center_widget)
  21. self.center_groupbox.setTitle("告警信息" if SD.SYSTEM_LANGUAGE == 0 else "Warn")
  22. self.center_groupbox_layout = QtWidgets.QHBoxLayout(self.center_groupbox)
  23. self.center_qscrollarea = QtWidgets.QScrollArea(self.center_groupbox)
  24. self.center_qscrollarea.setWidgetResizable(True)
  25. self.center_groupbox_layout.addWidget(self.center_qscrollarea,9)
  26. self.center_qwidget = QtWidgets.QWidget()
  27. self.center_qscrollarea.setWidget(self.center_qwidget)
  28. self.center_qscrollarea_layout = QtWidgets.QGridLayout(self.center_qwidget)
  29. self.center_qscrollarea_layout.setObjectName("scrollLayout")
  30. self.center_qscrollarea_layout.setContentsMargins(0, 0, 0, 0)
  31. self.center_qscrollarea_layout.setSpacing(0)
  32. self.over_cell_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  33. self.over_cell_warn.setText("单体过压告警" if SD.SYSTEM_LANGUAGE == 0 else "Warn")
  34. self.over_cell_warn.setAlignment(Qt.AlignCenter)
  35. self.over_cell_warn.setReadOnly(True)
  36. set_edt_bg(self.over_cell_warn, QColor(Qt.gray))
  37. self.center_qscrollarea_layout.addWidget(self.over_cell_warn, 0, 0, 1, 1)
  38. self.under_cell_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  39. self.under_cell_warn.setText("单体欠压告警")
  40. self.under_cell_warn.setAlignment(Qt.AlignCenter)
  41. self.under_cell_warn.setReadOnly(True)
  42. set_edt_bg(self.under_cell_warn, QColor(Qt.gray))
  43. self.center_qscrollarea_layout.addWidget(self.under_cell_warn, 0, 1, 1, 1)
  44. self.hv_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  45. self.hv_warn.setText("总压过压告警")
  46. self.hv_warn.setAlignment(Qt.AlignCenter)
  47. self.hv_warn.setReadOnly(True)
  48. set_edt_bg(self.hv_warn, QColor(Qt.gray))
  49. self.center_qscrollarea_layout.addWidget(self.hv_warn, 0, 2, 1, 1)
  50. self.lv_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  51. self.lv_warn.setText("总压欠压告警")
  52. self.lv_warn.setAlignment(Qt.AlignCenter)
  53. self.lv_warn.setReadOnly(True)
  54. set_edt_bg(self.lv_warn, QColor(Qt.gray))
  55. self.center_qscrollarea_layout.addWidget(self.lv_warn, 0, 3, 1, 1)
  56. self.chg_lt_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  57. self.chg_lt_warn.setText("充电低温告警")
  58. self.chg_lt_warn.setAlignment(Qt.AlignCenter)
  59. self.chg_lt_warn.setReadOnly(True)
  60. set_edt_bg(self.chg_lt_warn, QColor(Qt.gray))
  61. self.center_qscrollarea_layout.addWidget(self.chg_lt_warn, 0, 4, 1, 1)
  62. self.chg_ht_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  63. self.chg_ht_warn.setText("充电高温告警")
  64. self.chg_ht_warn.setAlignment(Qt.AlignCenter)
  65. self.chg_ht_warn.setReadOnly(True)
  66. set_edt_bg(self.chg_ht_warn, QColor(Qt.gray))
  67. self.center_qscrollarea_layout.addWidget(self.chg_ht_warn, 0, 5, 1, 1)
  68. self.dchg_ht_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  69. self.dchg_ht_warn.setText("放电高温告警")
  70. self.dchg_ht_warn.setAlignment(Qt.AlignCenter)
  71. self.dchg_ht_warn.setReadOnly(True)
  72. set_edt_bg(self.dchg_ht_warn, QColor(Qt.gray))
  73. self.center_qscrollarea_layout.addWidget(self.dchg_ht_warn, 0, 6, 1, 1)
  74. self.dchg_lt_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  75. self.dchg_lt_warn.setText("放电低温告警")
  76. self.dchg_lt_warn.setAlignment(Qt.AlignCenter)
  77. self.dchg_lt_warn.setReadOnly(True)
  78. set_edt_bg(self.dchg_lt_warn, QColor(Qt.gray))
  79. self.center_qscrollarea_layout.addWidget(self.dchg_lt_warn, 0, 7, 1, 1)
  80. self.chg_hcur_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  81. self.chg_hcur_warn.setText("充电过流告警")
  82. self.chg_hcur_warn.setAlignment(Qt.AlignCenter)
  83. self.chg_hcur_warn.setReadOnly(True)
  84. set_edt_bg(self.chg_hcur_warn, QColor(Qt.gray))
  85. self.center_qscrollarea_layout.addWidget(self.chg_hcur_warn, 0, 8, 1, 1)
  86. self.dchg_hcur_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  87. self.dchg_hcur_warn.setText("放电过流告警")
  88. self.dchg_hcur_warn.setAlignment(Qt.AlignCenter)
  89. self.dchg_hcur_warn.setReadOnly(True)
  90. set_edt_bg(self.dchg_hcur_warn, QColor(Qt.gray))
  91. self.center_qscrollarea_layout.addWidget(self.dchg_hcur_warn, 0, 9, 1, 1)
  92. self.diff_cell_temp_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  93. self.diff_cell_temp_warn.setText("单体温差告警")
  94. self.diff_cell_temp_warn.setAlignment(Qt.AlignCenter)
  95. self.diff_cell_temp_warn.setReadOnly(True)
  96. set_edt_bg(self.diff_cell_temp_warn, QColor(Qt.gray))
  97. self.center_qscrollarea_layout.addWidget(self.diff_cell_temp_warn, 1, 0, 1, 1)
  98. self.diff_cell_vol_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  99. self.diff_cell_vol_warn.setText("单体压差告警")
  100. self.diff_cell_vol_warn.setAlignment(Qt.AlignCenter)
  101. self.diff_cell_vol_warn.setReadOnly(True)
  102. set_edt_bg(self.diff_cell_vol_warn, QColor(Qt.gray))
  103. self.center_qscrollarea_layout.addWidget(self.diff_cell_vol_warn, 1, 1, 1, 1)
  104. self.against_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  105. self.against_warn.setText("绝缘过低告警")
  106. self.against_warn.setAlignment(Qt.AlignCenter)
  107. self.against_warn.setReadOnly(True)
  108. set_edt_bg(self.against_warn, QColor(Qt.gray))
  109. self.center_qscrollarea_layout.addWidget(self.against_warn, 1, 2, 1, 1)
  110. self.p_against_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  111. self.p_against_warn.setText("正极绝缘过低告警")
  112. self.p_against_warn.setAlignment(Qt.AlignCenter)
  113. self.p_against_warn.setReadOnly(True)
  114. set_edt_bg(self.p_against_warn, QColor(Qt.gray))
  115. self.center_qscrollarea_layout.addWidget(self.p_against_warn, 1, 3, 1, 1)
  116. self.n_against_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  117. self.n_against_warn.setText("负极绝缘过低告警")
  118. self.n_against_warn.setAlignment(Qt.AlignCenter)
  119. self.n_against_warn.setReadOnly(True)
  120. set_edt_bg(self.n_against_warn, QColor(Qt.gray))
  121. self.center_qscrollarea_layout.addWidget(self.n_against_warn, 1, 4, 1, 1)
  122. self.against_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  123. self.against_fault.setText("绝缘监测故障")
  124. self.against_fault.setAlignment(Qt.AlignCenter)
  125. self.against_fault.setReadOnly(True)
  126. set_edt_bg(self.against_fault, QColor(Qt.gray))
  127. self.center_qscrollarea_layout.addWidget(self.against_fault, 1, 5, 1, 1)
  128. self.vol_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  129. self.vol_fault.setText("总压检测故障")
  130. self.vol_fault.setAlignment(Qt.AlignCenter)
  131. self.vol_fault.setReadOnly(True)
  132. set_edt_bg(self.vol_fault, QColor(Qt.gray))
  133. self.center_qscrollarea_layout.addWidget(self.vol_fault, 1, 6, 1, 1)
  134. self.cur_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  135. self.cur_fault.setText("电流检测故障")
  136. self.cur_fault.setAlignment(Qt.AlignCenter)
  137. self.cur_fault.setReadOnly(True)
  138. set_edt_bg(self.cur_fault, QColor(Qt.gray))
  139. self.center_qscrollarea_layout.addWidget(self.cur_fault, 1, 7, 1, 1)
  140. self.ccu_control_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  141. self.ccu_control_fault.setText("总控通讯故障")
  142. self.ccu_control_fault.setAlignment(Qt.AlignCenter)
  143. self.ccu_control_fault.setReadOnly(True)
  144. set_edt_bg(self.ccu_control_fault, QColor(Qt.gray))
  145. self.center_qscrollarea_layout.addWidget(self.ccu_control_fault, 1, 8, 1, 1)
  146. self.bmu_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  147. self.bmu_fault.setText("BMU通讯故障")
  148. self.bmu_fault.setAlignment(Qt.AlignCenter)
  149. self.bmu_fault.setReadOnly(True)
  150. set_edt_bg(self.bmu_fault, QColor(Qt.gray))
  151. self.center_qscrollarea_layout.addWidget(self.bmu_fault, 1, 9, 1, 1)
  152. self.stop_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  153. self.stop_fault.setText("急停")
  154. self.stop_fault.setAlignment(Qt.AlignCenter)
  155. self.stop_fault.setReadOnly(True)
  156. set_edt_bg(self.stop_fault, QColor(Qt.gray))
  157. self.center_qscrollarea_layout.addWidget(self.stop_fault, 2, 0, 1, 1)
  158. self.ntc_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  159. self.ntc_fault.setText("NTC故障")
  160. self.ntc_fault.setAlignment(Qt.AlignCenter)
  161. self.ntc_fault.setReadOnly(True)
  162. set_edt_bg(self.ntc_fault, QColor(Qt.gray))
  163. self.center_qscrollarea_layout.addWidget(self.ntc_fault, 2, 1, 1, 1)
  164. self.afe_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  165. self.afe_fault.setText("AFE失效")
  166. self.afe_fault.setAlignment(Qt.AlignCenter)
  167. self.afe_fault.setReadOnly(True)
  168. set_edt_bg(self.afe_fault, QColor(Qt.gray))
  169. self.center_qscrollarea_layout.addWidget(self.afe_fault, 2, 2, 1, 1)
  170. self.p_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  171. self.p_fault.setText("主正接触器故障")
  172. self.p_fault.setAlignment(Qt.AlignCenter)
  173. self.p_fault.setReadOnly(True)
  174. set_edt_bg(self.p_fault, QColor(Qt.gray))
  175. self.center_qscrollarea_layout.addWidget(self.p_fault, 2, 3, 1, 1)
  176. self.n_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  177. self.n_fault.setText("主负接触器故障")
  178. self.n_fault.setAlignment(Qt.AlignCenter)
  179. self.n_fault.setReadOnly(True)
  180. set_edt_bg(self.n_fault, QColor(Qt.gray))
  181. self.center_qscrollarea_layout.addWidget(self.n_fault, 2, 4, 1, 1)
  182. self.pre_chg_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  183. self.pre_chg_fault.setText("预充故障")
  184. self.pre_chg_fault.setAlignment(Qt.AlignCenter)
  185. self.pre_chg_fault.setReadOnly(True)
  186. set_edt_bg(self.pre_chg_fault, QColor(Qt.gray))
  187. self.center_qscrollarea_layout.addWidget(self.pre_chg_fault, 2, 5, 1, 1)
  188. self.center_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  189. self.center_fault.setText("中间接触器故障")
  190. self.center_fault.setAlignment(Qt.AlignCenter)
  191. self.center_fault.setReadOnly(True)
  192. set_edt_bg(self.center_fault, QColor(Qt.gray))
  193. self.center_qscrollarea_layout.addWidget(self.center_fault, 2, 6, 1, 1)
  194. self.dlq_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  195. self.dlq_fault.setText("断路器反馈故障")
  196. self.dlq_fault.setAlignment(Qt.AlignCenter)
  197. self.dlq_fault.setReadOnly(True)
  198. set_edt_bg(self.dlq_fault, QColor(Qt.gray))
  199. self.center_qscrollarea_layout.addWidget(self.dlq_fault, 2, 7, 1, 1)
  200. self.rdq_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  201. self.rdq_fault.setText("熔断器故障")
  202. self.rdq_fault.setAlignment(Qt.AlignCenter)
  203. self.rdq_fault.setReadOnly(True)
  204. set_edt_bg(self.rdq_fault, QColor(Qt.gray))
  205. self.center_qscrollarea_layout.addWidget(self.rdq_fault, 2, 8, 1, 1)
  206. self.cell_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  207. self.cell_fault.setText("电芯故障")
  208. self.cell_fault.setAlignment(Qt.AlignCenter)
  209. self.cell_fault.setReadOnly(True)
  210. set_edt_bg(self.cell_fault, QColor(Qt.gray))
  211. self.mos_ht_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  212. self.mos_ht_warn.setText("MOS温度过高告警")
  213. self.mos_ht_warn.setAlignment(Qt.AlignCenter)
  214. self.mos_ht_warn.setReadOnly(True)
  215. set_edt_bg(self.mos_ht_warn, QColor(Qt.gray))
  216. self.jz_ht_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  217. self.jz_ht_warn.setText("极柱温度过高告警")
  218. self.jz_ht_warn.setAlignment(Qt.AlignCenter)
  219. self.jz_ht_warn.setReadOnly(True)
  220. set_edt_bg(self.jz_ht_warn, QColor(Qt.gray))
  221. self.center_qscrollarea_layout.addWidget(self.jz_ht_warn, 3, 1, 1, 1)
  222. self.ccu_ht_warn = QtWidgets.QLineEdit(self.center_qscrollarea)
  223. self.ccu_ht_warn.setText("主控检测温度过高")
  224. self.ccu_ht_warn.setAlignment(Qt.AlignCenter)
  225. self.ccu_ht_warn.setReadOnly(True)
  226. set_edt_bg(self.ccu_ht_warn, QColor(Qt.gray))
  227. self.center_qscrollarea_layout.addWidget(self.ccu_ht_warn, 3, 2, 1, 1)
  228. self.fan_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  229. self.fan_fault.setText("风扇控制失效")
  230. self.fan_fault.setAlignment(Qt.AlignCenter)
  231. self.fan_fault.setReadOnly(True)
  232. set_edt_bg(self.fan_fault, QColor(Qt.gray))
  233. self.center_qscrollarea_layout.addWidget(self.fan_fault, 3, 3, 1, 1)
  234. self.temp_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  235. self.temp_fault.setText("热失控故障")
  236. self.temp_fault.setAlignment(Qt.AlignCenter)
  237. self.temp_fault.setReadOnly(True)
  238. set_edt_bg(self.temp_fault, QColor(Qt.gray))
  239. self.temp_up_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  240. self.temp_up_fault.setText("温升过高故障")
  241. self.temp_up_fault.setAlignment(Qt.AlignCenter)
  242. self.temp_up_fault.setReadOnly(True)
  243. set_edt_bg(self.temp_up_fault, QColor(Qt.gray))
  244. self.center_qscrollarea_layout.addWidget(self.temp_up_fault, 3, 5, 1, 1)
  245. self.cell_single_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  246. self.cell_single_fault.setText("单体断线故障")
  247. self.cell_single_fault.setAlignment(Qt.AlignCenter)
  248. self.cell_single_fault.setReadOnly(True)
  249. set_edt_bg(self.cell_single_fault, QColor(Qt.gray))
  250. self.ccu_hard_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  251. self.ccu_hard_fault.setText("主控硬件故障")
  252. self.ccu_hard_fault.setAlignment(Qt.AlignCenter)
  253. self.ccu_hard_fault.setReadOnly(True)
  254. set_edt_bg(self.ccu_hard_fault, QColor(Qt.gray))
  255. self.ccu_start_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  256. self.ccu_start_fault.setText("主控初始化故障")
  257. self.ccu_start_fault.setAlignment(Qt.AlignCenter)
  258. self.ccu_start_fault.setReadOnly(True)
  259. set_edt_bg(self.ccu_start_fault, QColor(Qt.gray))
  260. self.eeprom_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  261. self.eeprom_fault.setText("EEPROM故障")
  262. self.eeprom_fault.setAlignment(Qt.AlignCenter)
  263. self.eeprom_fault.setReadOnly(True)
  264. set_edt_bg(self.eeprom_fault, QColor(Qt.gray))
  265. self.soc_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  266. self.soc_fault.setText("SOC过低故障")
  267. self.soc_fault.setAlignment(Qt.AlignCenter)
  268. self.soc_fault.setReadOnly(True)
  269. set_edt_bg(self.soc_fault, QColor(Qt.gray))
  270. self.ccu_diff_vol_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  271. self.ccu_diff_vol_fault.setText("簇间压差故障")
  272. self.ccu_diff_vol_fault.setAlignment(Qt.AlignCenter)
  273. self.ccu_diff_vol_fault.setReadOnly(True)
  274. set_edt_bg(self.ccu_diff_vol_fault, QColor(Qt.gray))
  275. self.center_qscrollarea_layout.addWidget(self.ccu_diff_vol_fault, 4, 1, 1, 1)
  276. self.pcs_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  277. self.pcs_fault.setText("PCS通讯故障")
  278. self.pcs_fault.setAlignment(Qt.AlignCenter)
  279. self.pcs_fault.setReadOnly(True)
  280. set_edt_bg(self.pcs_fault, QColor(Qt.gray))
  281. self.jump_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  282. self.jump_fault.setText("跳机故障")
  283. self.jump_fault.setAlignment(Qt.AlignCenter)
  284. self.jump_fault.setReadOnly(True)
  285. set_edt_bg(self.jump_fault, QColor(Qt.gray))
  286. self.center_qscrollarea_layout.addWidget(self.jump_fault, 4, 3, 1, 1)
  287. self.chg_mos_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  288. self.chg_mos_fault.setText("充电MOS故障")
  289. self.chg_mos_fault.setAlignment(Qt.AlignCenter)
  290. self.chg_mos_fault.setReadOnly(True)
  291. set_edt_bg(self.chg_mos_fault, QColor(Qt.gray))
  292. self.dchg_mos_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  293. self.dchg_mos_fault.setText("放电MOS故障")
  294. self.dchg_mos_fault.setAlignment(Qt.AlignCenter)
  295. self.dchg_mos_fault.setReadOnly(True)
  296. set_edt_bg(self.dchg_mos_fault, QColor(Qt.gray))
  297. self.afe_high_temp_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  298. self.afe_high_temp_fault.setText("AFE高温告警")
  299. self.afe_high_temp_fault.setAlignment(Qt.AlignCenter)
  300. self.afe_high_temp_fault.setReadOnly(True)
  301. set_edt_bg(self.afe_high_temp_fault, QColor(Qt.gray))
  302. self.bcu_hard_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  303. self.bcu_hard_fault.setText("从控硬件故障")
  304. self.bcu_hard_fault.setAlignment(Qt.AlignCenter)
  305. self.bcu_hard_fault.setReadOnly(True)
  306. set_edt_bg(self.bcu_hard_fault, QColor(Qt.gray))
  307. self.glkg_fault = QtWidgets.QLineEdit(self.center_qscrollarea)
  308. self.glkg_fault.setText("隔离开关故障")
  309. self.glkg_fault.setAlignment(Qt.AlignCenter)
  310. self.glkg_fault.setReadOnly(True)
  311. set_edt_bg(self.glkg_fault, QColor(Qt.gray))
  312. if SD.CCU_TYPE == 1:
  313. self.chg_mos_fault.setHidden(True)
  314. self.dchg_mos_fault.setHidden(True)
  315. self.mos_ht_warn.setHidden(True)
  316. self.center_qscrollarea_layout.addWidget(self.cell_fault, 2, 9, 1, 1)
  317. self.center_qscrollarea_layout.addWidget(self.glkg_fault, 3, 0, 1, 1)
  318. self.center_qscrollarea_layout.addWidget(self.temp_fault, 3, 4, 1, 1)
  319. self.center_qscrollarea_layout.addWidget(self.temp_up_fault, 3, 5, 1, 1)
  320. self.center_qscrollarea_layout.addWidget(self.cell_single_fault, 3, 6, 1, 1)
  321. self.center_qscrollarea_layout.addWidget(self.ccu_hard_fault, 3, 7, 1, 1)
  322. self.center_qscrollarea_layout.addWidget(self.ccu_start_fault, 3, 8, 1, 1)
  323. self.center_qscrollarea_layout.addWidget(self.eeprom_fault, 3, 9, 1, 1)
  324. self.center_qscrollarea_layout.addWidget(self.soc_fault, 4, 0, 1, 1)
  325. self.center_qscrollarea_layout.addWidget(self.pcs_fault, 4, 2, 1, 1)
  326. self.center_qscrollarea_layout.addWidget(self.afe_high_temp_fault, 4, 4, 1, 1)
  327. self.center_qscrollarea_layout.addWidget(self.bcu_hard_fault, 4, 5, 1, 1)
  328. else:
  329. self.jump_fault.setHidden(True)
  330. self.ccu_diff_vol_fault.setHidden(True)
  331. self.bcu_hard_fault.setHidden(True)
  332. self.glkg_fault.setHidden(True)
  333. self.center_qscrollarea_layout.addWidget(self.mos_ht_warn, 1, 8, 1, 1)
  334. self.center_qscrollarea_layout.addWidget(self.temp_up_fault, 1, 9, 1, 1)
  335. self.center_qscrollarea_layout.addWidget(self.pre_chg_fault, 2, 3, 1, 1)
  336. self.center_qscrollarea_layout.addWidget(self.chg_mos_fault, 2, 4, 1, 1)
  337. self.center_qscrollarea_layout.addWidget(self.dchg_mos_fault, 2, 5, 1, 1)
  338. self.center_qscrollarea_layout.addWidget(self.temp_fault, 2, 6, 1, 1)
  339. self.center_qscrollarea_layout.addWidget(self.cell_single_fault, 2, 7, 1, 1)
  340. self.center_qscrollarea_layout.addWidget(self.ccu_hard_fault, 2, 8, 1, 1)
  341. self.center_qscrollarea_layout.addWidget(self.ccu_start_fault, 2, 9, 1, 1)
  342. self.center_qscrollarea_layout.addWidget(self.eeprom_fault, 3, 0, 1, 1)
  343. self.center_qscrollarea_layout.addWidget(self.cell_fault, 3, 1, 1, 1)
  344. self.center_qscrollarea_layout.addWidget(self.soc_fault, 3, 2, 1, 1)
  345. self.center_qscrollarea_layout.addWidget(self.pcs_fault, 3, 3, 1, 1)
  346. self.center_qscrollarea_layout.addWidget(self.afe_high_temp_fault, 3, 4, 1, 1)
  347. self.center_right_widget = QtWidgets.QWidget(self.center_groupbox)
  348. self.center_right_layout = QtWidgets.QGridLayout(self.center_right_widget)
  349. self.normal = QtWidgets.QLineEdit(self.center_qscrollarea)
  350. self.normal.setAlignment(Qt.AlignCenter)
  351. self.normal.setReadOnly(True)
  352. set_edt_bg(self.normal, QColor(Qt.gray))
  353. self.center_right_layout.addWidget(self.normal, 0, 0, 1, 1)
  354. self.lb_normal = QtWidgets.QLabel(self.center_qscrollarea)
  355. self.lb_normal.setAlignment(Qt.AlignCenter)
  356. self.lb_normal.setText("正常")
  357. self.center_right_layout.addWidget(self.lb_normal, 0, 1, 1, 1)
  358. self.third = QtWidgets.QLineEdit(self.center_qscrollarea)
  359. self.third.setAlignment(Qt.AlignCenter)
  360. self.third.setReadOnly(True)
  361. set_edt_bg(self.third, QColor(Qt.yellow))
  362. self.center_right_layout.addWidget(self.third, 1, 0, 1, 1)
  363. self.lb_third = QtWidgets.QLabel(self.center_qscrollarea)
  364. self.lb_third.setAlignment(Qt.AlignCenter)
  365. self.lb_third.setText("三级告警")
  366. self.center_right_layout.addWidget(self.lb_third, 1, 1, 1, 1)
  367. self.second = QtWidgets.QLineEdit(self.center_qscrollarea)
  368. self.second.setAlignment(Qt.AlignCenter)
  369. self.second.setReadOnly(True)
  370. set_edt_bg(self.second, QColor(Qt.magenta))
  371. self.center_right_layout.addWidget(self.second, 2, 0, 1, 1)
  372. self.lb_second = QtWidgets.QLabel(self.center_qscrollarea)
  373. self.lb_second.setAlignment(Qt.AlignCenter)
  374. self.lb_second.setText("二级告警")
  375. self.center_right_layout.addWidget(self.lb_second, 2, 1, 1, 1)
  376. self.first = QtWidgets.QLineEdit(self.center_qscrollarea)
  377. self.first.setAlignment(Qt.AlignCenter)
  378. self.first.setReadOnly(True)
  379. set_edt_bg(self.first, QColor(Qt.red))
  380. self.center_right_layout.addWidget(self.first, 3, 0, 1, 1)
  381. self.lb_first = QtWidgets.QLabel(self.center_qscrollarea)
  382. self.lb_first.setAlignment(Qt.AlignCenter)
  383. self.lb_first.setText("一级告警/故障")
  384. self.center_right_layout.addWidget(self.lb_first, 3, 1, 1, 1)
  385. self.center_groupbox_layout.addWidget(self.center_right_widget, 1)
  386. self.center_layout.addWidget(self.center_groupbox)
  387. self.verticalLayout.addWidget(self.center_widget)