bms_cell.py 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 utils.globalvar import SD
  6. from utils.qt import Signal
  7. class Win_Cell(Cell, MyFrame):
  8. cell_vol_signal = Signal(int)
  9. cell_temp_signal = Signal(int)
  10. jz_temp_signal = Signal(int)
  11. bcu_temp_signal = Signal(int)
  12. mos_temp_signal = Signal(int)
  13. def __init__(self, parent=None):
  14. super(Win_Cell, self).__init__(parent)
  15. self.setupUi(self)
  16. # if SD.CCU_TYPE == 1:
  17. self.btn_cell_vol.clicked.connect(self._cell_vol)
  18. self.btn_cell_temp.clicked.connect(self._cell_temp)
  19. self.btn_jz_temp.clicked.connect(self._jz_temp)
  20. self.btn_bcu_temp.clicked.connect(self._bcu_temp)
  21. def _cell_vol(self):
  22. self.cell_vol_signal.emit(0)
  23. def _cell_temp(self):
  24. self.cell_temp_signal.emit(1)
  25. def _jz_temp(self):
  26. self.jz_temp_signal.emit(2)
  27. def _bcu_temp(self):
  28. self.bcu_temp_signal.emit(3)
  29. def _mos_temp(self):
  30. self.mos_temp_signal.emit(4)