| 1234567891011121314151617181920212223242526 |
- import threading
- from PySide2.QtWidgets import *
- from PySide2.QtCore import *
- from PySide2.QtGui import *
- from ui.ui_ReportClocks import Ui_ReportClocks
- class ReportClocks(Ui_ReportClocks, QDialog):
- def __init__(self, mainWindow) -> None:
- super().__init__(mainWindow)
- self.setupUi(self)
- self.btn_ok.clicked.connect(self.report_clocks)
- self.mainWindow = mainWindow
- self.move(mainWindow.x()+(mainWindow.width()-self.width())/2,mainWindow.y()+(mainWindow.height()-self.height())/2)
- # 调整对话框大小以适应内容
- self.adjustSize()
- def report_clocks(self):
- start = self.start_point.text()
- end = self.end_point.text()
- exclude = self.exclude.text()
- autogen = self.auto_include.isChecked()
- include_async = self.include_ascync.isChecked()
- # ReportClocks(self, start, end, exclude, autogen, include_async):
- thread = threading.Thread(target=self.mainWindow.GUI.ReportClocks, args=(start, end, exclude, autogen, include_async))
- thread.start()
- self.close()
|