double_ccu.py 2.3 KB

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