-
Notifications
You must be signed in to change notification settings - Fork 2
/
Magic_Sky.py
254 lines (248 loc) · 13.7 KB
/
Magic_Sky.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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'Magic_Sky.ui'
#
# Created by: PyQt5 UI code generator 5.12.1
#
# 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.setWindowModality(QtCore.Qt.ApplicationModal)
MainWindow.resize(1290, 917)
MainWindow.setToolButtonStyle(QtCore.Qt.ToolButtonFollowStyle)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
self.tabWidget.setGeometry(QtCore.QRect(530, 20, 731, 871))
self.tabWidget.setObjectName("tabWidget")
self.tap = QtWidgets.QWidget()
self.tap.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
self.tap.setObjectName("tap")
self.horizontalLayoutWidget = QtWidgets.QWidget(self.tap)
self.horizontalLayoutWidget.setGeometry(QtCore.QRect(20, 20, 701, 361))
self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout.setObjectName("horizontalLayout")
self.groupBox_4 = QtWidgets.QGroupBox(self.horizontalLayoutWidget)
self.groupBox_4.setObjectName("groupBox_4")
self.sourceView = QtWidgets.QGraphicsView(self.groupBox_4)
self.sourceView.setGeometry(QtCore.QRect(11, 20, 331, 331))
self.sourceView.setObjectName("sourceView")
self.horizontalLayout.addWidget(self.groupBox_4)
self.groupBox_5 = QtWidgets.QGroupBox(self.horizontalLayoutWidget)
self.groupBox_5.setObjectName("groupBox_5")
self.targetView = QtWidgets.QGraphicsView(self.groupBox_5)
self.targetView.setGeometry(QtCore.QRect(10, 20, 331, 331))
self.targetView.setObjectName("targetView")
self.horizontalLayout.addWidget(self.groupBox_5)
self.groupBox_6 = QtWidgets.QGroupBox(self.tap)
self.groupBox_6.setGeometry(QtCore.QRect(10, 390, 711, 461))
self.groupBox_6.setObjectName("groupBox_6")
self.resultView = QtWidgets.QGraphicsView(self.groupBox_6)
self.resultView.setGeometry(QtCore.QRect(12, 20, 691, 421))
self.resultView.setObjectName("resultView")
self.tabWidget.addTab(self.tap, "")
self.frame = QtWidgets.QFrame(self.centralwidget)
self.frame.setGeometry(QtCore.QRect(40, 163, 481, 721))
self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
self.frame.setObjectName("frame")
self.verticalLayoutWidget = QtWidgets.QWidget(self.frame)
self.verticalLayoutWidget.setGeometry(QtCore.QRect(10, 10, 451, 731))
self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")
self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget)
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.verticalLayout.setObjectName("verticalLayout")
self.groupBox = QtWidgets.QGroupBox(self.verticalLayoutWidget)
font = QtGui.QFont()
font.setPointSize(11)
font.setBold(True)
font.setWeight(75)
self.groupBox.setFont(font)
self.groupBox.setObjectName("groupBox")
self.groupBox_3 = QtWidgets.QGroupBox(self.groupBox)
self.groupBox_3.setGeometry(QtCore.QRect(20, 350, 411, 371))
font = QtGui.QFont()
font.setPointSize(11)
font.setBold(False)
font.setWeight(50)
self.groupBox_3.setFont(font)
self.groupBox_3.setObjectName("groupBox_3")
self.textBrowser = QtWidgets.QTextBrowser(self.groupBox_3)
self.textBrowser.setGeometry(QtCore.QRect(10, 20, 391, 331))
self.textBrowser.setObjectName("textBrowser")
self.groupBox_2 = QtWidgets.QGroupBox(self.groupBox)
self.groupBox_2.setGeometry(QtCore.QRect(20, 190, 411, 131))
font = QtGui.QFont()
font.setPointSize(11)
font.setBold(False)
font.setWeight(50)
self.groupBox_2.setFont(font)
self.groupBox_2.setObjectName("groupBox_2")
self.gridLayout = QtWidgets.QGridLayout(self.groupBox_2)
self.gridLayout.setObjectName("gridLayout")
self.pushButton = QtWidgets.QPushButton(self.groupBox_2)
font = QtGui.QFont()
font.setPointSize(10)
self.pushButton.setFont(font)
self.pushButton.setObjectName("pushButton")
self.gridLayout.addWidget(self.pushButton, 0, 0, 1, 1)
self.pushButton_2 = QtWidgets.QPushButton(self.groupBox_2)
font = QtGui.QFont()
font.setPointSize(10)
self.pushButton_2.setFont(font)
self.pushButton_2.setObjectName("pushButton_2")
self.gridLayout.addWidget(self.pushButton_2, 0, 1, 1, 1)
self.pushButton_skyrpl = QtWidgets.QPushButton(self.groupBox_2)
font = QtGui.QFont()
font.setPointSize(10)
self.pushButton_skyrpl.setFont(font)
self.pushButton_skyrpl.setObjectName("pushButton_skyrpl")
self.gridLayout.addWidget(self.pushButton_skyrpl, 0, 2, 1, 1)
self.pushButton_3 = QtWidgets.QPushButton(self.groupBox_2)
font = QtGui.QFont()
font.setPointSize(10)
self.pushButton_3.setFont(font)
self.pushButton_3.setObjectName("pushButton_3")
self.gridLayout.addWidget(self.pushButton_3, 1, 0, 1, 1)
self.pushButton_4 = QtWidgets.QPushButton(self.groupBox_2)
font = QtGui.QFont()
font.setPointSize(10)
self.pushButton_4.setFont(font)
self.pushButton_4.setObjectName("pushButton_4")
self.gridLayout.addWidget(self.pushButton_4, 1, 1, 1, 1)
self.pushButton_5 = QtWidgets.QPushButton(self.groupBox_2)
font = QtGui.QFont()
font.setPointSize(10)
self.pushButton_5.setFont(font)
self.pushButton_5.setObjectName("pushButton_5")
self.gridLayout.addWidget(self.pushButton_5, 1, 2, 1, 1)
self.formLayoutWidget = QtWidgets.QWidget(self.groupBox)
self.formLayoutWidget.setGeometry(QtCore.QRect(20, 50, 411, 111))
self.formLayoutWidget.setObjectName("formLayoutWidget")
self.formLayout = QtWidgets.QFormLayout(self.formLayoutWidget)
self.formLayout.setContentsMargins(0, 0, 0, 0)
self.formLayout.setObjectName("formLayout")
self.modetilte = QtWidgets.QLabel(self.formLayoutWidget)
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.modetilte.setFont(font)
self.modetilte.setFocusPolicy(QtCore.Qt.NoFocus)
self.modetilte.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
self.modetilte.setLayoutDirection(QtCore.Qt.LeftToRight)
self.modetilte.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
self.modetilte.setObjectName("modetilte")
self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.modetilte)
self.line = QtWidgets.QFrame(self.formLayoutWidget)
self.line.setFrameShape(QtWidgets.QFrame.HLine)
self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line.setObjectName("line")
self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.line)
self.line_2 = QtWidgets.QFrame(self.formLayoutWidget)
self.line_2.setFrameShape(QtWidgets.QFrame.HLine)
self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_2.setObjectName("line_2")
self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.line_2)
self.sourcetitle = QtWidgets.QLabel(self.formLayoutWidget)
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.sourcetitle.setFont(font)
self.sourcetitle.setObjectName("sourcetitle")
self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.sourcetitle)
self.sourcetext = QtWidgets.QLabel(self.formLayoutWidget)
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.sourcetext.setFont(font)
self.sourcetext.setObjectName("sourcetext")
self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.sourcetext)
self.targettitle = QtWidgets.QLabel(self.formLayoutWidget)
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.targettitle.setFont(font)
self.targettitle.setObjectName("targettitle")
self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.targettitle)
self.targettext = QtWidgets.QLabel(self.formLayoutWidget)
font = QtGui.QFont()
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.targettext.setFont(font)
self.targettext.setObjectName("targettext")
self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.targettext)
self.modetext = QtWidgets.QComboBox(self.formLayoutWidget)
font = QtGui.QFont()
font.setBold(False)
font.setWeight(50)
self.modetext.setFont(font)
self.modetext.setSizeAdjustPolicy(QtWidgets.QComboBox.AdjustToMinimumContentsLength)
self.modetext.setObjectName("modetext")
self.modetext.addItem("")
self.modetext.addItem("")
self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.modetext)
self.verticalLayout.addWidget(self.groupBox)
self.Slogan = QtWidgets.QLabel(self.centralwidget)
self.Slogan.setGeometry(QtCore.QRect(30, 50, 481, 81))
font = QtGui.QFont()
font.setFamily("Monotype Corsiva")
font.setPointSize(32)
font.setItalic(True)
self.Slogan.setFont(font)
self.Slogan.setTextFormat(QtCore.Qt.RichText)
self.Slogan.setAlignment(QtCore.Qt.AlignCenter)
self.Slogan.setObjectName("Slogan")
MainWindow.setCentralWidget(self.centralwidget)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.actionSource_Image = QtWidgets.QAction(MainWindow)
self.actionSource_Image.setObjectName("actionSource_Image")
self.actionTarget_Sky = QtWidgets.QAction(MainWindow)
self.actionTarget_Sky.setObjectName("actionTarget_Sky")
self.actionLoad_Source_video = QtWidgets.QAction(MainWindow)
self.actionLoad_Source_video.setObjectName("actionLoad_Source_video")
self.actionLoad_Target_Sky = QtWidgets.QAction(MainWindow)
self.actionLoad_Target_Sky.setObjectName("actionLoad_Target_Sky")
self.retranslateUi(MainWindow)
self.tabWidget.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "Magic Sky (V1.2)"))
self.groupBox_4.setTitle(_translate("MainWindow", "Source"))
self.groupBox_5.setTitle(_translate("MainWindow", "Target"))
self.groupBox_6.setTitle(_translate("MainWindow", "Result"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tap), _translate("MainWindow", "Display"))
self.groupBox.setTitle(_translate("MainWindow", "Setting"))
self.groupBox_3.setTitle(_translate("MainWindow", "Console"))
self.textBrowser.setHtml(_translate("MainWindow",
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'SimSun\'; font-size:11pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:10pt;\">The sky full of magic. </span></p></body></html>"))
self.groupBox_2.setTitle(_translate("MainWindow", "Command"))
self.pushButton.setText(_translate("MainWindow", "Load Source"))
self.pushButton_2.setText(_translate("MainWindow", "Load Target"))
self.pushButton_skyrpl.setText(_translate("MainWindow", "Magic Sky!"))
self.pushButton_3.setText(_translate("MainWindow", "Input Video"))
self.pushButton_4.setText(_translate("MainWindow", "Result Video"))
self.pushButton_5.setText(_translate("MainWindow", "Save Result"))
self.modetilte.setText(_translate("MainWindow", " Mode:"))
self.sourcetitle.setText(_translate("MainWindow", " Source:"))
self.sourcetext.setText(_translate("MainWindow", "None"))
self.targettitle.setText(_translate("MainWindow", " Tartget:"))
self.targettext.setText(_translate("MainWindow", "None"))
self.modetext.setItemText(0, _translate("MainWindow", "Photo"))
self.modetext.setItemText(1, _translate("MainWindow", "Video"))
self.Slogan.setText(_translate("MainWindow", "<html><head/><body><p>The sky full of magic</p></body></html>"))
self.actionSource_Image.setText(_translate("MainWindow", "Source Picture"))
self.actionTarget_Sky.setText(_translate("MainWindow", "Target Sky"))
self.actionLoad_Source_video.setText(_translate("MainWindow", "Source video"))
self.actionLoad_Target_Sky.setText(_translate("MainWindow", "Target Sky"))