ReportClocks.py 1.1 KB

1234567891011121314151617181920212223242526
  1. import threading
  2. from PySide2.QtWidgets import *
  3. from PySide2.QtCore import *
  4. from PySide2.QtGui import *
  5. from ui.ui_ReportClocks import Ui_ReportClocks
  6. class ReportClocks(Ui_ReportClocks, QDialog):
  7. def __init__(self, mainWindow) -> None:
  8. super().__init__(mainWindow)
  9. self.setupUi(self)
  10. self.btn_ok.clicked.connect(self.report_clocks)
  11. self.mainWindow = mainWindow
  12. self.move(mainWindow.x()+(mainWindow.width()-self.width())/2,mainWindow.y()+(mainWindow.height()-self.height())/2)
  13. # 调整对话框大小以适应内容
  14. self.adjustSize()
  15. def report_clocks(self):
  16. start = self.start_point.text()
  17. end = self.end_point.text()
  18. exclude = self.exclude.text()
  19. autogen = self.auto_include.isChecked()
  20. include_async = self.include_ascync.isChecked()
  21. # ReportClocks(self, start, end, exclude, autogen, include_async):
  22. thread = threading.Thread(target=self.mainWindow.GUI.ReportClocks, args=(start, end, exclude, autogen, include_async))
  23. thread.start()
  24. self.close()