From 2768b29c704d832339b43bde21334f5d527341d7 Mon Sep 17 00:00:00 2001 From: halliday2023 Date: Sun, 11 Feb 2024 19:38:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4ui=E5=92=8C=E5=85=A5=E5=8F=A3?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Changes.txt | 4 + bin/GUIWindows.py | 24 ++ bin/_load.py | 27 +++ bin/main.py | 14 ++ requirements.txt | 2 + tox.ini | 27 +-- ui/ui_main.ui | 593 ++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 665 insertions(+), 26 deletions(-) create mode 100644 bin/GUIWindows.py create mode 100644 bin/_load.py create mode 100644 bin/main.py create mode 100644 ui/ui_main.ui diff --git a/Changes.txt b/Changes.txt index e326f19..53c81d3 100644 --- a/Changes.txt +++ b/Changes.txt @@ -2,6 +2,10 @@ ====================================== ------------------------------ +0.0.2 2024-02-11 + +1.提交ui设计文件 +2.提交入口程序 ------------------------------ diff --git a/bin/GUIWindows.py b/bin/GUIWindows.py new file mode 100644 index 0000000..79a0fd0 --- /dev/null +++ b/bin/GUIWindows.py @@ -0,0 +1,24 @@ +# -*- coding:utf-8 -*- +from pathlib import Path + +from PySide6.QtWidgets import QApplication, QMessageBox +from PySide6.QtUiTools import loadUiType + +# 定义公共路径 +path = Path(__file__) +ui_dir = path.parent.parent / "ui" +ui_file_patch = ui_dir / "ui_main.ui" +# 从文件中加载UI定义 +formType, baseType = loadUiType(str(ui_file_patch)) + + +class Window(formType, baseType): + + def __init__(self): + super(Window, self).__init__() + self.setupUi(self) + + + def handleCalc(self): + pass + diff --git a/bin/_load.py b/bin/_load.py new file mode 100644 index 0000000..d04f15f --- /dev/null +++ b/bin/_load.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +import os +import sys +import site + +# set path +py_dir = os.path.dirname(os.path.realpath(__file__)) + +parent_dir = os.path.dirname(py_dir) + +# print parent_dir +# if os.path.isdir(os.path.join(parent_dir, "delegate")): + # sys.path.append(parent_dir) + +libdir = os.path.join(parent_dir, "lib") +# print libdir +if os.path.isdir(libdir): + old_len = len(sys.path) + new_sys_path = [] + site.addsitedir(libdir) # @UndefinedVariable + for item in sys.path[old_len:]: + new_sys_path.append(item) + sys.path.remove(item) + sys.path[:0] = new_sys_path + +# set cwd +os.chdir(parent_dir) diff --git a/bin/main.py b/bin/main.py new file mode 100644 index 0000000..95863b1 --- /dev/null +++ b/bin/main.py @@ -0,0 +1,14 @@ +# -*- coding:utf-8 -*- +import _load +import sys + +from GUIWindows import Window +from PySide6.QtWidgets import QApplication + + +if __name__ == '__main__': + app = QApplication([]) + win = Window() + win.show() + sys.exit(app.exec()) + diff --git a/requirements.txt b/requirements.txt index c970ee3..78c7513 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,6 @@ +PyYAML==6.0.1 faker==19.12.0 schedule==1.2.1 +JPype1==1.4.1 JayDeBeApi==1.2.3 diff --git a/tox.ini b/tox.ini index 7c85387..00b02b0 100644 --- a/tox.ini +++ b/tox.ini @@ -18,36 +18,11 @@ basepython = python3.8 usedevelop = True - -[testenv:devenv2] -envdir = devenv2 -basepython = python2.7 -usedevelop = True - - [testenv:py38-release] basepython = python3.8 deps = -r{toxinidir}/requirements.txt commands = - {envpython} {toxinidir}/release.py {envdir} {envsitepackagesdir} {toxinidir}/build/dataCreating_v1.0.0 {toxinidir} - - -[testenv:py310-release] -basepython = python3.10 -deps = - -r{toxinidir}/requirements.txt - -commands = - {envpython} {toxinidir}/release.py {envdir} {envsitepackagesdir} {toxinidir}/build/dataCreating_v1.0.0 {toxinidir} - - -[testenv:py27-release] -basepython = python2.7 -deps = - -r{toxinidir}/requirements.txt - -commands = - {envpython} {toxinidir}/release.py {envdir} {envsitepackagesdir} {toxinidir}/build/excel2feature {toxinidir} + {envpython} {toxinidir}/release.py {envdir} {envsitepackagesdir} {toxinidir}/build/dataCreatingGUI_v1.0.0 {toxinidir} diff --git a/ui/ui_main.ui b/ui/ui_main.ui new file mode 100644 index 0000000..ba4c60b --- /dev/null +++ b/ui/ui_main.ui @@ -0,0 +1,593 @@ + + + MainWindow + + + + 0 + 0 + 801 + 585 + + + + DataCreating + + + + + + 10 + 10 + 481 + 471 + + + + 0 + + + + 文件 + + + + + 90 + 30 + 201 + 31 + + + + filetest + + + qqq + + + + + + 90 + 70 + 201 + 31 + + + + + + + 90 + 110 + 201 + 31 + + + + + + + 20 + 30 + 81 + 31 + + + + 文件名 + + + + + + 20 + 70 + 81 + 31 + + + + 输出路径 + + + + + + 20 + 110 + 81 + 31 + + + + 初始数据量 + + + + + + 30 + 230 + 81 + 21 + + + + 是否持续生成: + + + + + + 0 + 200 + 81 + 31 + + + + 参数配置: + + + + + + 0 + 0 + 81 + 31 + + + + 基本信息: + + + + + + 120 + 230 + 79 + 21 + + + + 是/否 + + + true + + + + + + 40 + 270 + 291 + 131 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + 10 + 40 + 91 + 21 + + + + 每次删除数据量: + + + + + + 10 + 10 + 91 + 21 + + + + 每次插入数据量: + + + + + true + + + + 110 + 10 + 81 + 21 + + + + + + + 110 + 40 + 81 + 21 + + + + + + + 200 + 10 + 54 + 16 + + + + + + + + + + 200 + 40 + 54 + 16 + + + + + + + + + + + 数据库 + + + + + 20 + 30 + 71 + 21 + + + + 数据库类型 + + + + + + 20 + 60 + 71 + 21 + + + + IP地址 + + + + + + 200 + 60 + 31 + 21 + + + + 端口 + + + + + + 300 + 60 + 61 + 21 + + + + Database + + + + + + 20 + 90 + 71 + 21 + + + + 服务名 + + + + + + 20 + 130 + 71 + 21 + + + + 用户名 + + + + + + 20 + 160 + 71 + 21 + + + + 密码 + + + + + + 0 + 240 + 71 + 21 + + + + 参数配置: + + + + + + 0 + 0 + 71 + 31 + + + + 连接信息: + + + + + + 10 + 200 + 75 + 24 + + + + 测试连接 + + + + + + 90 + 30 + 101 + 21 + + + + + MySQL5 + + + + + MySQL8 + + + + + Oracle + + + + + MSSQL + + + + + + + 90 + 60 + 101 + 20 + + + + + + + 230 + 60 + 61 + 20 + + + + + + + 360 + 60 + 81 + 20 + + + + + + + 90 + 90 + 101 + 20 + + + + + + + 90 + 130 + 101 + 20 + + + + + + + 90 + 160 + 101 + 20 + + + + + + + QLineEdit::Password + + + + + + + + + 40 + 260 + 101 + 41 + + + + 每次插入数据量: + + + + + + 140 + 270 + 101 + 20 + + + + + + + + + 510 + 30 + 281 + 451 + + + + + + + 60 + 490 + 71 + 41 + + + + 开始 + + + + + + 370 + 490 + 71 + 41 + + + + 停止 + + + + + + + 0 + 0 + 801 + 22 + + + + + 关于 + + + + + + + + + about + + + + + + + checkBox + clicked(bool) + frame + setVisible(bool) + + + 169 + 301 + + + 167 + 331 + + + + +