diff --git a/bin/GUIWindows.py b/bin/GUIWindows.py index ac98ad8..81db739 100644 --- a/bin/GUIWindows.py +++ b/bin/GUIWindows.py @@ -9,7 +9,7 @@ from pathlib import Path from PySide6.QtUiTools import QUiLoader from PySide6.QtCore import Signal, QThread, QObject, QEventLoop, QTimer -from PySide6.QtWidgets import QApplication,QFileDialog +from PySide6.QtWidgets import QApplication, QFileDialog, QMessageBox from PySide6.QtGui import QTextCursor # 声明全局变量 @@ -65,6 +65,7 @@ class Window: self.ui.stopButton.clicked.connect(self.stop) self.ui.conn_Button.clicked.connect(self.conntest) self.ui.choosedir_Button.clicked.connect(self.choosedir) + self.ui.actionabout.triggered.connect(self.about) self.setup_thread() @@ -111,11 +112,10 @@ class Window: else: fileDataCreating.new() self.ui.startButton.setEnabled(True) - self.logger.info("*"*5 + "一次性任务执行完成" + "*"*5 ) + self.logger.info("*"*5 + "一次性任务执行完成" + "*"*5) else: self.conntest() - self.start_run_db() - + self.start_run_db() def stop(self): self.logger.info("点击了停止按钮") @@ -136,11 +136,11 @@ class Window: def choosedir(self): self.logger.info("点击了选择目录按钮") - dir_path = QFileDialog.getExistingDirectory(self.ui, "选择目录", "", QFileDialog.ShowDirsOnly) + dir_path = QFileDialog.getExistingDirectory( + self.ui, "选择目录", "", QFileDialog.ShowDirsOnly) self.ui.fileOutputText.setText(dir_path) self.logger.info("已经选择文件夹:{}".format(dir_path)) - def setup_thread(self): self.thread = FileThread() global_var.set_value('start_flag', True) @@ -153,7 +153,7 @@ class Window: self.setup_thread() self.thread.start() - def check_common(self,elemnet): + def check_common(self, elemnet): # 为空标红处理 elemnet.setStyleSheet("") if not elemnet.text(): @@ -163,7 +163,6 @@ class Window: return elemnet.text() - def check_file_input(self): self.check_flag = True # 获取界面输入 @@ -174,7 +173,8 @@ class Window: # 是否持续 file_dict['filecreating'] = self.ui.checkBox.isChecked() if file_dict['filecreating']: - file_dict['fileinsert'] = self.check_common(self.ui.fileInsertRowsText) + file_dict['fileinsert'] = self.check_common( + self.ui.fileInsertRowsText) file_dict['filedel'] = self.check_common(self.ui.fileDelRowsText) # 将值放到全局变量中 global_var.set_value('file_args', file_dict) @@ -201,3 +201,12 @@ class Window: def stop_run_db(self): pass + + def about(self): + msg = "版本: v1.0.0
\ + 项目地址: https://gitea.kiki.kim/ha/dataCreatingGUI
\ + E-mail: halliday2023@163.com" + QMessageBox.about( + self.ui, + '关于', + msg)