bms_record.py 822 B

1234567891011121314151617181920212223242526272829303132
  1. #!/usr/bin/env python
  2. # -*- encoding: utf-8 -*-
  3. from ui.record import Record
  4. from ui.own.frame_theme import MyFrame
  5. from utils.globalvar import SD
  6. from utils.qt import QFileDialog, Signal
  7. class Win_Record(Record, MyFrame):
  8. can_record_start_signal = Signal()
  9. can_record_stop_signal = Signal()
  10. def __init__(self, parent=None):
  11. super(Win_Record, self).__init__(parent)
  12. self.setupUi(self)
  13. self.save_record.clicked.connect(self._start)
  14. self.stop_record.clicked.connect(self._stop)
  15. def _start(self):
  16. self.can_record_start_signal.emit()
  17. def _stop(self):
  18. self.can_record_stop_signal.emit()
  19. def save_csv(self):
  20. return QFileDialog.getSaveFileName(self, "保存文件" if SD.SYSTEM_LANGUAGE == 0 else "Save File", SD.FILE_PATH, 'CSV(*.csv)')