-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmetadata_ui.py
312 lines (303 loc) · 18.2 KB
/
metadata_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
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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'D:\CODES\Python\EbookCollection\metadata.ui'
#
# Created by: PyQt5 UI code generator 5.13.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(QtWidgets.QDialog):
def setupUi(self, Dialog: QtWidgets.QDialog):
Dialog.setObjectName("Dialog")
Dialog.resize(600, 700)
Dialog.setMinimumSize(QtCore.QSize(600, 580))
self.verticalLayout = QtWidgets.QVBoxLayout(Dialog)
self.verticalLayout.setObjectName("verticalLayout")
self.gridLayout = QtWidgets.QGridLayout()
self.gridLayout.setObjectName("gridLayout")
spacerItem = QtWidgets.QSpacerItem(20, 10, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
self.gridLayout.addItem(spacerItem, 7, 0, 1, 1)
self.horizontalLayout_7 = QtWidgets.QHBoxLayout()
self.horizontalLayout_7.setObjectName("horizontalLayout_7")
self.edit_series = QtWidgets.QLineEdit(Dialog)
self.edit_series.setObjectName("edit_series")
self.horizontalLayout_7.addWidget(self.edit_series)
self.btn_del_series = QtWidgets.QPushButton(Dialog)
self.btn_del_series.setMinimumSize(QtCore.QSize(25, 0))
self.btn_del_series.setMaximumSize(QtCore.QSize(25, 16777215))
self.btn_del_series.setObjectName("btn_del_series")
self.horizontalLayout_7.addWidget(self.btn_del_series)
self.gridLayout.addLayout(self.horizontalLayout_7, 2, 1, 1, 1)
self.list_view_files = QtWidgets.QListWidget(Dialog)
self.list_view_files.setObjectName("list_view_files")
self.gridLayout.addWidget(self.list_view_files, 8, 1, 3, 1)
self.line_2 = QtWidgets.QFrame(Dialog)
self.line_2.setFrameShape(QtWidgets.QFrame.HLine)
self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_2.setObjectName("line_2")
self.gridLayout.addWidget(self.line_2, 12, 0, 1, 5)
self.label_tags = QtWidgets.QLabel(Dialog)
self.label_tags.setObjectName("label_tags")
self.gridLayout.addWidget(self.label_tags, 4, 0, 1, 1)
self.label = QtWidgets.QLabel(Dialog)
self.label.setObjectName("label")
self.gridLayout.addWidget(self.label, 8, 0, 3, 1)
self.label_title = QtWidgets.QLabel(Dialog)
self.label_title.setMinimumSize(QtCore.QSize(100, 0))
self.label_title.setMaximumSize(QtCore.QSize(100, 16777215))
self.label_title.setObjectName("label_title")
self.gridLayout.addWidget(self.label_title, 1, 0, 1, 1)
spacerItem1 = QtWidgets.QSpacerItem(20, 10, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
self.gridLayout.addItem(spacerItem1, 13, 0, 1, 1)
self.label_authors = QtWidgets.QLabel(Dialog)
self.label_authors.setMinimumSize(QtCore.QSize(100, 0))
self.label_authors.setMaximumSize(QtCore.QSize(100, 16777215))
self.label_authors.setObjectName("label_authors")
self.gridLayout.addWidget(self.label_authors, 1, 3, 1, 1)
self.horizontalLayout_13 = QtWidgets.QHBoxLayout()
self.horizontalLayout_13.setObjectName("horizontalLayout_13")
self.edit_plublish_date = QtWidgets.QDateEdit(Dialog)
self.edit_plublish_date.setObjectName("edit_plublish_date")
self.horizontalLayout_13.addWidget(self.edit_plublish_date)
self.btn_del_plublish_date = QtWidgets.QPushButton(Dialog)
self.btn_del_plublish_date.setMinimumSize(QtCore.QSize(25, 0))
self.btn_del_plublish_date.setMaximumSize(QtCore.QSize(25, 16777215))
self.btn_del_plublish_date.setObjectName("btn_del_plublish_date")
self.horizontalLayout_13.addWidget(self.btn_del_plublish_date)
self.gridLayout.addLayout(self.horizontalLayout_13, 10, 4, 1, 1)
self.label_plublish_date = QtWidgets.QLabel(Dialog)
self.label_plublish_date.setMinimumSize(QtCore.QSize(100, 0))
self.label_plublish_date.setMaximumSize(QtCore.QSize(100, 16777215))
self.label_plublish_date.setObjectName("label_plublish_date")
self.gridLayout.addWidget(self.label_plublish_date, 10, 3, 1, 1)
self.label_book_id = QtWidgets.QLabel(Dialog)
self.label_book_id.setMinimumSize(QtCore.QSize(100, 0))
self.label_book_id.setMaximumSize(QtCore.QSize(100, 16777215))
self.label_book_id.setObjectName("label_book_id")
self.gridLayout.addWidget(self.label_book_id, 0, 0, 1, 1)
spacerItem2 = QtWidgets.QSpacerItem(20, 10, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
self.gridLayout.addItem(spacerItem2, 5, 0, 1, 1)
self.label_3 = QtWidgets.QLabel(Dialog)
self.label_3.setObjectName("label_3")
self.gridLayout.addWidget(self.label_3, 9, 3, 1, 1)
self.label_series = QtWidgets.QLabel(Dialog)
self.label_series.setMinimumSize(QtCore.QSize(100, 0))
self.label_series.setMaximumSize(QtCore.QSize(100, 16777215))
self.label_series.setObjectName("label_series")
self.gridLayout.addWidget(self.label_series, 2, 0, 1, 1)
self.horizontalLayout_11 = QtWidgets.QHBoxLayout()
self.horizontalLayout_11.setObjectName("horizontalLayout_11")
self.edit_editors = QtWidgets.QLineEdit(Dialog)
self.edit_editors.setObjectName("edit_editors")
self.horizontalLayout_11.addWidget(self.edit_editors)
self.btn_del_editors = QtWidgets.QPushButton(Dialog)
self.btn_del_editors.setMinimumSize(QtCore.QSize(25, 0))
self.btn_del_editors.setMaximumSize(QtCore.QSize(25, 16777215))
self.btn_del_editors.setObjectName("btn_del_editors")
self.horizontalLayout_11.addWidget(self.btn_del_editors)
self.gridLayout.addLayout(self.horizontalLayout_11, 8, 4, 1, 1)
self.l8 = QtWidgets.QHBoxLayout()
self.l8.setObjectName("l8")
self.verticalLayout_3 = QtWidgets.QVBoxLayout()
self.verticalLayout_3.setSpacing(0)
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.label_cover_title = QtWidgets.QLabel(Dialog)
self.label_cover_title.setObjectName("label_cover_title")
self.verticalLayout_3.addWidget(self.label_cover_title)
spacerItem3 = QtWidgets.QSpacerItem(20, 5, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Maximum)
self.verticalLayout_3.addItem(spacerItem3)
self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
self.label_cover_view = QtWidgets.QPushButton(Dialog)
self.label_cover_view.setMinimumSize(QtCore.QSize(160, 160))
self.label_cover_view.setText("")
self.label_cover_view.setIconSize(QtCore.QSize(160, 160))
self.label_cover_view.setAutoDefault(False)
self.label_cover_view.setFlat(False)
self.label_cover_view.setObjectName("label_cover_view")
self.horizontalLayout_4.addWidget(self.label_cover_view)
self.verticalLayout_3.addLayout(self.horizontalLayout_4)
spacerItem4 = QtWidgets.QSpacerItem(20, 5, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Maximum)
self.verticalLayout_3.addItem(spacerItem4)
self.horizontalLayout_8 = QtWidgets.QHBoxLayout()
self.horizontalLayout_8.setObjectName("horizontalLayout_8")
self.btnCoverDown = QtWidgets.QPushButton(Dialog)
self.btnCoverDown.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.btnCoverDown.setObjectName("btnCoverDown")
self.horizontalLayout_8.addWidget(self.btnCoverDown)
spacerItem5 = QtWidgets.QSpacerItem(5, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_8.addItem(spacerItem5)
self.btnCoverImport = QtWidgets.QPushButton(Dialog)
self.btnCoverImport.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.btnCoverImport.setObjectName("btnCoverImport")
self.horizontalLayout_8.addWidget(self.btnCoverImport)
self.verticalLayout_3.addLayout(self.horizontalLayout_8)
spacerItem6 = QtWidgets.QSpacerItem(20, 5, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
self.verticalLayout_3.addItem(spacerItem6)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.btnCoverDel = QtWidgets.QPushButton(Dialog)
self.btnCoverDel.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.btnCoverDel.setObjectName("btnCoverDel")
self.horizontalLayout_2.addWidget(self.btnCoverDel)
spacerItem7 = QtWidgets.QSpacerItem(5, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_2.addItem(spacerItem7)
self.btnCoverGenerate = QtWidgets.QPushButton(Dialog)
self.btnCoverGenerate.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.btnCoverGenerate.setObjectName("btnCoverGenerate")
self.horizontalLayout_2.addWidget(self.btnCoverGenerate)
self.verticalLayout_3.addLayout(self.horizontalLayout_2)
spacerItem8 = QtWidgets.QSpacerItem(20, 1, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.MinimumExpanding)
self.verticalLayout_3.addItem(spacerItem8)
self.l8.addLayout(self.verticalLayout_3)
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
self.verticalLayout_2.setSpacing(0)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.label_13 = QtWidgets.QLabel(Dialog)
self.label_13.setObjectName("label_13")
self.verticalLayout_2.addWidget(self.label_13)
spacerItem9 = QtWidgets.QSpacerItem(20, 5, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Maximum)
self.verticalLayout_2.addItem(spacerItem9)
self.horizontalLayout_9 = QtWidgets.QHBoxLayout()
self.horizontalLayout_9.setObjectName("horizontalLayout_9")
self.verticalLayout_2.addLayout(self.horizontalLayout_9)
self.text_edit_synopsis = QtWidgets.QTextEdit(Dialog)
self.text_edit_synopsis.setObjectName("text_edit_synopsis")
self.verticalLayout_2.addWidget(self.text_edit_synopsis)
self.l8.addLayout(self.verticalLayout_2)
self.gridLayout.addLayout(self.l8, 14, 0, 1, 5)
self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
self.edit_authors = QtWidgets.QLineEdit(Dialog)
self.edit_authors.setObjectName("edit_authors")
self.horizontalLayout_5.addWidget(self.edit_authors)
self.btn_del_authors = QtWidgets.QPushButton(Dialog)
self.btn_del_authors.setMinimumSize(QtCore.QSize(25, 0))
self.btn_del_authors.setMaximumSize(QtCore.QSize(25, 16777215))
self.btn_del_authors.setObjectName("btn_del_authors")
self.horizontalLayout_5.addWidget(self.btn_del_authors)
self.gridLayout.addLayout(self.horizontalLayout_5, 1, 4, 1, 1)
self.line = QtWidgets.QFrame(Dialog)
self.line.setFrameShape(QtWidgets.QFrame.HLine)
self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line.setObjectName("line")
self.gridLayout.addWidget(self.line, 6, 0, 1, 5)
spacerItem10 = QtWidgets.QSpacerItem(5, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
self.gridLayout.addItem(spacerItem10, 8, 2, 1, 1)
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.edit_book_id = QtWidgets.QLineEdit(Dialog)
self.edit_book_id.setReadOnly(True)
self.edit_book_id.setObjectName("edit_book_id")
self.horizontalLayout.addWidget(self.edit_book_id)
self.btn_find_book_id = QtWidgets.QPushButton(Dialog)
self.btn_find_book_id.setObjectName("btn_find_book_id")
self.horizontalLayout.addWidget(self.btn_find_book_id)
self.btn_generate_book_id = QtWidgets.QPushButton(Dialog)
self.btn_generate_book_id.setObjectName("btn_generate_book_id")
self.horizontalLayout.addWidget(self.btn_generate_book_id)
self.gridLayout.addLayout(self.horizontalLayout, 0, 1, 1, 4)
spacerItem11 = QtWidgets.QSpacerItem(5, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
self.gridLayout.addItem(spacerItem11, 10, 2, 1, 1)
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.edit_title = QtWidgets.QLineEdit(Dialog)
self.edit_title.setObjectName("edit_title")
self.horizontalLayout_3.addWidget(self.edit_title)
self.btn_del_title = QtWidgets.QPushButton(Dialog)
self.btn_del_title.setMinimumSize(QtCore.QSize(25, 0))
self.btn_del_title.setMaximumSize(QtCore.QSize(25, 16777215))
self.btn_del_title.setObjectName("btn_del_title")
self.horizontalLayout_3.addWidget(self.btn_del_title)
self.gridLayout.addLayout(self.horizontalLayout_3, 1, 1, 1, 1)
self.label_volume = QtWidgets.QLabel(Dialog)
self.label_volume.setMinimumSize(QtCore.QSize(100, 0))
self.label_volume.setMaximumSize(QtCore.QSize(100, 16777215))
self.label_volume.setObjectName("label_volume")
self.gridLayout.addWidget(self.label_volume, 2, 3, 1, 1)
self.horizontalLayout_10 = QtWidgets.QHBoxLayout()
self.horizontalLayout_10.setObjectName("horizontalLayout_10")
self.spin_volume = QtWidgets.QDoubleSpinBox(Dialog)
self.spin_volume.setObjectName("spin_volume")
self.horizontalLayout_10.addWidget(self.spin_volume)
self.gridLayout.addLayout(self.horizontalLayout_10, 2, 4, 1, 1)
self.horizontalLayout_15 = QtWidgets.QHBoxLayout()
self.horizontalLayout_15.setObjectName("horizontalLayout_15")
self.edit_tags = QtWidgets.QLineEdit(Dialog)
self.edit_tags.setReadOnly(True)
self.edit_tags.setObjectName("edit_tags")
self.horizontalLayout_15.addWidget(self.edit_tags)
self.btn_tags = QtWidgets.QPushButton(Dialog)
self.btn_tags.setMinimumSize(QtCore.QSize(25, 0))
self.btn_tags.setMaximumSize(QtCore.QSize(25, 16777215))
self.btn_tags.setObjectName("btn_tags")
self.horizontalLayout_15.addWidget(self.btn_tags)
self.gridLayout.addLayout(self.horizontalLayout_15, 4, 1, 1, 4)
spacerItem12 = QtWidgets.QSpacerItem(5, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
self.gridLayout.addItem(spacerItem12, 1, 2, 1, 1)
self.label_2 = QtWidgets.QLabel(Dialog)
self.label_2.setObjectName("label_2")
self.gridLayout.addWidget(self.label_2, 8, 3, 1, 1)
spacerItem13 = QtWidgets.QSpacerItem(5, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
self.gridLayout.addItem(spacerItem13, 9, 2, 1, 1)
self.horizontalLayout_12 = QtWidgets.QHBoxLayout()
self.horizontalLayout_12.setObjectName("horizontalLayout_12")
self.edit_langs = QtWidgets.QLineEdit(Dialog)
self.edit_langs.setReadOnly(True)
self.edit_langs.setObjectName("edit_langs")
self.horizontalLayout_12.addWidget(self.edit_langs)
self.btn_del_langs = QtWidgets.QPushButton(Dialog)
self.btn_del_langs.setMinimumSize(QtCore.QSize(25, 0))
self.btn_del_langs.setMaximumSize(QtCore.QSize(25, 16777215))
self.btn_del_langs.setObjectName("btn_del_langs")
self.horizontalLayout_12.addWidget(self.btn_del_langs)
self.gridLayout.addLayout(self.horizontalLayout_12, 9, 4, 1, 1)
spacerItem14 = QtWidgets.QSpacerItem(5, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
self.gridLayout.addItem(spacerItem14, 2, 2, 1, 1)
spacerItem15 = QtWidgets.QSpacerItem(20, 10, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
self.gridLayout.addItem(spacerItem15, 11, 0, 1, 1)
self.verticalLayout.addLayout(self.gridLayout)
self.button_box = QtWidgets.QDialogButtonBox(Dialog)
self.button_box.setOrientation(QtCore.Qt.Horizontal)
self.button_box.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
self.button_box.setObjectName("button_box")
self.verticalLayout.addWidget(self.button_box)
self.retranslateUi(Dialog)
self.button_box.accepted.connect(Dialog.accept)
self.button_box.rejected.connect(Dialog.reject)
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog: QtWidgets.QDialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
self.btn_del_series.setText(_translate("Dialog", "D"))
self.label_tags.setText(_translate("Dialog", "Tags"))
self.label.setText(_translate("Dialog", "Files"))
self.label_title.setText(_translate("Dialog", "Title"))
self.label_authors.setText(_translate("Dialog", "Authors"))
self.btn_del_plublish_date.setText(_translate("Dialog", "D"))
self.label_plublish_date.setText(_translate("Dialog", "Publish Date"))
self.label_book_id.setText(_translate("Dialog", "book ID"))
self.label_3.setText(_translate("Dialog", "language"))
self.label_series.setText(_translate("Dialog", "Series"))
self.btn_del_editors.setText(_translate("Dialog", "D"))
self.label_cover_title.setText(_translate("Dialog", "Cover"))
self.btnCoverDown.setText(_translate("Dialog", "Down"))
self.btnCoverImport.setText(_translate("Dialog", "Import"))
self.btnCoverDel.setText(_translate("Dialog", "Del"))
self.btnCoverGenerate.setText(_translate("Dialog", "Generate"))
self.label_13.setText(_translate("Dialog", "Synopsis"))
self.btn_del_authors.setText(_translate("Dialog", "D"))
self.btn_find_book_id.setText(_translate("Dialog", "Find"))
self.btn_generate_book_id.setText(_translate("Dialog", "Generate"))
self.btn_del_title.setText(_translate("Dialog", "D"))
self.label_volume.setText(_translate("Dialog", "Volume"))
self.btn_tags.setText(_translate("Dialog", "..."))
self.label_2.setText(_translate("Dialog", "Editor"))
self.btn_del_langs.setText(_translate("Dialog", "..."))
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
Dialog = QtWidgets.QDialog()
ui = Ui_Dialog()
ui.setupUi(Dialog)
Dialog.show()
sys.exit(app.exec_())