forked from QianyanTech/Image-Downloader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui_mainwindow.py
557 lines (551 loc) · 31.5 KB
/
ui_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
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
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '.\mainwindow.ui'
#
# Created by: PyQt5 UI code generator 5.6
#
# 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(800, 718)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
MainWindow.setSizePolicy(sizePolicy)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.gridLayout_3 = QtWidgets.QGridLayout(self.centralwidget)
self.gridLayout_3.setObjectName("gridLayout_3")
self.groupBox_3 = QtWidgets.QGroupBox(self.centralwidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.groupBox_3.sizePolicy().hasHeightForWidth())
self.groupBox_3.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(10)
self.groupBox_3.setFont(font)
self.groupBox_3.setStyleSheet("QGroupBox{border:1px ridge gray;margin-top: 1ex;} QGroupBox::title{subcontrol-origin: margin;subcontrol-position:top center;padding:0 3px;}")
self.groupBox_3.setObjectName("groupBox_3")
self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox_3)
self.gridLayout_2.setContentsMargins(-1, -1, 30, -1)
self.gridLayout_2.setObjectName("gridLayout_2")
self.label_4 = QtWidgets.QLabel(self.groupBox_3)
font = QtGui.QFont()
font.setPointSize(12)
self.label_4.setFont(font)
self.label_4.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_4.setObjectName("label_4")
self.gridLayout_2.addWidget(self.label_4, 0, 0, 1, 1)
self.label_time_elapsed = QtWidgets.QLabel(self.groupBox_3)
font = QtGui.QFont()
font.setFamily("Ubuntu Mono")
font.setPointSize(12)
self.label_time_elapsed.setFont(font)
self.label_time_elapsed.setObjectName("label_time_elapsed")
self.gridLayout_2.addWidget(self.label_time_elapsed, 0, 1, 1, 1)
self.label_2 = QtWidgets.QLabel(self.groupBox_3)
font = QtGui.QFont()
font.setPointSize(12)
self.label_2.setFont(font)
self.label_2.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_2.setObjectName("label_2")
self.gridLayout_2.addWidget(self.label_2, 1, 0, 1, 1)
self.progressBar_total = QtWidgets.QProgressBar(self.groupBox_3)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.progressBar_total.sizePolicy().hasHeightForWidth())
self.progressBar_total.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setFamily("Ubuntu Mono")
font.setPointSize(12)
self.progressBar_total.setFont(font)
self.progressBar_total.setStyleSheet("")
self.progressBar_total.setMaximum(1000)
self.progressBar_total.setProperty("value", 0)
self.progressBar_total.setAlignment(QtCore.Qt.AlignCenter)
self.progressBar_total.setFormat("")
self.progressBar_total.setObjectName("progressBar_total")
self.gridLayout_2.addWidget(self.progressBar_total, 1, 1, 1, 1)
self.label_3 = QtWidgets.QLabel(self.groupBox_3)
font = QtGui.QFont()
font.setPointSize(12)
self.label_3.setFont(font)
self.label_3.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_3.setObjectName("label_3")
self.gridLayout_2.addWidget(self.label_3, 2, 0, 1, 1)
self.progressBar_current = QtWidgets.QProgressBar(self.groupBox_3)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.progressBar_current.sizePolicy().hasHeightForWidth())
self.progressBar_current.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setFamily("Ubuntu Mono")
font.setPointSize(12)
self.progressBar_current.setFont(font)
self.progressBar_current.setStyleSheet("/*\n"
"QProgressBar {\n"
" border: 2px solid gray;\n"
" background-color: rgba(0, 0, 0, 0);\n"
"}\n"
"\n"
"QProgressBar::chunk {\n"
" background-color: rgba(0, 200, 0);\n"
" width: 1px;\n"
"}*/")
self.progressBar_current.setMaximum(1000)
self.progressBar_current.setProperty("value", 0)
self.progressBar_current.setAlignment(QtCore.Qt.AlignCenter)
self.progressBar_current.setFormat("")
self.progressBar_current.setObjectName("progressBar_current")
self.gridLayout_2.addWidget(self.progressBar_current, 2, 1, 1, 1)
self.gridLayout_2.setColumnStretch(0, 1)
self.gridLayout_2.setColumnStretch(1, 3)
self.gridLayout_3.addWidget(self.groupBox_3, 1, 0, 1, 2)
self.groupBox_2 = QtWidgets.QGroupBox(self.centralwidget)
font = QtGui.QFont()
font.setPointSize(10)
self.groupBox_2.setFont(font)
self.groupBox_2.setStyleSheet("QGroupBox{border:1px ridge gray;margin-top: 1ex;} QGroupBox::title{subcontrol-origin: margin;subcontrol-position:top center;padding:0 3px;}")
self.groupBox_2.setObjectName("groupBox_2")
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.groupBox_2)
self.verticalLayout_2.setContentsMargins(30, 30, 30, 30)
self.verticalLayout_2.setSpacing(20)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.pushButton_start = QtWidgets.QPushButton(self.groupBox_2)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_start.sizePolicy().hasHeightForWidth())
self.pushButton_start.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(12)
self.pushButton_start.setFont(font)
self.pushButton_start.setObjectName("pushButton_start")
self.verticalLayout_2.addWidget(self.pushButton_start)
self.pushButton_cancel = QtWidgets.QPushButton(self.groupBox_2)
self.pushButton_cancel.setEnabled(False)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_cancel.sizePolicy().hasHeightForWidth())
self.pushButton_cancel.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(12)
self.pushButton_cancel.setFont(font)
self.pushButton_cancel.setObjectName("pushButton_cancel")
self.verticalLayout_2.addWidget(self.pushButton_cancel)
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
self.verticalLayout_2.addItem(spacerItem)
self.verticalLayout_2.setStretch(0, 1)
self.verticalLayout_2.setStretch(1, 1)
self.verticalLayout_2.setStretch(2, 1)
self.gridLayout_3.addWidget(self.groupBox_2, 0, 1, 1, 1)
self.groupBox_config = QtWidgets.QGroupBox(self.centralwidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.groupBox_config.sizePolicy().hasHeightForWidth())
self.groupBox_config.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(10)
self.groupBox_config.setFont(font)
self.groupBox_config.setStyleSheet("QGroupBox{border:1px ridge gray;margin-top: 1ex;} QGroupBox::title{subcontrol-origin: margin;subcontrol-position:top center;padding:0 3px;}")
self.groupBox_config.setFlat(False)
self.groupBox_config.setCheckable(False)
self.groupBox_config.setObjectName("groupBox_config")
self.verticalLayout = QtWidgets.QVBoxLayout(self.groupBox_config)
self.verticalLayout.setContentsMargins(20, -1, 20, -1)
self.verticalLayout.setObjectName("verticalLayout")
self.widget = QtWidgets.QWidget(self.groupBox_config)
self.widget.setObjectName("widget")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.widget)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout.setObjectName("horizontalLayout")
self.radioButton_google = QtWidgets.QRadioButton(self.widget)
font = QtGui.QFont()
font.setPointSize(12)
self.radioButton_google.setFont(font)
self.radioButton_google.setFocusPolicy(QtCore.Qt.StrongFocus)
self.radioButton_google.setChecked(True)
self.radioButton_google.setObjectName("radioButton_google")
self.buttonGroup = QtWidgets.QButtonGroup(MainWindow)
self.buttonGroup.setObjectName("buttonGroup")
self.buttonGroup.addButton(self.radioButton_google)
self.horizontalLayout.addWidget(self.radioButton_google)
self.radioButton_bing = QtWidgets.QRadioButton(self.widget)
font = QtGui.QFont()
font.setPointSize(12)
self.radioButton_bing.setFont(font)
self.radioButton_bing.setFocusPolicy(QtCore.Qt.StrongFocus)
self.radioButton_bing.setObjectName("radioButton_bing")
self.buttonGroup.addButton(self.radioButton_bing)
self.horizontalLayout.addWidget(self.radioButton_bing)
self.radioButton_baidu = QtWidgets.QRadioButton(self.widget)
font = QtGui.QFont()
font.setPointSize(12)
self.radioButton_baidu.setFont(font)
self.radioButton_baidu.setFocusPolicy(QtCore.Qt.StrongFocus)
self.radioButton_baidu.setObjectName("radioButton_baidu")
self.buttonGroup.addButton(self.radioButton_baidu)
self.horizontalLayout.addWidget(self.radioButton_baidu)
self.verticalLayout.addWidget(self.widget)
self.widget_2 = QtWidgets.QWidget(self.groupBox_config)
self.widget_2.setObjectName("widget_2")
self.gridLayout = QtWidgets.QGridLayout(self.widget_2)
self.gridLayout.setContentsMargins(0, 0, 0, 0)
self.gridLayout.setObjectName("gridLayout")
self.label = QtWidgets.QLabel(self.widget_2)
font = QtGui.QFont()
font.setPointSize(12)
font.setBold(True)
font.setWeight(75)
self.label.setFont(font)
self.label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label.setObjectName("label")
self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
self.lineEdit_keywords = QtWidgets.QLineEdit(self.widget_2)
font = QtGui.QFont()
font.setPointSize(12)
self.lineEdit_keywords.setFont(font)
self.lineEdit_keywords.setWhatsThis("")
self.lineEdit_keywords.setInputMask("")
self.lineEdit_keywords.setObjectName("lineEdit_keywords")
self.gridLayout.addWidget(self.lineEdit_keywords, 0, 1, 1, 2)
self.checkBox_from_file = QtWidgets.QCheckBox(self.widget_2)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.checkBox_from_file.sizePolicy().hasHeightForWidth())
self.checkBox_from_file.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(12)
font.setUnderline(False)
self.checkBox_from_file.setFont(font)
self.checkBox_from_file.setObjectName("checkBox_from_file")
self.gridLayout.addWidget(self.checkBox_from_file, 1, 0, 1, 1)
self.lineEdit_path2file = QtWidgets.QLineEdit(self.widget_2)
self.lineEdit_path2file.setEnabled(False)
font = QtGui.QFont()
font.setPointSize(12)
self.lineEdit_path2file.setFont(font)
self.lineEdit_path2file.setObjectName("lineEdit_path2file")
self.gridLayout.addWidget(self.lineEdit_path2file, 1, 1, 1, 1)
self.pushButton_load_file = QtWidgets.QPushButton(self.widget_2)
self.pushButton_load_file.setEnabled(False)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_load_file.sizePolicy().hasHeightForWidth())
self.pushButton_load_file.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(12)
self.pushButton_load_file.setFont(font)
self.pushButton_load_file.setObjectName("pushButton_load_file")
self.gridLayout.addWidget(self.pushButton_load_file, 1, 2, 1, 1)
self.gridLayout.setColumnStretch(0, 2)
self.gridLayout.setColumnStretch(1, 6)
self.gridLayout.setColumnStretch(2, 1)
self.verticalLayout.addWidget(self.widget_2)
self.widget_6 = QtWidgets.QWidget(self.groupBox_config)
self.widget_6.setObjectName("widget_6")
self.horizontalLayout_5 = QtWidgets.QHBoxLayout(self.widget_6)
self.horizontalLayout_5.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout_5.setSpacing(6)
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
self.label_7 = QtWidgets.QLabel(self.widget_6)
font = QtGui.QFont()
font.setPointSize(12)
font.setBold(True)
font.setWeight(75)
self.label_7.setFont(font)
self.label_7.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_7.setObjectName("label_7")
self.horizontalLayout_5.addWidget(self.label_7)
self.lineEdit_output = QtWidgets.QLineEdit(self.widget_6)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lineEdit_output.sizePolicy().hasHeightForWidth())
self.lineEdit_output.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(12)
self.lineEdit_output.setFont(font)
self.lineEdit_output.setInputMask("")
self.lineEdit_output.setObjectName("lineEdit_output")
self.horizontalLayout_5.addWidget(self.lineEdit_output)
self.pushButton_output = QtWidgets.QPushButton(self.widget_6)
self.pushButton_output.setEnabled(True)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_output.sizePolicy().hasHeightForWidth())
self.pushButton_output.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(12)
self.pushButton_output.setFont(font)
self.pushButton_output.setObjectName("pushButton_output")
self.horizontalLayout_5.addWidget(self.pushButton_output)
self.horizontalLayout_5.setStretch(0, 2)
self.horizontalLayout_5.setStretch(1, 6)
self.horizontalLayout_5.setStretch(2, 1)
self.verticalLayout.addWidget(self.widget_6)
self.widget_3 = QtWidgets.QWidget(self.groupBox_config)
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")
self.checkBox_face_only = QtWidgets.QCheckBox(self.widget_3)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.checkBox_face_only.sizePolicy().hasHeightForWidth())
self.checkBox_face_only.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(12)
self.checkBox_face_only.setFont(font)
self.checkBox_face_only.setObjectName("checkBox_face_only")
self.horizontalLayout_4.addWidget(self.checkBox_face_only)
self.checkBox_safe_mode = QtWidgets.QCheckBox(self.widget_3)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.checkBox_safe_mode.sizePolicy().hasHeightForWidth())
self.checkBox_safe_mode.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(12)
self.checkBox_safe_mode.setFont(font)
self.checkBox_safe_mode.setCheckable(True)
self.checkBox_safe_mode.setChecked(True)
self.checkBox_safe_mode.setObjectName("checkBox_safe_mode")
self.horizontalLayout_4.addWidget(self.checkBox_safe_mode)
self.label_6 = QtWidgets.QLabel(self.widget_3)
font = QtGui.QFont()
font.setPointSize(12)
self.label_6.setFont(font)
self.label_6.setObjectName("label_6")
self.horizontalLayout_4.addWidget(self.label_6)
self.spinBox_max_number = QtWidgets.QSpinBox(self.widget_3)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.spinBox_max_number.sizePolicy().hasHeightForWidth())
self.spinBox_max_number.setSizePolicy(sizePolicy)
self.spinBox_max_number.setMinimumSize(QtCore.QSize(0, 40))
font = QtGui.QFont()
font.setPointSize(12)
self.spinBox_max_number.setFont(font)
self.spinBox_max_number.setMinimum(1)
self.spinBox_max_number.setMaximum(2000)
self.spinBox_max_number.setProperty("value", 100)
self.spinBox_max_number.setObjectName("spinBox_max_number")
self.horizontalLayout_4.addWidget(self.spinBox_max_number)
self.label_5 = QtWidgets.QLabel(self.widget_3)
font = QtGui.QFont()
font.setPointSize(12)
self.label_5.setFont(font)
self.label_5.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_5.setObjectName("label_5")
self.horizontalLayout_4.addWidget(self.label_5)
self.spinBox_num_threads = QtWidgets.QSpinBox(self.widget_3)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.spinBox_num_threads.sizePolicy().hasHeightForWidth())
self.spinBox_num_threads.setSizePolicy(sizePolicy)
self.spinBox_num_threads.setMinimumSize(QtCore.QSize(0, 40))
font = QtGui.QFont()
font.setPointSize(12)
self.spinBox_num_threads.setFont(font)
self.spinBox_num_threads.setMinimum(1)
self.spinBox_num_threads.setMaximum(200)
self.spinBox_num_threads.setProperty("value", 50)
self.spinBox_num_threads.setObjectName("spinBox_num_threads")
self.horizontalLayout_4.addWidget(self.spinBox_num_threads)
self.horizontalLayout_4.setStretch(0, 2)
self.horizontalLayout_4.setStretch(1, 2)
self.horizontalLayout_4.setStretch(4, 1)
self.horizontalLayout_4.setStretch(5, 1)
self.verticalLayout.addWidget(self.widget_3)
self.widget_4 = QtWidgets.QWidget(self.groupBox_config)
self.widget_4.setObjectName("widget_4")
self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.widget_4)
self.horizontalLayout_2.setContentsMargins(0, 9, 0, 9)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.checkBox_proxy = QtWidgets.QCheckBox(self.widget_4)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.checkBox_proxy.sizePolicy().hasHeightForWidth())
self.checkBox_proxy.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(12)
self.checkBox_proxy.setFont(font)
self.checkBox_proxy.setObjectName("checkBox_proxy")
self.horizontalLayout_2.addWidget(self.checkBox_proxy)
self.widget_5 = QtWidgets.QWidget(self.widget_4)
self.widget_5.setEnabled(False)
self.widget_5.setObjectName("widget_5")
self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.widget_5)
self.horizontalLayout_3.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.radioButton_http = QtWidgets.QRadioButton(self.widget_5)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.radioButton_http.sizePolicy().hasHeightForWidth())
self.radioButton_http.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(12)
self.radioButton_http.setFont(font)
self.radioButton_http.setFocusPolicy(QtCore.Qt.TabFocus)
self.radioButton_http.setChecked(True)
self.radioButton_http.setObjectName("radioButton_http")
self.buttonGroup_2 = QtWidgets.QButtonGroup(MainWindow)
self.buttonGroup_2.setObjectName("buttonGroup_2")
self.buttonGroup_2.addButton(self.radioButton_http)
self.horizontalLayout_3.addWidget(self.radioButton_http)
self.radioButton_socks5 = QtWidgets.QRadioButton(self.widget_5)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.radioButton_socks5.sizePolicy().hasHeightForWidth())
self.radioButton_socks5.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(12)
self.radioButton_socks5.setFont(font)
self.radioButton_socks5.setFocusPolicy(QtCore.Qt.TabFocus)
self.radioButton_socks5.setChecked(False)
self.radioButton_socks5.setObjectName("radioButton_socks5")
self.buttonGroup_2.addButton(self.radioButton_socks5)
self.horizontalLayout_3.addWidget(self.radioButton_socks5)
self.lineEdit_proxy = QtWidgets.QLineEdit(self.widget_5)
font = QtGui.QFont()
font.setPointSize(12)
self.lineEdit_proxy.setFont(font)
self.lineEdit_proxy.setObjectName("lineEdit_proxy")
self.horizontalLayout_3.addWidget(self.lineEdit_proxy)
self.horizontalLayout_3.setStretch(0, 1)
self.horizontalLayout_3.setStretch(1, 1)
self.horizontalLayout_3.setStretch(2, 4)
self.horizontalLayout_2.addWidget(self.widget_5)
self.horizontalLayout_2.setStretch(0, 1)
self.horizontalLayout_2.setStretch(1, 5)
self.verticalLayout.addWidget(self.widget_4)
self.verticalLayout.setStretch(0, 1)
self.verticalLayout.setStretch(1, 2)
self.verticalLayout.setStretch(2, 1)
self.verticalLayout.setStretch(3, 2)
self.verticalLayout.setStretch(4, 1)
self.gridLayout_3.addWidget(self.groupBox_config, 0, 0, 1, 1)
self.plainTextEdit_log = QtWidgets.QPlainTextEdit(self.centralwidget)
font = QtGui.QFont()
font.setFamily("Ubuntu Mono")
self.plainTextEdit_log.setFont(font)
self.plainTextEdit_log.setReadOnly(True)
self.plainTextEdit_log.setPlainText("")
self.plainTextEdit_log.setTabStopWidth(4)
self.plainTextEdit_log.setMaximumBlockCount(0)
self.plainTextEdit_log.setObjectName("plainTextEdit_log")
self.gridLayout_3.addWidget(self.plainTextEdit_log, 2, 0, 1, 2)
self.gridLayout_3.setColumnStretch(0, 8)
self.gridLayout_3.setColumnStretch(1, 2)
self.gridLayout_3.setRowStretch(0, 7)
self.gridLayout_3.setRowStretch(1, 3)
self.gridLayout_3.setRowStretch(2, 4)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 23))
self.menubar.setObjectName("menubar")
self.menuAbout = QtWidgets.QMenu(self.menubar)
self.menuAbout.setObjectName("menuAbout")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.actionAbout = QtWidgets.QAction(MainWindow)
self.actionAbout.setObjectName("actionAbout")
self.menuAbout.addAction(self.actionAbout)
self.menubar.addAction(self.menuAbout.menuAction())
self.label.setBuddy(self.lineEdit_keywords)
self.label_7.setBuddy(self.lineEdit_output)
self.label_6.setBuddy(self.spinBox_max_number)
self.label_5.setBuddy(self.spinBox_num_threads)
self.retranslateUi(MainWindow)
self.checkBox_from_file.clicked['bool'].connect(self.lineEdit_keywords.setDisabled)
self.checkBox_from_file.clicked['bool'].connect(self.pushButton_load_file.setEnabled)
self.checkBox_from_file.clicked['bool'].connect(self.lineEdit_path2file.setEnabled)
self.checkBox_proxy.clicked['bool'].connect(self.widget_5.setEnabled)
self.checkBox_proxy.clicked['bool'].connect(self.lineEdit_proxy.setFocus)
self.radioButton_google.toggled['bool'].connect(self.checkBox_safe_mode.setEnabled)
self.radioButton_bing.toggled['bool'].connect(self.checkBox_safe_mode.setChecked)
self.radioButton_baidu.toggled['bool'].connect(self.checkBox_safe_mode.setChecked)
self.radioButton_google.toggled['bool'].connect(self.checkBox_safe_mode.setChecked)
self.checkBox_from_file.clicked['bool'].connect(self.pushButton_load_file.click)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
MainWindow.setTabOrder(self.lineEdit_keywords, self.checkBox_from_file)
MainWindow.setTabOrder(self.checkBox_from_file, self.lineEdit_path2file)
MainWindow.setTabOrder(self.lineEdit_path2file, self.pushButton_load_file)
MainWindow.setTabOrder(self.pushButton_load_file, self.lineEdit_output)
MainWindow.setTabOrder(self.lineEdit_output, self.pushButton_output)
MainWindow.setTabOrder(self.pushButton_output, self.checkBox_face_only)
MainWindow.setTabOrder(self.checkBox_face_only, self.checkBox_safe_mode)
MainWindow.setTabOrder(self.checkBox_safe_mode, self.spinBox_max_number)
MainWindow.setTabOrder(self.spinBox_max_number, self.spinBox_num_threads)
MainWindow.setTabOrder(self.spinBox_num_threads, self.checkBox_proxy)
MainWindow.setTabOrder(self.checkBox_proxy, self.radioButton_http)
MainWindow.setTabOrder(self.radioButton_http, self.radioButton_socks5)
MainWindow.setTabOrder(self.radioButton_socks5, self.lineEdit_proxy)
MainWindow.setTabOrder(self.lineEdit_proxy, self.pushButton_start)
MainWindow.setTabOrder(self.pushButton_start, self.pushButton_cancel)
MainWindow.setTabOrder(self.pushButton_cancel, self.radioButton_google)
MainWindow.setTabOrder(self.radioButton_google, self.radioButton_bing)
MainWindow.setTabOrder(self.radioButton_bing, self.radioButton_baidu)
MainWindow.setTabOrder(self.radioButton_baidu, self.plainTextEdit_log)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
self.groupBox_3.setTitle(_translate("MainWindow", "Progress"))
self.label_4.setText(_translate("MainWindow", "Time Elapsed:"))
self.label_time_elapsed.setText(_translate("MainWindow", "00:00:00"))
self.label_2.setText(_translate("MainWindow", "Total Progress:"))
self.label_3.setText(_translate("MainWindow", "Current Progress:"))
self.groupBox_2.setTitle(_translate("MainWindow", "Control"))
self.pushButton_start.setText(_translate("MainWindow", "Start"))
self.pushButton_start.setShortcut(_translate("MainWindow", "Return"))
self.pushButton_cancel.setText(_translate("MainWindow", "&Cancle"))
self.groupBox_config.setTitle(_translate("MainWindow", "Config"))
self.radioButton_google.setText(_translate("MainWindow", "&Google"))
self.radioButton_bing.setText(_translate("MainWindow", "&Bing"))
self.radioButton_baidu.setText(_translate("MainWindow", "B&aidu"))
self.label.setText(_translate("MainWindow", "&Keywords:"))
self.lineEdit_keywords.setToolTip(_translate("MainWindow", "Input keywords, seperated by comma \", \""))
self.lineEdit_keywords.setStatusTip(_translate("MainWindow", "Hint: e.g. To download image of Micheal Jordan and Yao Ming, input \"Micheal Jordan, Yao Ming\""))
self.lineEdit_keywords.setPlaceholderText(_translate("MainWindow", "Seperates by comma ( , )"))
self.checkBox_from_file.setText(_translate("MainWindow", "&Load File:"))
self.lineEdit_path2file.setStatusTip(_translate("MainWindow", "Hint: Enter path to a text file. Each line of the file contains a group of keywords"))
self.lineEdit_path2file.setPlaceholderText(_translate("MainWindow", "Path to file"))
self.pushButton_load_file.setText(_translate("MainWindow", "..."))
self.label_7.setText(_translate("MainWindow", "&Output:"))
self.lineEdit_output.setToolTip(_translate("MainWindow", "Path to output directory."))
self.lineEdit_output.setStatusTip(_translate("MainWindow", "Path to output directory."))
self.lineEdit_output.setText(_translate("MainWindow", "./download_images"))
self.lineEdit_output.setPlaceholderText(_translate("MainWindow", "Path to output directory."))
self.pushButton_output.setText(_translate("MainWindow", "..."))
self.checkBox_face_only.setText(_translate("MainWindow", "&Face Only"))
self.checkBox_safe_mode.setText(_translate("MainWindow", "&Safe Mode"))
self.label_6.setText(_translate("MainWindow", "Max &number\n"
"per keywords"))
self.label_5.setText(_translate("MainWindow", "&Threads:"))
self.checkBox_proxy.setText(_translate("MainWindow", "&Proxy:"))
self.radioButton_http.setText(_translate("MainWindow", "HTTP"))
self.radioButton_socks5.setText(_translate("MainWindow", "Socks5"))
self.lineEdit_proxy.setToolTip(_translate("MainWindow", "input ip:port"))
self.lineEdit_proxy.setStatusTip(_translate("MainWindow", "xxx.xxx.xxx.xx:port"))
self.lineEdit_proxy.setPlaceholderText(_translate("MainWindow", "xxx.xxx.xxx.xx:port"))
self.menuAbout.setTitle(_translate("MainWindow", "Help"))
self.actionAbout.setText(_translate("MainWindow", "About"))