ReportClocks.py 1008 B

123456789101112131415161718192021222324
  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__()
  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. def report_clocks(self):
  14. start = self.start_point.text()
  15. end = self.end_point.text()
  16. exclude = self.exclude.text()
  17. autogen = self.auto_include.isChecked()
  18. include_async = self.include_ascync.isChecked()
  19. # ReportClocks(self, start, end, exclude, autogen, include_async):
  20. thread = threading.Thread(target=self.mainWindow.GUI.ReportClocks, args=(start, end, exclude, autogen, include_async))
  21. thread.start()
  22. self.close()