double_ccu.py 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/usr/bin/env python
  2. # -*- encoding: utf-8 -*-
  3. from ui.own.frame_theme import MyFrame
  4. from utils.qt import QtWidgets, QtCore
  5. class DoubleCcu(MyFrame):
  6. def setupUi(self, DoubleCcu):
  7. self.double_ccu = MyFrame(DoubleCcu)
  8. self.double_ccu_layout = QtWidgets.QVBoxLayout(self.double_ccu)
  9. self.double_ccu_layout.setContentsMargins(0, 0, 0, 0)
  10. self.double_ccu_layout.setSpacing(0)
  11. self.double_ccu_top_widget = MyFrame(self.double_ccu)
  12. self.group_cell_box_layout = QtWidgets.QHBoxLayout(self.double_ccu_top_widget)
  13. self.on_line_ccu = QtWidgets.QLabel("在线簇数")
  14. self.group_cell_box_layout.addWidget(self.on_line_ccu)
  15. self.on_line_ccu_value = QtWidgets.QLabel("")
  16. self.group_cell_box_layout.addWidget(self.on_line_ccu_value)
  17. self.double_ccu_layout.addWidget(self.double_ccu_top_widget)
  18. self.double_ccu_under_widget = MyFrame(self.double_ccu)
  19. self.double_ccu_under_layout = QtWidgets.QHBoxLayout(self.double_ccu_under_widget)
  20. self.on_line_ccu_table = QtWidgets.QTableWidget(self.double_ccu_under_widget)
  21. self.on_line_ccu_table.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
  22. self.on_line_ccu_table.setColumnCount(15)
  23. self.on_line_ccu_table.verticalHeader().setVisible(False)
  24. self.on_line_ccu_table.verticalHeader().setHighlightSections(True)
  25. self.on_line_ccu_table.verticalHeader().setSectionResizeMode(QtWidgets.QHeaderView.Stretch)
  26. # self.on_line_ccu_table.horizontalHeader().setSectionResizeMode(QtWidgets.QHeaderView.Stretch)
  27. # self.on_line_ccu_table.horizontalHeader().setSectionResizeMode(0, QtWidgets.QHeaderView.ResizeToContents)
  28. self.on_line_ccu_table.setHorizontalHeaderLabels(["簇号", "运行状态", "总电压", "总电流", "SOC", "SOH", "SOE", "绝缘阻值", "最高单体电压", "最高单体电压编号", "最低单体电压", "最低单体电压编号", "最高单体温度", "最高单体温度编号", "最低单体温度", "最低单体温度编号"])
  29. self.on_line_ccu_table.setRowCount(20)
  30. self.double_ccu_under_layout.addWidget(self.on_line_ccu_table)
  31. self.double_ccu_layout.addWidget(self.double_ccu_under_widget)
  32. QtCore.QMetaObject.connectSlotsByName(DoubleCcu)