-
Notifications
You must be signed in to change notification settings - Fork 22
/
DemoUI.py
168 lines (160 loc) · 7.2 KB
/
DemoUI.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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'DemoUI.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(1142, 773)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(Form.sizePolicy().hasHeightForWidth())
Form.setSizePolicy(sizePolicy)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap("resources/ico.jpg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
Form.setWindowIcon(icon)
Form.setStyleSheet("QLabel#gra_org {\n"
" border-style: solid; /* 边框风格 */\n"
" border-width: 2px; /* 边框宽度 */\n"
" border-color:rgb(0, 0, 0); /* 边框颜色 */\n"
"}\n"
"QLabel#gra_wm {\n"
" border-style: solid; /* 边框风格 */\n"
" border-width: 2px; /* 边框宽度 */\n"
" border-color:rgb(0, 0, 0); /* 边框颜色 */\n"
"}\n"
"QLabel#gra_gen {\n"
" border-style: solid; /* 边框风格 */\n"
" border-width: 2px; /* 边框宽度 */\n"
" border-color:rgb(0, 0, 0); /* 边框颜色 */\n"
"}\n"
"QLabel#gra_ana {\n"
" border-style: solid; /* 边框风格 */\n"
" border-width: 2px; /* 边框宽度 */\n"
" border-color:rgb(0, 0, 0); /* 边框颜色 */\n"
"}\n"
"\n"
"QLabel#gra_org_2 {\n"
" border-style: solid; /* 边框风格 */\n"
" border-width: 2px; /* 边框宽度 */\n"
" border-color:rgb(0, 0, 0); /* 边框颜色 */\n"
"}\n"
"\n"
"QLabel#gra_gen_2 {\n"
" border-style: solid; /* 边框风格 */\n"
" border-width: 2px; /* 边框宽度 */\n"
" border-color:rgb(0, 0, 0); /* 边框颜色 */\n"
"}\n"
"QLabel#gra_ana_2 {\n"
" border-style: solid; /* 边框风格 */\n"
" border-width: 2px; /* 边框宽度 */\n"
" border-color:rgb(0, 0, 0); /* 边框颜色 */\n"
"}\n"
"QTextEdit {\n"
" border-style: solid; /* 边框风格 */\n"
" border-width: 2px; /* 边框宽度 */\n"
" border-color:rgb(0, 0, 0); /* 边框颜色 */\n"
"}")
self.verticalLayout = QtWidgets.QVBoxLayout(Form)
self.verticalLayout.setObjectName("verticalLayout")
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.btn_org = QtWidgets.QPushButton(Form)
self.btn_org.setMinimumSize(QtCore.QSize(100, 50))
font = QtGui.QFont()
font.setFamily("Adobe Devanagari")
font.setPointSize(12)
font.setBold(True)
font.setWeight(75)
self.btn_org.setFont(font)
self.btn_org.setObjectName("btn_org")
self.horizontalLayout.addWidget(self.btn_org)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem)
self.pushButton = QtWidgets.QPushButton(Form)
self.pushButton.setMinimumSize(QtCore.QSize(100, 50))
font = QtGui.QFont()
font.setFamily("Adobe Devanagari")
font.setPointSize(12)
font.setBold(True)
font.setWeight(75)
self.pushButton.setFont(font)
self.pushButton.setStyleSheet("background-color: rgb(255, 85, 255);")
self.pushButton.setObjectName("pushButton")
self.horizontalLayout.addWidget(self.pushButton)
spacerItem1 = QtWidgets.QSpacerItem(658, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem1)
self.btn_org_2 = QtWidgets.QPushButton(Form)
self.btn_org_2.setMinimumSize(QtCore.QSize(200, 50))
font = QtGui.QFont()
font.setFamily("Adobe Devanagari")
font.setPointSize(12)
font.setBold(True)
font.setWeight(75)
self.btn_org_2.setFont(font)
self.btn_org_2.setObjectName("btn_org_2")
self.horizontalLayout.addWidget(self.btn_org_2)
self.horizontalLayout.setStretch(0, 1)
self.horizontalLayout.setStretch(1, 5)
self.horizontalLayout.setStretch(2, 1)
self.horizontalLayout.setStretch(3, 4)
self.horizontalLayout.setStretch(4, 1)
self.verticalLayout.addLayout(self.horizontalLayout)
self.widget = Label(Form)
self.widget.setObjectName("widget")
self.verticalLayout.addWidget(self.widget)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
spacerItem2 = QtWidgets.QSpacerItem(728, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_2.addItem(spacerItem2)
self.label = QtWidgets.QLabel(Form)
font = QtGui.QFont()
font.setFamily("Adobe Devanagari")
font.setPointSize(12)
font.setBold(True)
font.setWeight(75)
self.label.setFont(font)
self.label.setObjectName("label")
self.horizontalLayout_2.addWidget(self.label)
self.horizontalSlider = QtWidgets.QSlider(Form)
self.horizontalSlider.setProperty("value", 30)
self.horizontalSlider.setOrientation(QtCore.Qt.Horizontal)
self.horizontalSlider.setObjectName("horizontalSlider")
self.horizontalLayout_2.addWidget(self.horizontalSlider)
self.verticalLayout.addLayout(self.horizontalLayout_2)
self.lineEdit = QtWidgets.QLineEdit(Form)
self.lineEdit.setMinimumSize(QtCore.QSize(0, 30))
font = QtGui.QFont()
font.setFamily("Adobe Devanagari")
font.setPointSize(11)
font.setBold(True)
font.setWeight(75)
self.lineEdit.setFont(font)
self.lineEdit.setObjectName("lineEdit")
self.verticalLayout.addWidget(self.lineEdit)
self.verticalLayout.setStretch(0, 1)
self.verticalLayout.setStretch(1, 10)
self.verticalLayout.setStretch(2, 1)
self.verticalLayout.setStretch(3, 1)
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate
Form.setWindowTitle(_translate("Form", "AI魔法消除小工具离线版V1.1(by zhaoyun007 from 52pojie.cn)"))
self.btn_org.setText(_translate("Form", "选取图片"))
self.pushButton.setText(_translate("Form", "打赏我"))
self.btn_org_2.setText(_translate("Form", "涂抹完毕,点我转换"))
self.label.setText(_translate("Form", "画笔大小"))
from label import Label
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
Form = QtWidgets.QWidget()
ui = Ui_Form()
ui.setupUi(Form)
Form.show()
sys.exit(app.exec_())