diff --git a/bin/GUIWindows.py b/bin/GUIWindows.py
index b0fb1cb..4065eec 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
+from PySide6.QtWidgets import QApplication,QFileDialog
from PySide6.QtGui import QTextCursor
# 声明全局变量
@@ -62,6 +62,7 @@ class Window:
self.ui.startButton.clicked.connect(self.start)
self.ui.stopButton.clicked.connect(self.stop)
self.ui.conn_Button.clicked.connect(self.conntest)
+ self.ui.choosedir_Button.clicked.connect(self.choosedir)
self.setup_thread()
@@ -131,6 +132,13 @@ class Window:
# TODO(MH):校验连接信息
self.logger.info("数据库连接成功")
+ def choosedir(self):
+ self.logger.info("点击了选择目录按钮")
+ 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)
diff --git a/ui/style.qss b/ui/style.qss
index 9db25e7..700d235 100644
--- a/ui/style.qss
+++ b/ui/style.qss
@@ -2,6 +2,10 @@
font-family: 宋体;
font-size: 15px;
}
+QLineEdit{
+ border:1px solid;
+}
+
#Log_Output{
margin: 10px 5px 5px 2px;
}
diff --git a/ui/ui_main.ui b/ui/ui_main.ui
index 3716e3e..ea9240e 100644
--- a/ui/ui_main.ui
+++ b/ui/ui_main.ui
@@ -13,9 +13,6 @@
DataCreating
-
-
-
-
@@ -39,107 +36,158 @@
基本信息:
-
-
-
-
-
-
-
-
-
-
-
- 文件名
-
-
-
- -
-
-
- 输出路径
-
-
-
- -
-
-
- 初始数据量
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
- -
-
-
-
-
-
- filetest
-
-
- 文件名
-
-
-
- -
-
-
- 默认:./data
-
-
-
- -
-
-
- 10
-
-
-
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
-
-
-
+
+
+
+ 11
+ 20
+ 378
+ 132
+
+
+
+ -
+
+
-
+
+
+ 文件名
+
+
+
+ -
+
+
+ 输出路径
+
+
+
+ -
+
+
+ 初始数据量
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+ -
+
+
-
+
+
-
+
+
+ filetest
+
+
+ 文件名
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 24
+ 20
+
+
+
+
+
+
+ -
+
+
-
+
+
+ 默认:./data
+
+
+
+ -
+
+
+ 选择目录
+
+
+
+
+
+ -
+
+
-
+
+
+ 10
+
+
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
-
@@ -235,7 +283,7 @@
-
+
12
@@ -680,8 +728,8 @@
301
- 167
- 331
+ 181
+ 403
@@ -692,8 +740,8 @@
start()
- 98
- 526
+ 150
+ 601
153
@@ -708,8 +756,8 @@
stop()
- 431
- 531
+ 356
+ 601
492
@@ -733,10 +781,59 @@
+
+ tabWidget
+ tabBarClicked(int)
+ db_servername_label
+ hide()
+
+
+ 88
+ 45
+
+
+ 66
+ 156
+
+
+
+
+ db_type_Box
+ currentTextChanged(QString)
+ db_servername_label
+ show()
+
+
+ 151
+ 104
+
+
+ 78
+ 154
+
+
+
+
+ choosedir_Button
+ clicked(bool)
+ MainWindow
+ choosedir()
+
+
+ 302
+ 137
+
+
+ 428
+ 31
+
+
+
start()
stop()
conntest()
+ choosedir()