提交ui和入口程序
This commit is contained in:
parent
b030ab6f4f
commit
2768b29c70
|
@ -2,6 +2,10 @@
|
|||
======================================
|
||||
|
||||
------------------------------
|
||||
0.0.2 2024-02-11
|
||||
|
||||
1.提交ui设计文件
|
||||
2.提交入口程序
|
||||
|
||||
|
||||
------------------------------
|
||||
|
|
|
@ -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
|
||||
|
|
@ -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)
|
|
@ -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())
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
PyYAML==6.0.1
|
||||
faker==19.12.0
|
||||
schedule==1.2.1
|
||||
JPype1==1.4.1
|
||||
JayDeBeApi==1.2.3
|
||||
|
||||
|
|
27
tox.ini
27
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}
|
||||
|
||||
|
|
|
@ -0,0 +1,593 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>801</width>
|
||||
<height>585</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>DataCreating</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>481</width>
|
||||
<height>471</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="file_tab">
|
||||
<attribute name="title">
|
||||
<string>文件</string>
|
||||
</attribute>
|
||||
<widget class="QLineEdit" name="fileNameText">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>90</x>
|
||||
<y>30</y>
|
||||
<width>201</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>filetest</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>qqq</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="fileOutputText">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>90</x>
|
||||
<y>70</y>
|
||||
<width>201</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="fileInitRowsText">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>90</x>
|
||||
<y>110</y>
|
||||
<width>201</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="filename_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>30</y>
|
||||
<width>81</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>文件名</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="output_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>70</y>
|
||||
<width>81</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>输出路径</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="fileinit_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>110</y>
|
||||
<width>81</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>初始数据量</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="filearges_bool_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>230</y>
|
||||
<width>81</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>是否持续生成:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="filearges_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>200</y>
|
||||
<width>81</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>参数配置:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="fileinfo_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>81</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>基本信息:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>120</x>
|
||||
<y>230</y>
|
||||
<width>79</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>是/否</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>270</y>
|
||||
<width>291</width>
|
||||
<height>131</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="QLabel" name="filearges_del_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>40</y>
|
||||
<width>91</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>每次删除数据量:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="filearges_insert_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>91</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>每次插入数据量:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="fileInsertRowsText">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>110</x>
|
||||
<y>10</y>
|
||||
<width>81</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="fileDelRowsText">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>110</x>
|
||||
<y>40</y>
|
||||
<width>81</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>200</x>
|
||||
<y>10</y>
|
||||
<width>54</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>条</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>200</x>
|
||||
<y>40</y>
|
||||
<width>54</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>条</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="DB_tab">
|
||||
<attribute name="title">
|
||||
<string>数据库</string>
|
||||
</attribute>
|
||||
<widget class="QLabel" name="db_type_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>30</y>
|
||||
<width>71</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>数据库类型</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="IP_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>60</y>
|
||||
<width>71</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>IP地址</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="port_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>200</x>
|
||||
<y>60</y>
|
||||
<width>31</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>端口</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="db_database_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>300</x>
|
||||
<y>60</y>
|
||||
<width>61</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Database</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="db_servername_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>90</y>
|
||||
<width>71</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>服务名</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="db_user_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>130</y>
|
||||
<width>71</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>用户名</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="db_passwd_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>160</y>
|
||||
<width>71</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>密码</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="db_arges_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>240</y>
|
||||
<width>71</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>参数配置:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="db_info_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>71</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>连接信息:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="conn_Button">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>200</y>
|
||||
<width>75</width>
|
||||
<height>24</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>测试连接</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="db_type_Box">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>90</x>
|
||||
<y>30</y>
|
||||
<width>101</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>MySQL5</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>MySQL8</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Oracle</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>MSSQL</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="IP_text">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>90</x>
|
||||
<y>60</y>
|
||||
<width>101</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="port_text">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>230</x>
|
||||
<y>60</y>
|
||||
<width>61</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="db_database_text">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>360</x>
|
||||
<y>60</y>
|
||||
<width>81</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="db_servername_text">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>90</x>
|
||||
<y>90</y>
|
||||
<width>101</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="db_user_text">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>90</x>
|
||||
<y>130</y>
|
||||
<width>101</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="db_passwd_text">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>90</x>
|
||||
<y>160</y>
|
||||
<width>101</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="db_insert_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>260</y>
|
||||
<width>101</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>每次插入数据量:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="db_insert_text">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>270</y>
|
||||
<width>101</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QTextBrowser" name="Log_Output">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>510</x>
|
||||
<y>30</y>
|
||||
<width>281</width>
|
||||
<height>451</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="startButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>490</y>
|
||||
<width>71</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>开始</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="stopButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>370</x>
|
||||
<y>490</y>
|
||||
<width>71</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>停止</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>801</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menu">
|
||||
<property name="title">
|
||||
<string>关于</string>
|
||||
</property>
|
||||
<addaction name="actionabout"/>
|
||||
</widget>
|
||||
<addaction name="menu"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
<action name="actionabout">
|
||||
<property name="text">
|
||||
<string>about</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>checkBox</sender>
|
||||
<signal>clicked(bool)</signal>
|
||||
<receiver>frame</receiver>
|
||||
<slot>setVisible(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>169</x>
|
||||
<y>301</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>167</x>
|
||||
<y>331</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
Loading…
Reference in New Issue