bms_cell.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/usr/bin/env python
  2. # -*- encoding: utf-8 -*-
  3. from ui.cell import Cell
  4. from ui.own.frame_theme import MyFrame
  5. from ui.own.my_chart_view import MyChartView
  6. from utils.globalvar import SD
  7. from utils.qt import QLineSeries, QChart, QValueAxis, QHBoxLayout, QPainter, Qt, Signal, Slot, QLegendMarker
  8. class Win_Cell(Cell, MyFrame):
  9. cell_vol_signal = Signal(int)
  10. cell_temp_signal = Signal(int)
  11. jz_temp_signal = Signal(int)
  12. bcu_temp_signal = Signal(int)
  13. mos_temp_signal = Signal(int)
  14. def __init__(self, parent=None):
  15. super(Win_Cell, self).__init__(parent)
  16. self.setupUi(self)
  17. # if SD.CCU_TYPE == 1:
  18. self.btn_cell_vol.clicked.connect(self._cell_vol)
  19. self.btn_cell_temp.clicked.connect(self._cell_temp)
  20. self.btn_jz_temp.clicked.connect(self._jz_temp)
  21. self.btn_bcu_temp.clicked.connect(self._bcu_temp)
  22. def _cell_vol(self):
  23. self.cell_vol_signal.emit(0)
  24. def _cell_temp(self):
  25. self.cell_temp_signal.emit(1)
  26. def _jz_temp(self):
  27. self.jz_temp_signal.emit(2)
  28. def _bcu_temp(self):
  29. self.bcu_temp_signal.emit(3)
  30. def _mos_temp(self):
  31. self.mos_temp_signal.emit(4)