-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.py
203 lines (195 loc) · 11.9 KB
/
ui.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
# Form implementation generated from reading ui file '.\Window.ui'
#
# Created by: PyQt6 UI code generator 6.4.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt6 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(800, 600)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.horizontalLayoutWidget = QtWidgets.QWidget(self.centralwidget)
self.horizontalLayoutWidget.setGeometry(QtCore.QRect(510, 470, 271, 81))
self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout.setObjectName("horizontalLayout")
self.buttonBox = QtWidgets.QDialogButtonBox(self.horizontalLayoutWidget)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Abort|QtWidgets.QDialogButtonBox.StandardButton.Ok|QtWidgets.QDialogButtonBox.StandardButton.RestoreDefaults)
self.buttonBox.setCenterButtons(False)
self.buttonBox.setObjectName("buttonBox")
self.horizontalLayout.addWidget(self.buttonBox)
self.graphicsView = QtWidgets.QGraphicsView(self.centralwidget)
self.graphicsView.setGeometry(QtCore.QRect(510, 250, 271, 201))
self.graphicsView.setFrameShape(QtWidgets.QFrame.Shape.Box)
self.graphicsView.setObjectName("graphicsView")
self.graphicsView_2 = QtWidgets.QGraphicsView(self.centralwidget)
self.graphicsView_2.setGeometry(QtCore.QRect(510, 20, 271, 201))
self.graphicsView_2.setFrameShape(QtWidgets.QFrame.Shape.Box)
self.graphicsView_2.setObjectName("graphicsView_2")
self.progressBar = QtWidgets.QProgressBar(self.centralwidget)
self.progressBar.setGeometry(QtCore.QRect(30, 500, 461, 23))
self.progressBar.setProperty("value", 0)
self.progressBar.setObjectName("progressBar")
self.label = QtWidgets.QLabel(self.centralwidget)
self.label.setGeometry(QtCore.QRect(510, 230, 81, 16))
self.label.setObjectName("label")
self.label_2 = QtWidgets.QLabel(self.centralwidget)
self.label_2.setGeometry(QtCore.QRect(510, 0, 81, 16))
self.label_2.setObjectName("label_2")
self.formLayoutWidget = QtWidgets.QWidget(self.centralwidget)
self.formLayoutWidget.setGeometry(QtCore.QRect(20, 10, 331, 131))
self.formLayoutWidget.setObjectName("formLayoutWidget")
self.formLayout = QtWidgets.QFormLayout(self.formLayoutWidget)
self.formLayout.setLabelAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter)
self.formLayout.setFormAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter)
self.formLayout.setContentsMargins(0, 0, 0, 0)
self.formLayout.setObjectName("formLayout")
self.label_3 = QtWidgets.QLabel(self.formLayoutWidget)
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.label_3.setFont(font)
self.label_3.setObjectName("label_3")
self.formLayout.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_3)
self.lineEdit_2 = QtWidgets.QLineEdit(self.formLayoutWidget)
self.lineEdit_2.setFrame(False)
self.lineEdit_2.setReadOnly(True)
self.lineEdit_2.setObjectName("lineEdit_2")
self.formLayout.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.lineEdit_2)
self.line_2 = QtWidgets.QFrame(self.formLayoutWidget)
self.line_2.setFrameShape(QtWidgets.QFrame.Shape.HLine)
self.line_2.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
self.line_2.setObjectName("line_2")
self.formLayout.setWidget(1, QtWidgets.QFormLayout.ItemRole.SpanningRole, self.line_2)
self.pushButton = QtWidgets.QPushButton(self.formLayoutWidget)
self.pushButton.setObjectName("pushButton")
self.formLayout.setWidget(2, QtWidgets.QFormLayout.ItemRole.LabelRole, self.pushButton)
self.lineEdit = QtWidgets.QLineEdit(self.formLayoutWidget)
self.lineEdit.setText("")
self.lineEdit.setReadOnly(True)
self.lineEdit.setClearButtonEnabled(False)
self.lineEdit.setObjectName("lineEdit")
self.formLayout.setWidget(2, QtWidgets.QFormLayout.ItemRole.FieldRole, self.lineEdit)
self.checkBox = QtWidgets.QCheckBox(self.formLayoutWidget)
self.checkBox.setChecked(True)
self.checkBox.setObjectName("checkBox")
self.formLayout.setWidget(4, QtWidgets.QFormLayout.ItemRole.LabelRole, self.checkBox)
self.label_4 = QtWidgets.QLabel(self.formLayoutWidget)
self.label_4.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
self.label_4.setObjectName("label_4")
self.formLayout.setWidget(4, QtWidgets.QFormLayout.ItemRole.FieldRole, self.label_4)
self.line = QtWidgets.QFrame(self.formLayoutWidget)
self.line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
self.line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
self.line.setObjectName("line")
self.formLayout.setWidget(3, QtWidgets.QFormLayout.ItemRole.SpanningRole, self.line)
self.formLayoutWidget_2 = QtWidgets.QWidget(self.centralwidget)
self.formLayoutWidget_2.setGeometry(QtCore.QRect(20, 180, 331, 91))
self.formLayoutWidget_2.setObjectName("formLayoutWidget_2")
self.formLayout_2 = QtWidgets.QFormLayout(self.formLayoutWidget_2)
self.formLayout_2.setContentsMargins(0, 0, 0, 0)
self.formLayout_2.setObjectName("formLayout_2")
self.label_5 = QtWidgets.QLabel(self.formLayoutWidget_2)
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.label_5.setFont(font)
self.label_5.setObjectName("label_5")
self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_5)
self.lineEdit_3 = QtWidgets.QLineEdit(self.formLayoutWidget_2)
self.lineEdit_3.setFrame(False)
self.lineEdit_3.setReadOnly(True)
self.lineEdit_3.setObjectName("lineEdit_3")
self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.lineEdit_3)
self.pushButton_2 = QtWidgets.QPushButton(self.formLayoutWidget_2)
self.pushButton_2.setObjectName("pushButton_2")
self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.pushButton_2)
self.lineEdit_4 = QtWidgets.QLineEdit(self.formLayoutWidget_2)
self.lineEdit_4.setReadOnly(True)
self.lineEdit_4.setObjectName("lineEdit_4")
self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.lineEdit_4)
self.label_12 = QtWidgets.QLabel(self.formLayoutWidget_2)
self.label_12.setObjectName("label_12")
self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_12)
self.lineEdit_6 = QtWidgets.QLineEdit(self.formLayoutWidget_2)
self.lineEdit_6.setFrame(False)
self.lineEdit_6.setReadOnly(True)
self.lineEdit_6.setObjectName("lineEdit_6")
self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.ItemRole.FieldRole, self.lineEdit_6)
self.formLayoutWidget_3 = QtWidgets.QWidget(self.centralwidget)
self.formLayoutWidget_3.setGeometry(QtCore.QRect(20, 280, 331, 121))
self.formLayoutWidget_3.setObjectName("formLayoutWidget_3")
self.formLayout_3 = QtWidgets.QFormLayout(self.formLayoutWidget_3)
self.formLayout_3.setContentsMargins(0, 0, 0, 0)
self.formLayout_3.setObjectName("formLayout_3")
self.label_6 = QtWidgets.QLabel(self.formLayoutWidget_3)
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.label_6.setFont(font)
self.label_6.setObjectName("label_6")
self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_6)
self.lineEdit_5 = QtWidgets.QLineEdit(self.formLayoutWidget_3)
self.lineEdit_5.setFrame(False)
self.lineEdit_5.setReadOnly(True)
self.lineEdit_5.setObjectName("lineEdit_5")
self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.lineEdit_5)
self.label_7 = QtWidgets.QLabel(self.formLayoutWidget_3)
self.label_7.setObjectName("label_7")
self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_7)
self.lineEdit_7 = QtWidgets.QLineEdit(self.formLayoutWidget_3)
self.lineEdit_7.setFrame(False)
self.lineEdit_7.setReadOnly(True)
self.lineEdit_7.setObjectName("lineEdit_7")
self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.lineEdit_7)
self.label_13 = QtWidgets.QLabel(self.formLayoutWidget_3)
self.label_13.setObjectName("label_13")
self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_13)
self.radioButton = QtWidgets.QRadioButton(self.formLayoutWidget_3)
self.radioButton.setChecked(True)
self.radioButton.setObjectName("radioButton")
self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.ItemRole.FieldRole, self.radioButton)
self.radioButton_2 = QtWidgets.QRadioButton(self.formLayoutWidget_3)
self.radioButton_2.setObjectName("radioButton_2")
self.formLayout_3.setWidget(3, QtWidgets.QFormLayout.ItemRole.FieldRole, self.radioButton_2)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 21))
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", "MainWindow"))
self.label.setText(_translate("MainWindow", "Upscaled Image"))
self.label_2.setText(_translate("MainWindow", "Input Image"))
self.label_3.setText(_translate("MainWindow", "ESRGAN Model:"))
self.pushButton.setText(_translate("MainWindow", "Browse"))
self.lineEdit.setPlaceholderText(_translate("MainWindow", "Path to .pth file"))
self.checkBox.setText(_translate("MainWindow", "Enable Transparency?"))
self.label_4.setText(_translate("MainWindow", "(Output will be .PNG or .JXL)"))
self.label_5.setText(_translate("MainWindow", "Input File:"))
self.pushButton_2.setText(_translate("MainWindow", "Browse"))
self.lineEdit_4.setPlaceholderText(_translate("MainWindow", "Path to Image File"))
self.label_12.setText(_translate("MainWindow", "Resolution"))
self.label_6.setText(_translate("MainWindow", "Output File:"))
self.label_7.setText(_translate("MainWindow", "Resolution"))
self.label_13.setText(_translate("MainWindow", "Output Format"))
self.radioButton.setText(_translate("MainWindow", ".PNG"))
self.radioButton_2.setText(_translate("MainWindow", ".JXL (REQUIRES SYSTEM FFMPEG!)"))
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
MainWindow = QtWidgets.QMainWindow()
ui = Ui_MainWindow()
ui.setupUi(MainWindow)
MainWindow.show()
sys.exit(app.exec())