-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmainwindow.py
227 lines (221 loc) · 10.7 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'mainwindow.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(942, 685)
self.widget = QtWidgets.QWidget(MainWindow)
self.widget.setGeometry(QtCore.QRect(20, 10, 901, 44))
self.widget.setObjectName("widget")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.widget)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout.setObjectName("horizontalLayout")
spacerItem = QtWidgets.QSpacerItem(290, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem)
self.label_2 = QtWidgets.QLabel(self.widget)
font = QtGui.QFont()
font.setFamily("微软雅黑")
font.setPointSize(18)
font.setBold(True)
font.setWeight(75)
self.label_2.setFont(font)
self.label_2.setStyleSheet("QLabel\n"
"{\n"
" color:rgb(0, 85, 255);\n"
"}")
self.label_2.setObjectName("label_2")
self.horizontalLayout.addWidget(self.label_2)
spacerItem1 = QtWidgets.QSpacerItem(290, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem1)
self.widget_2 = QtWidgets.QWidget(MainWindow)
self.widget_2.setGeometry(QtCore.QRect(20, 50, 906, 521))
self.widget_2.setObjectName("widget_2")
self.verticalLayout = QtWidgets.QVBoxLayout(self.widget_2)
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.verticalLayout.setObjectName("verticalLayout")
self.widget1 = QtWidgets.QWidget(self.widget_2)
self.widget1.setMinimumSize(QtCore.QSize(883, 30))
self.widget1.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.widget1.setObjectName("widget1")
self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.widget1)
self.horizontalLayout_3.setSizeConstraint(QtWidgets.QLayout.SetFixedSize)
self.horizontalLayout_3.setSpacing(4)
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
spacerItem2 = QtWidgets.QSpacerItem(20, 2, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
self.horizontalLayout_3.addItem(spacerItem2)
self.label_4 = QtWidgets.QLabel(self.widget1)
font = QtGui.QFont()
font.setFamily("微软雅黑")
font.setPointSize(12)
font.setBold(True)
font.setWeight(75)
self.label_4.setFont(font)
self.label_4.setStyleSheet("QLabel\n"
"{\n"
" color:rgb(255, 255, 255);\n"
"}")
self.label_4.setObjectName("label_4")
self.horizontalLayout_3.addWidget(self.label_4)
spacerItem3 = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_3.addItem(spacerItem3)
self.label_5 = QtWidgets.QLabel(self.widget1)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_5.sizePolicy().hasHeightForWidth())
self.label_5.setSizePolicy(sizePolicy)
self.label_5.setMinimumSize(QtCore.QSize(0, 0))
font = QtGui.QFont()
font.setFamily("微软雅黑")
font.setPointSize(12)
font.setBold(True)
font.setWeight(75)
self.label_5.setFont(font)
self.label_5.setStyleSheet("QLabel\n"
"{\n"
" color:rgb(0, 255, 51);\n"
"}")
self.label_5.setObjectName("label_5")
self.horizontalLayout_3.addWidget(self.label_5)
spacerItem4 = QtWidgets.QSpacerItem(723, 17, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_3.addItem(spacerItem4)
self.verticalLayout.addWidget(self.widget1)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.label = QtWidgets.QLabel(self.widget_2)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
self.label.setSizePolicy(sizePolicy)
self.label.setMinimumSize(QtCore.QSize(440, 440))
self.label.setMaximumSize(QtCore.QSize(440, 440))
font = QtGui.QFont()
font.setFamily("微软雅黑")
font.setPointSize(20)
font.setBold(True)
font.setWeight(75)
self.label.setFont(font)
self.label.setStyleSheet("QLabel\n"
"{\n"
" background:rgb(59, 59, 59);\n"
"\n"
"}")
self.label.setFrameShape(QtWidgets.QFrame.NoFrame)
self.label.setAlignment(QtCore.Qt.AlignCenter)
self.label.setObjectName("label")
self.horizontalLayout_2.addWidget(self.label)
self.label_3 = QtWidgets.QLabel(self.widget_2)
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(440, 440))
self.label_3.setMaximumSize(QtCore.QSize(440, 440))
font = QtGui.QFont()
font.setFamily("微软雅黑")
font.setPointSize(20)
font.setBold(True)
font.setWeight(75)
self.label_3.setFont(font)
self.label_3.setLayoutDirection(QtCore.Qt.LeftToRight)
self.label_3.setStyleSheet("QLabel\n"
"{\n"
" background:rgb(59, 59, 59);\n"
"\n"
"}")
self.label_3.setFrameShape(QtWidgets.QFrame.NoFrame)
self.label_3.setAlignment(QtCore.Qt.AlignCenter)
self.label_3.setObjectName("label_3")
self.horizontalLayout_2.addWidget(self.label_3)
self.verticalLayout.addLayout(self.horizontalLayout_2)
spacerItem5 = QtWidgets.QSpacerItem(20, 2, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
self.verticalLayout.addItem(spacerItem5)
self.widget_3 = QtWidgets.QWidget(MainWindow)
self.widget_3.setGeometry(QtCore.QRect(20, 600, 891, 58))
self.widget_3.setObjectName("widget_3")
self.horizontalLayout_4 = QtWidgets.QHBoxLayout(self.widget_3)
self.horizontalLayout_4.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
spacerItem6 = QtWidgets.QSpacerItem(72, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_4.addItem(spacerItem6)
self.pushButton = QtWidgets.QPushButton(self.widget_3)
self.pushButton.setMinimumSize(QtCore.QSize(110, 40))
font = QtGui.QFont()
font.setFamily("微软雅黑")
font.setPointSize(12)
font.setBold(True)
font.setWeight(75)
self.pushButton.setFont(font)
self.pushButton.setObjectName("pushButton")
self.horizontalLayout_4.addWidget(self.pushButton)
spacerItem7 = QtWidgets.QSpacerItem(72, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_4.addItem(spacerItem7)
self.pushButton_2 = QtWidgets.QPushButton(self.widget_3)
self.pushButton_2.setMinimumSize(QtCore.QSize(110, 40))
font = QtGui.QFont()
font.setFamily("微软雅黑")
font.setPointSize(12)
font.setBold(True)
font.setWeight(75)
self.pushButton_2.setFont(font)
self.pushButton_2.setObjectName("pushButton_2")
self.horizontalLayout_4.addWidget(self.pushButton_2)
self.horizontalScrollBar = QtWidgets.QScrollBar(self.widget_3)
self.horizontalScrollBar.setMinimumSize(QtCore.QSize(300, 25))
font = QtGui.QFont()
font.setFamily("微软雅黑")
font.setBold(True)
font.setWeight(75)
self.horizontalScrollBar.setFont(font)
self.horizontalScrollBar.setToolTipDuration(-1)
self.horizontalScrollBar.setMaximum(14)
self.horizontalScrollBar.setPageStep(4)
self.horizontalScrollBar.setOrientation(QtCore.Qt.Horizontal)
self.horizontalScrollBar.setObjectName("horizontalScrollBar")
self.horizontalLayout_4.addWidget(self.horizontalScrollBar)
self.pushButton_3 = QtWidgets.QPushButton(self.widget_3)
self.pushButton_3.setMinimumSize(QtCore.QSize(110, 40))
font = QtGui.QFont()
font.setFamily("微软雅黑")
font.setPointSize(12)
font.setBold(True)
font.setWeight(75)
self.pushButton_3.setFont(font)
self.pushButton_3.setObjectName("pushButton_3")
self.horizontalLayout_4.addWidget(self.pushButton_3)
spacerItem8 = QtWidgets.QSpacerItem(72, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_4.addItem(spacerItem8)
self.pushButton_4 = QtWidgets.QPushButton(self.widget_3)
self.pushButton_4.setMinimumSize(QtCore.QSize(110, 40))
font = QtGui.QFont()
font.setFamily("微软雅黑")
font.setPointSize(12)
font.setBold(True)
font.setWeight(75)
self.pushButton_4.setFont(font)
self.pushButton_4.setObjectName("pushButton_4")
self.horizontalLayout_4.addWidget(self.pushButton_4)
spacerItem9 = QtWidgets.QSpacerItem(72, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_4.addItem(spacerItem9)
self.retranslateUi(MainWindow)
self.pushButton_4.clicked.connect(MainWindow.close)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "Form"))
self.label_2.setText(_translate("MainWindow", "全国大学生生物医学工程创新设计竞赛作品"))
self.label_4.setText(_translate("MainWindow", "程序状态:"))
self.label_5.setText(_translate("MainWindow", "已就绪"))
self.label.setText(_translate("MainWindow", "原始图像"))
self.label_3.setText(_translate("MainWindow", "分割图像"))
self.pushButton.setText(_translate("MainWindow", "开始"))
self.pushButton_2.setText(_translate("MainWindow", "上一张"))
self.pushButton_3.setText(_translate("MainWindow", "下一张"))
self.pushButton_4.setText(_translate("MainWindow", "退出"))