-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.py
141 lines (134 loc) · 7.49 KB
/
MainWindow.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'MainWindow.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(1000, 600)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.horizontalLayoutWidget = QtWidgets.QWidget(self.centralwidget)
self.horizontalLayoutWidget.setGeometry(QtCore.QRect(10, 10, 981, 541))
self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
self.horizontalLayout_1 = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget)
self.horizontalLayout_1.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout_1.setSpacing(16)
self.horizontalLayout_1.setObjectName("horizontalLayout_1")
self.verticalLayout_1_1 = QtWidgets.QVBoxLayout()
self.verticalLayout_1_1.setObjectName("verticalLayout_1_1")
self.label_1 = QtWidgets.QLabel(self.horizontalLayoutWidget)
self.label_1.setMinimumSize(QtCore.QSize(0, 50))
font = QtGui.QFont()
font.setPointSize(12)
self.label_1.setFont(font)
self.label_1.setObjectName("label_1")
self.verticalLayout_1_1.addWidget(self.label_1)
self.textEdit_1 = QtWidgets.QTextEdit(self.horizontalLayoutWidget)
self.textEdit_1.setObjectName("textEdit_1")
self.verticalLayout_1_1.addWidget(self.textEdit_1)
self.horizontalLayout_1_1_1 = QtWidgets.QHBoxLayout()
self.horizontalLayout_1_1_1.setObjectName("horizontalLayout_1_1_1")
self.pushButton_1 = QtWidgets.QPushButton(self.horizontalLayoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_1.sizePolicy().hasHeightForWidth())
self.pushButton_1.setSizePolicy(sizePolicy)
self.pushButton_1.setObjectName("pushButton_1")
self.horizontalLayout_1_1_1.addWidget(self.pushButton_1)
self.pushButton_2 = QtWidgets.QPushButton(self.horizontalLayoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_2.sizePolicy().hasHeightForWidth())
self.pushButton_2.setSizePolicy(sizePolicy)
self.pushButton_2.setObjectName("pushButton_2")
self.horizontalLayout_1_1_1.addWidget(self.pushButton_2)
self.pushButton_3 = QtWidgets.QPushButton(self.horizontalLayoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_3.sizePolicy().hasHeightForWidth())
self.pushButton_3.setSizePolicy(sizePolicy)
self.pushButton_3.setObjectName("pushButton_3")
self.horizontalLayout_1_1_1.addWidget(self.pushButton_3)
self.horizontalLayout_1_1_1.setStretch(0, 1)
self.horizontalLayout_1_1_1.setStretch(1, 1)
self.horizontalLayout_1_1_1.setStretch(2, 1)
self.verticalLayout_1_1.addLayout(self.horizontalLayout_1_1_1)
self.verticalLayout_1_1.setStretch(0, 1)
self.verticalLayout_1_1.setStretch(1, 20)
self.verticalLayout_1_1.setStretch(2, 2)
self.horizontalLayout_1.addLayout(self.verticalLayout_1_1)
self.verticalLayout_1_2 = QtWidgets.QVBoxLayout()
self.verticalLayout_1_2.setObjectName("verticalLayout_1_2")
self.label_2 = QtWidgets.QLabel(self.horizontalLayoutWidget)
self.label_2.setMinimumSize(QtCore.QSize(0, 50))
font = QtGui.QFont()
font.setPointSize(12)
self.label_2.setFont(font)
self.label_2.setWordWrap(True)
self.label_2.setObjectName("label_2")
self.verticalLayout_1_2.addWidget(self.label_2)
self.listWidget_2 = QtWidgets.QListWidget(self.horizontalLayoutWidget)
font = QtGui.QFont()
font.setPointSize(11)
self.listWidget_2.setFont(font)
self.listWidget_2.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
self.listWidget_2.setObjectName("listWidget_2")
self.verticalLayout_1_2.addWidget(self.listWidget_2)
self.verticalLayout_1_2.setStretch(0, 1)
self.verticalLayout_1_2.setStretch(1, 20)
self.horizontalLayout_1.addLayout(self.verticalLayout_1_2)
self.verticalLayout_1_3 = QtWidgets.QVBoxLayout()
self.verticalLayout_1_3.setObjectName("verticalLayout_1_3")
self.label_3 = QtWidgets.QLabel(self.horizontalLayoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth())
self.label_3.setSizePolicy(sizePolicy)
self.label_3.setMinimumSize(QtCore.QSize(0, 50))
font = QtGui.QFont()
font.setPointSize(12)
self.label_3.setFont(font)
self.label_3.setWordWrap(True)
self.label_3.setObjectName("label_3")
self.verticalLayout_1_3.addWidget(self.label_3)
self.listWidget_3 = QtWidgets.QListWidget(self.horizontalLayoutWidget)
font = QtGui.QFont()
font.setPointSize(11)
self.listWidget_3.setFont(font)
self.listWidget_3.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
self.listWidget_3.setObjectName("listWidget_3")
self.verticalLayout_1_3.addWidget(self.listWidget_3)
self.verticalLayout_1_3.setStretch(0, 1)
self.verticalLayout_1_3.setStretch(1, 20)
self.horizontalLayout_1.addLayout(self.verticalLayout_1_3)
self.horizontalLayout_1.setStretch(0, 1)
self.horizontalLayout_1.setStretch(1, 1)
self.horizontalLayout_1.setStretch(2, 1)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 1000, 23))
self.menubar.setObjectName("menubar")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "字典管理工具 v0.1,Power By Z9"))
self.label_1.setText(_translate("MainWindow", "新增字典(./ADD.txt):"))
self.pushButton_1.setText(_translate("MainWindow", "清空"))
self.pushButton_2.setText(_translate("MainWindow", "保存修改"))
self.pushButton_3.setText(_translate("MainWindow", "写入最右栏文件"))
self.label_2.setText(_translate("MainWindow", "请从本地文件列表中选中需要增加新列表项的文件:"))
self.label_3.setText(_translate("MainWindow", "当前选择的文件:"))