-
Notifications
You must be signed in to change notification settings - Fork 23
/
eliteOCRGUI.py
628 lines (620 loc) · 38 KB
/
eliteOCRGUI.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
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'eliteOCRGUI.ui'
#
# Created: Fri May 22 02:30:30 2015
# by: PyQt4 UI code generator 4.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName(_fromUtf8("MainWindow"))
MainWindow.resize(1110, 625)
MainWindow.setFocusPolicy(QtCore.Qt.TabFocus)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/ico/icon.ico")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
MainWindow.setWindowIcon(icon)
self.centralwidget = QtGui.QWidget(MainWindow)
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
self.verticalLayout_4 = QtGui.QVBoxLayout(self.centralwidget)
self.verticalLayout_4.setContentsMargins(-1, 1, -1, -1)
self.verticalLayout_4.setObjectName(_fromUtf8("verticalLayout_4"))
self.horizontalLayout_6 = QtGui.QHBoxLayout()
self.horizontalLayout_6.setSpacing(1)
self.horizontalLayout_6.setObjectName(_fromUtf8("horizontalLayout_6"))
self.label_2 = QtGui.QLabel(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
self.label_2.setSizePolicy(sizePolicy)
self.label_2.setMaximumSize(QtCore.QSize(16777215, 18))
self.label_2.setTextFormat(QtCore.Qt.RichText)
self.label_2.setOpenExternalLinks(True)
self.label_2.setObjectName(_fromUtf8("label_2"))
self.horizontalLayout_6.addWidget(self.label_2)
spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.horizontalLayout_6.addItem(spacerItem)
self.verticalLayout_4.addLayout(self.horizontalLayout_6)
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.verticalLayout_2 = QtGui.QVBoxLayout()
self.verticalLayout_2.setSpacing(1)
self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
self.horizontalLayout_5 = QtGui.QHBoxLayout()
self.horizontalLayout_5.setObjectName(_fromUtf8("horizontalLayout_5"))
self.add_button = QtGui.QToolButton(self.centralwidget)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/ico/plus.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.add_button.setIcon(icon1)
self.add_button.setObjectName(_fromUtf8("add_button"))
self.horizontalLayout_5.addWidget(self.add_button)
self.remove_button = QtGui.QToolButton(self.centralwidget)
self.remove_button.setEnabled(False)
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/ico/minus.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.remove_button.setIcon(icon2)
self.remove_button.setObjectName(_fromUtf8("remove_button"))
self.horizontalLayout_5.addWidget(self.remove_button)
self.verticalLayout_2.addLayout(self.horizontalLayout_5)
self.horizontalLayout_3 = QtGui.QHBoxLayout()
self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
self.add_all_button = QtGui.QPushButton(self.centralwidget)
self.add_all_button.setObjectName(_fromUtf8("add_all_button"))
self.horizontalLayout_3.addWidget(self.add_all_button)
self.remove_all_button = QtGui.QPushButton(self.centralwidget)
self.remove_all_button.setEnabled(False)
self.remove_all_button.setObjectName(_fromUtf8("remove_all_button"))
self.horizontalLayout_3.addWidget(self.remove_all_button)
self.verticalLayout_2.addLayout(self.horizontalLayout_3)
self.file_list = QtGui.QListWidget(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.file_list.sizePolicy().hasHeightForWidth())
self.file_list.setSizePolicy(sizePolicy)
self.file_list.setMinimumSize(QtCore.QSize(0, 0))
self.file_list.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.file_list.setObjectName(_fromUtf8("file_list"))
self.verticalLayout_2.addWidget(self.file_list)
self.horizontalLayout.addLayout(self.verticalLayout_2)
self.line = QtGui.QFrame(self.centralwidget)
self.line.setFrameShape(QtGui.QFrame.VLine)
self.line.setFrameShadow(QtGui.QFrame.Sunken)
self.line.setObjectName(_fromUtf8("line"))
self.horizontalLayout.addWidget(self.line)
self.verticalLayout_3 = QtGui.QVBoxLayout()
self.verticalLayout_3.setSpacing(2)
self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
self.horizontalLayout_7 = QtGui.QHBoxLayout()
self.horizontalLayout_7.setObjectName(_fromUtf8("horizontalLayout_7"))
self.ocr_button = QtGui.QPushButton(self.centralwidget)
self.ocr_button.setEnabled(False)
self.ocr_button.setObjectName(_fromUtf8("ocr_button"))
self.horizontalLayout_7.addWidget(self.ocr_button)
self.ocr_all = QtGui.QPushButton(self.centralwidget)
self.ocr_all.setEnabled(False)
self.ocr_all.setObjectName(_fromUtf8("ocr_all"))
self.horizontalLayout_7.addWidget(self.ocr_all)
spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.horizontalLayout_7.addItem(spacerItem1)
self.verticalLayout_3.addLayout(self.horizontalLayout_7)
self.horizontalLayout_8 = QtGui.QHBoxLayout()
self.horizontalLayout_8.setObjectName(_fromUtf8("horizontalLayout_8"))
self.label_3 = QtGui.QLabel(self.centralwidget)
self.label_3.setObjectName(_fromUtf8("label_3"))
self.horizontalLayout_8.addWidget(self.label_3)
self.system_name = QtGui.QLineEdit(self.centralwidget)
self.system_name.setMinimumSize(QtCore.QSize(0, 30))
self.system_name.setObjectName(_fromUtf8("system_name"))
self.horizontalLayout_8.addWidget(self.system_name)
self.verticalLayout_3.addLayout(self.horizontalLayout_8)
self.horizontalLayout_9 = QtGui.QHBoxLayout()
self.horizontalLayout_9.setObjectName(_fromUtf8("horizontalLayout_9"))
self.label_4 = QtGui.QLabel(self.centralwidget)
self.label_4.setObjectName(_fromUtf8("label_4"))
self.horizontalLayout_9.addWidget(self.label_4)
self.station_name_img = QtGui.QGraphicsView(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.station_name_img.sizePolicy().hasHeightForWidth())
self.station_name_img.setSizePolicy(sizePolicy)
self.station_name_img.setMinimumSize(QtCore.QSize(0, 30))
self.station_name_img.setMaximumSize(QtCore.QSize(16777215, 30))
self.station_name_img.setFocusPolicy(QtCore.Qt.NoFocus)
self.station_name_img.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.station_name_img.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.station_name_img.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.station_name_img.setObjectName(_fromUtf8("station_name_img"))
self.horizontalLayout_9.addWidget(self.station_name_img)
self.station_name = QtGui.QLineEdit(self.centralwidget)
self.station_name.setMinimumSize(QtCore.QSize(0, 30))
self.station_name.setObjectName(_fromUtf8("station_name"))
self.horizontalLayout_9.addWidget(self.station_name)
self.verticalLayout_3.addLayout(self.horizontalLayout_9)
self.horizontalLayout_10 = QtGui.QHBoxLayout()
self.horizontalLayout_10.setObjectName(_fromUtf8("horizontalLayout_10"))
self.gridLayout = QtGui.QGridLayout()
self.gridLayout.setVerticalSpacing(2)
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
self.label_7 = QtGui.QLabel(self.centralwidget)
self.label_7.setAlignment(QtCore.Qt.AlignCenter)
self.label_7.setObjectName(_fromUtf8("label_7"))
self.gridLayout.addWidget(self.label_7, 0, 2, 1, 1)
self.label_10 = QtGui.QLabel(self.centralwidget)
self.label_10.setAlignment(QtCore.Qt.AlignCenter)
self.label_10.setObjectName(_fromUtf8("label_10"))
self.gridLayout.addWidget(self.label_10, 0, 5, 1, 1)
self.name_img = QtGui.QGraphicsView(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.name_img.sizePolicy().hasHeightForWidth())
self.name_img.setSizePolicy(sizePolicy)
self.name_img.setMinimumSize(QtCore.QSize(0, 30))
self.name_img.setMaximumSize(QtCore.QSize(16777215, 25))
self.name_img.setFocusPolicy(QtCore.Qt.NoFocus)
self.name_img.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.name_img.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.name_img.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.name_img.setObjectName(_fromUtf8("name_img"))
self.gridLayout.addWidget(self.name_img, 1, 0, 1, 1)
self.label_8 = QtGui.QLabel(self.centralwidget)
self.label_8.setAlignment(QtCore.Qt.AlignCenter)
self.label_8.setObjectName(_fromUtf8("label_8"))
self.gridLayout.addWidget(self.label_8, 0, 3, 1, 1)
self.demand = QtGui.QLineEdit(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(3)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.demand.sizePolicy().hasHeightForWidth())
self.demand.setSizePolicy(sizePolicy)
self.demand.setMinimumSize(QtCore.QSize(0, 30))
self.demand.setObjectName(_fromUtf8("demand"))
self.gridLayout.addWidget(self.demand, 2, 4, 1, 1)
self.supply = QtGui.QLineEdit(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(3)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.supply.sizePolicy().hasHeightForWidth())
self.supply.setSizePolicy(sizePolicy)
self.supply.setMinimumSize(QtCore.QSize(0, 30))
self.supply.setObjectName(_fromUtf8("supply"))
self.gridLayout.addWidget(self.supply, 2, 6, 1, 1)
self.supply_text_img = QtGui.QGraphicsView(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.supply_text_img.sizePolicy().hasHeightForWidth())
self.supply_text_img.setSizePolicy(sizePolicy)
self.supply_text_img.setMinimumSize(QtCore.QSize(0, 30))
self.supply_text_img.setMaximumSize(QtCore.QSize(16777215, 25))
self.supply_text_img.setFocusPolicy(QtCore.Qt.NoFocus)
self.supply_text_img.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.supply_text_img.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.supply_text_img.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.supply_text_img.setObjectName(_fromUtf8("supply_text_img"))
self.gridLayout.addWidget(self.supply_text_img, 1, 6, 1, 1)
self.sell = QtGui.QLineEdit(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(12)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.sell.sizePolicy().hasHeightForWidth())
self.sell.setSizePolicy(sizePolicy)
self.sell.setMinimumSize(QtCore.QSize(0, 30))
self.sell.setObjectName(_fromUtf8("sell"))
self.gridLayout.addWidget(self.sell, 2, 1, 1, 1)
self.name = QtGui.QLineEdit(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(43)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.name.sizePolicy().hasHeightForWidth())
self.name.setSizePolicy(sizePolicy)
self.name.setMinimumSize(QtCore.QSize(0, 30))
self.name.setObjectName(_fromUtf8("name"))
self.gridLayout.addWidget(self.name, 2, 0, 1, 1)
self.buy = QtGui.QLineEdit(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(12)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.buy.sizePolicy().hasHeightForWidth())
self.buy.setSizePolicy(sizePolicy)
self.buy.setMinimumSize(QtCore.QSize(0, 30))
self.buy.setObjectName(_fromUtf8("buy"))
self.gridLayout.addWidget(self.buy, 2, 2, 1, 1)
self.demand_num = QtGui.QLineEdit(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(14)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.demand_num.sizePolicy().hasHeightForWidth())
self.demand_num.setSizePolicy(sizePolicy)
self.demand_num.setMinimumSize(QtCore.QSize(0, 30))
self.demand_num.setObjectName(_fromUtf8("demand_num"))
self.gridLayout.addWidget(self.demand_num, 2, 3, 1, 1)
self.demand_img = QtGui.QGraphicsView(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.demand_img.sizePolicy().hasHeightForWidth())
self.demand_img.setSizePolicy(sizePolicy)
self.demand_img.setMinimumSize(QtCore.QSize(0, 30))
self.demand_img.setMaximumSize(QtCore.QSize(16777215, 25))
self.demand_img.setFocusPolicy(QtCore.Qt.NoFocus)
self.demand_img.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.demand_img.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.demand_img.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.demand_img.setObjectName(_fromUtf8("demand_img"))
self.gridLayout.addWidget(self.demand_img, 1, 3, 1, 1)
self.demand_text_img = QtGui.QGraphicsView(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.demand_text_img.sizePolicy().hasHeightForWidth())
self.demand_text_img.setSizePolicy(sizePolicy)
self.demand_text_img.setMinimumSize(QtCore.QSize(0, 30))
self.demand_text_img.setMaximumSize(QtCore.QSize(16777215, 25))
self.demand_text_img.setFocusPolicy(QtCore.Qt.NoFocus)
self.demand_text_img.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.demand_text_img.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.demand_text_img.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.demand_text_img.setObjectName(_fromUtf8("demand_text_img"))
self.gridLayout.addWidget(self.demand_text_img, 1, 4, 1, 1)
self.supply_img = QtGui.QGraphicsView(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.supply_img.sizePolicy().hasHeightForWidth())
self.supply_img.setSizePolicy(sizePolicy)
self.supply_img.setMinimumSize(QtCore.QSize(0, 30))
self.supply_img.setMaximumSize(QtCore.QSize(16777215, 25))
self.supply_img.setFocusPolicy(QtCore.Qt.NoFocus)
self.supply_img.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.supply_img.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.supply_img.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.supply_img.setObjectName(_fromUtf8("supply_img"))
self.gridLayout.addWidget(self.supply_img, 1, 5, 1, 1)
self.label_6 = QtGui.QLabel(self.centralwidget)
self.label_6.setAlignment(QtCore.Qt.AlignCenter)
self.label_6.setObjectName(_fromUtf8("label_6"))
self.gridLayout.addWidget(self.label_6, 0, 1, 1, 1)
self.label_5 = QtGui.QLabel(self.centralwidget)
self.label_5.setAlignment(QtCore.Qt.AlignCenter)
self.label_5.setObjectName(_fromUtf8("label_5"))
self.gridLayout.addWidget(self.label_5, 0, 0, 1, 1)
self.sell_img = QtGui.QGraphicsView(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.sell_img.sizePolicy().hasHeightForWidth())
self.sell_img.setSizePolicy(sizePolicy)
self.sell_img.setMinimumSize(QtCore.QSize(0, 30))
self.sell_img.setMaximumSize(QtCore.QSize(16777215, 25))
self.sell_img.setFocusPolicy(QtCore.Qt.NoFocus)
self.sell_img.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.sell_img.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.sell_img.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.sell_img.setObjectName(_fromUtf8("sell_img"))
self.gridLayout.addWidget(self.sell_img, 1, 1, 1, 1)
self.buy_img = QtGui.QGraphicsView(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.buy_img.sizePolicy().hasHeightForWidth())
self.buy_img.setSizePolicy(sizePolicy)
self.buy_img.setMinimumSize(QtCore.QSize(0, 30))
self.buy_img.setMaximumSize(QtCore.QSize(16777215, 25))
self.buy_img.setFocusPolicy(QtCore.Qt.NoFocus)
self.buy_img.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.buy_img.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.buy_img.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.buy_img.setObjectName(_fromUtf8("buy_img"))
self.gridLayout.addWidget(self.buy_img, 1, 2, 1, 1)
self.supply_num = QtGui.QLineEdit(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(14)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.supply_num.sizePolicy().hasHeightForWidth())
self.supply_num.setSizePolicy(sizePolicy)
self.supply_num.setMinimumSize(QtCore.QSize(0, 30))
self.supply_num.setObjectName(_fromUtf8("supply_num"))
self.gridLayout.addWidget(self.supply_num, 2, 5, 1, 1)
self.horizontalLayout_10.addLayout(self.gridLayout)
self.verticalLayout = QtGui.QVBoxLayout()
self.verticalLayout.setSpacing(0)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.save_button = QtGui.QPushButton(self.centralwidget)
self.save_button.setEnabled(False)
self.save_button.setObjectName(_fromUtf8("save_button"))
self.verticalLayout.addWidget(self.save_button)
self.skip_button = QtGui.QPushButton(self.centralwidget)
self.skip_button.setEnabled(False)
self.skip_button.setObjectName(_fromUtf8("skip_button"))
self.verticalLayout.addWidget(self.skip_button)
self.continue_button = QtGui.QPushButton(self.centralwidget)
self.continue_button.setEnabled(False)
self.continue_button.setObjectName(_fromUtf8("continue_button"))
self.verticalLayout.addWidget(self.continue_button)
self.horizontalLayout_10.addLayout(self.verticalLayout)
self.verticalLayout_3.addLayout(self.horizontalLayout_10)
self.horizontalLayout.addLayout(self.verticalLayout_3)
self.verticalLayout_4.addLayout(self.horizontalLayout)
self.horizontalLayout_2 = QtGui.QHBoxLayout()
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
self.label_12 = QtGui.QLabel(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_12.sizePolicy().hasHeightForWidth())
self.label_12.setSizePolicy(sizePolicy)
self.label_12.setMinimumSize(QtCore.QSize(0, 15))
self.label_12.setMaximumSize(QtCore.QSize(16777215, 15))
self.label_12.setObjectName(_fromUtf8("label_12"))
self.horizontalLayout_2.addWidget(self.label_12)
self.file_label = QtGui.QLabel(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.file_label.sizePolicy().hasHeightForWidth())
self.file_label.setSizePolicy(sizePolicy)
self.file_label.setMinimumSize(QtCore.QSize(0, 15))
self.file_label.setMaximumSize(QtCore.QSize(16777215, 15))
self.file_label.setObjectName(_fromUtf8("file_label"))
self.horizontalLayout_2.addWidget(self.file_label)
self.system_not_found = QtGui.QLabel(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.system_not_found.sizePolicy().hasHeightForWidth())
self.system_not_found.setSizePolicy(sizePolicy)
self.system_not_found.setMinimumSize(QtCore.QSize(0, 15))
self.system_not_found.setMaximumSize(QtCore.QSize(16777215, 15))
self.system_not_found.setStyleSheet(_fromUtf8("color: #d00"))
self.system_not_found.setWordWrap(True)
self.system_not_found.setObjectName(_fromUtf8("system_not_found"))
self.horizontalLayout_2.addWidget(self.system_not_found)
self.verticalLayout_4.addLayout(self.horizontalLayout_2)
self.splitter = QtGui.QSplitter(self.centralwidget)
self.splitter.setOrientation(QtCore.Qt.Horizontal)
self.splitter.setObjectName(_fromUtf8("splitter"))
self.preview = QtGui.QGraphicsView(self.splitter)
self.preview.setFocusPolicy(QtCore.Qt.NoFocus)
self.preview.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.preview.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.preview.setDragMode(QtGui.QGraphicsView.ScrollHandDrag)
self.preview.setObjectName(_fromUtf8("preview"))
self.result_table = CustomQTableWidget(self.splitter)
self.result_table.setObjectName(_fromUtf8("result_table"))
self.result_table.setColumnCount(12)
self.result_table.setRowCount(0)
item = QtGui.QTableWidgetItem()
self.result_table.setHorizontalHeaderItem(0, item)
item = QtGui.QTableWidgetItem()
self.result_table.setHorizontalHeaderItem(1, item)
item = QtGui.QTableWidgetItem()
self.result_table.setHorizontalHeaderItem(2, item)
item = QtGui.QTableWidgetItem()
self.result_table.setHorizontalHeaderItem(3, item)
item = QtGui.QTableWidgetItem()
self.result_table.setHorizontalHeaderItem(4, item)
item = QtGui.QTableWidgetItem()
self.result_table.setHorizontalHeaderItem(5, item)
item = QtGui.QTableWidgetItem()
self.result_table.setHorizontalHeaderItem(6, item)
item = QtGui.QTableWidgetItem()
self.result_table.setHorizontalHeaderItem(7, item)
item = QtGui.QTableWidgetItem()
self.result_table.setHorizontalHeaderItem(8, item)
item = QtGui.QTableWidgetItem()
self.result_table.setHorizontalHeaderItem(9, item)
item = QtGui.QTableWidgetItem()
self.result_table.setHorizontalHeaderItem(10, item)
item = QtGui.QTableWidgetItem()
self.result_table.setHorizontalHeaderItem(11, item)
self.verticalLayout_4.addWidget(self.splitter)
self.horizontalLayout_4 = QtGui.QHBoxLayout()
self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4"))
self.factor = QtGui.QDoubleSpinBox(self.centralwidget)
self.factor.setMinimum(1.0)
self.factor.setMaximum(5.0)
self.factor.setSingleStep(0.25)
self.factor.setObjectName(_fromUtf8("factor"))
self.horizontalLayout_4.addWidget(self.factor)
self.zoom_button = QtGui.QPushButton(self.centralwidget)
self.zoom_button.setObjectName(_fromUtf8("zoom_button"))
self.horizontalLayout_4.addWidget(self.zoom_button)
spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.horizontalLayout_4.addItem(spacerItem2)
self.clear_table = QtGui.QPushButton(self.centralwidget)
self.clear_table.setEnabled(False)
self.clear_table.setObjectName(_fromUtf8("clear_table"))
self.horizontalLayout_4.addWidget(self.clear_table)
self.export_button = QtGui.QPushButton(self.centralwidget)
self.export_button.setEnabled(False)
self.export_button.setObjectName(_fromUtf8("export_button"))
self.horizontalLayout_4.addWidget(self.export_button)
self.bpc_button = QtGui.QPushButton(self.centralwidget)
self.bpc_button.setEnabled(False)
self.bpc_button.setObjectName(_fromUtf8("bpc_button"))
self.horizontalLayout_4.addWidget(self.bpc_button)
self.eddn_button = QtGui.QPushButton(self.centralwidget)
self.eddn_button.setEnabled(False)
self.eddn_button.setObjectName(_fromUtf8("eddn_button"))
self.horizontalLayout_4.addWidget(self.eddn_button)
self.verticalLayout_4.addLayout(self.horizontalLayout_4)
self.progress_bar = QtGui.QProgressBar(self.centralwidget)
self.progress_bar.setMaximumSize(QtCore.QSize(16777215, 10))
self.progress_bar.setProperty("value", 0)
self.progress_bar.setTextVisible(False)
self.progress_bar.setObjectName(_fromUtf8("progress_bar"))
self.verticalLayout_4.addWidget(self.progress_bar)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 1110, 21))
self.menubar.setObjectName(_fromUtf8("menubar"))
self.menuFile = QtGui.QMenu(self.menubar)
self.menuFile.setObjectName(_fromUtf8("menuFile"))
self.menuSettings = QtGui.QMenu(self.menubar)
self.menuSettings.setObjectName(_fromUtf8("menuSettings"))
self.menuHelp = QtGui.QMenu(self.menubar)
self.menuHelp.setObjectName(_fromUtf8("menuHelp"))
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtGui.QStatusBar(MainWindow)
self.statusbar.setObjectName(_fromUtf8("statusbar"))
MainWindow.setStatusBar(self.statusbar)
self.actionOpen = QtGui.QAction(MainWindow)
self.actionOpen.setObjectName(_fromUtf8("actionOpen"))
self.actionExit = QtGui.QAction(MainWindow)
self.actionExit.setMenuRole(QtGui.QAction.QuitRole)
self.actionExit.setObjectName(_fromUtf8("actionExit"))
self.actionPreferences = QtGui.QAction(MainWindow)
self.actionPreferences.setCheckable(False)
self.actionPreferences.setMenuRole(QtGui.QAction.PreferencesRole)
self.actionPreferences.setObjectName(_fromUtf8("actionPreferences"))
self.actionCommodity_Editor = QtGui.QAction(MainWindow)
self.actionCommodity_Editor.setObjectName(_fromUtf8("actionCommodity_Editor"))
self.actionPublic_Mode = QtGui.QAction(MainWindow)
self.actionPublic_Mode.setCheckable(True)
self.actionPublic_Mode.setObjectName(_fromUtf8("actionPublic_Mode"))
self.actionHelp = QtGui.QAction(MainWindow)
self.actionHelp.setObjectName(_fromUtf8("actionHelp"))
self.actionUpdate = QtGui.QAction(MainWindow)
self.actionUpdate.setObjectName(_fromUtf8("actionUpdate"))
self.actionAbout = QtGui.QAction(MainWindow)
self.actionAbout.setMenuRole(QtGui.QAction.AboutRole)
self.actionAbout.setObjectName(_fromUtf8("actionAbout"))
self.actionSetup_Wizard = QtGui.QAction(MainWindow)
self.actionSetup_Wizard.setObjectName(_fromUtf8("actionSetup_Wizard"))
self.actionColor_Calibration = QtGui.QAction(MainWindow)
self.actionColor_Calibration.setObjectName(_fromUtf8("actionColor_Calibration"))
self.actionLearning_Wizard = QtGui.QAction(MainWindow)
self.actionLearning_Wizard.setObjectName(_fromUtf8("actionLearning_Wizard"))
self.menuFile.addAction(self.actionOpen)
self.menuFile.addAction(self.actionExit)
self.menuSettings.addAction(self.actionPreferences)
self.menuSettings.addAction(self.actionCommodity_Editor)
self.menuSettings.addAction(self.actionSetup_Wizard)
self.menuSettings.addAction(self.actionColor_Calibration)
self.menuSettings.addAction(self.actionLearning_Wizard)
self.menuSettings.addAction(self.actionPublic_Mode)
self.menuHelp.addAction(self.actionHelp)
self.menuHelp.addAction(self.actionUpdate)
self.menuHelp.addAction(self.actionAbout)
self.menubar.addAction(self.menuFile.menuAction())
self.menubar.addAction(self.menuSettings.menuAction())
self.menubar.addAction(self.menuHelp.menuAction())
self.retranslateUi(MainWindow)
QtCore.QObject.connect(self.actionExit, QtCore.SIGNAL(_fromUtf8("triggered()")), MainWindow.close)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
MainWindow.setTabOrder(self.add_button, self.remove_button)
MainWindow.setTabOrder(self.remove_button, self.add_all_button)
MainWindow.setTabOrder(self.add_all_button, self.remove_all_button)
MainWindow.setTabOrder(self.remove_all_button, self.file_list)
MainWindow.setTabOrder(self.file_list, self.ocr_button)
MainWindow.setTabOrder(self.ocr_button, self.ocr_all)
MainWindow.setTabOrder(self.ocr_all, self.system_name)
MainWindow.setTabOrder(self.system_name, self.station_name)
MainWindow.setTabOrder(self.station_name, self.name)
MainWindow.setTabOrder(self.name, self.sell)
MainWindow.setTabOrder(self.sell, self.buy)
MainWindow.setTabOrder(self.buy, self.demand_num)
MainWindow.setTabOrder(self.demand_num, self.demand)
MainWindow.setTabOrder(self.demand, self.supply_num)
MainWindow.setTabOrder(self.supply_num, self.supply)
MainWindow.setTabOrder(self.supply, self.save_button)
MainWindow.setTabOrder(self.save_button, self.skip_button)
MainWindow.setTabOrder(self.skip_button, self.continue_button)
MainWindow.setTabOrder(self.continue_button, self.clear_table)
MainWindow.setTabOrder(self.clear_table, self.export_button)
MainWindow.setTabOrder(self.export_button, self.bpc_button)
MainWindow.setTabOrder(self.bpc_button, self.eddn_button)
MainWindow.setTabOrder(self.eddn_button, self.factor)
MainWindow.setTabOrder(self.factor, self.zoom_button)
MainWindow.setTabOrder(self.zoom_button, self.result_table)
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(_translate("MainWindow", "EliteOCR", None))
self.label_2.setText(_translate("MainWindow", "<html><head/><body><p>If you have any problems please <span style=\" font-weight:600; text-decoration: underline;\">read "Help"</span>. Please send any bug reports, issues or suggestions to [email protected] or post them in the <a href=\"https://forums.frontier.co.uk/showthread.php?t=68771\"><span style=\" text-decoration: underline; color:#0000ff;\">forum.</span></a></p></body></html>", None))
self.add_button.setText(_translate("MainWindow", "...", None))
self.add_button.setShortcut(_translate("MainWindow", "Alt+Q", None))
self.remove_button.setText(_translate("MainWindow", "...", None))
self.remove_button.setShortcut(_translate("MainWindow", "Alt+D", None))
self.add_all_button.setText(_translate("MainWindow", "Add all", None))
self.add_all_button.setShortcut(_translate("MainWindow", "Alt+W", None))
self.remove_all_button.setText(_translate("MainWindow", "Remove all", None))
self.remove_all_button.setShortcut(_translate("MainWindow", "Alt+F", None))
self.ocr_button.setText(_translate("MainWindow", "OCR", None))
self.ocr_button.setShortcut(_translate("MainWindow", "Alt+E", None))
self.ocr_all.setText(_translate("MainWindow", "OCR All", None))
self.ocr_all.setShortcut(_translate("MainWindow", "Alt+R", None))
self.label_3.setText(_translate("MainWindow", "System ", None))
self.label_4.setText(_translate("MainWindow", "Station", None))
self.label_7.setText(_translate("MainWindow", "Buy", None))
self.label_10.setText(_translate("MainWindow", "Supply", None))
self.label_8.setText(_translate("MainWindow", "Demand", None))
self.label_6.setText(_translate("MainWindow", "Sell", None))
self.label_5.setText(_translate("MainWindow", "Commodity", None))
self.save_button.setText(_translate("MainWindow", "Add", None))
self.save_button.setShortcut(_translate("MainWindow", "Alt+A", None))
self.skip_button.setText(_translate("MainWindow", "Skip", None))
self.skip_button.setShortcut(_translate("MainWindow", "Alt+S", None))
self.continue_button.setText(_translate("MainWindow", "Next File", None))
self.continue_button.setShortcut(_translate("MainWindow", "Alt+C", None))
self.label_12.setText(_translate("MainWindow", "File:", None))
self.file_label.setText(_translate("MainWindow", "-", None))
item = self.result_table.horizontalHeaderItem(0)
item.setText(_translate("MainWindow", "Station", None))
item = self.result_table.horizontalHeaderItem(1)
item.setText(_translate("MainWindow", "Commodity", None))
item = self.result_table.horizontalHeaderItem(2)
item.setText(_translate("MainWindow", "Sell", None))
item = self.result_table.horizontalHeaderItem(3)
item.setText(_translate("MainWindow", "Buy", None))
item = self.result_table.horizontalHeaderItem(4)
item.setText(_translate("MainWindow", "Demand", None))
item = self.result_table.horizontalHeaderItem(5)
item.setText(_translate("MainWindow", "Dem. Level", None))
item = self.result_table.horizontalHeaderItem(6)
item.setText(_translate("MainWindow", "Supply", None))
item = self.result_table.horizontalHeaderItem(7)
item.setText(_translate("MainWindow", "Sup. Level", None))
item = self.result_table.horizontalHeaderItem(8)
item.setText(_translate("MainWindow", "Timestamp", None))
item = self.result_table.horizontalHeaderItem(9)
item.setText(_translate("MainWindow", "System", None))
item = self.result_table.horizontalHeaderItem(10)
item.setText(_translate("MainWindow", "Img. Height", None))
item = self.result_table.horizontalHeaderItem(11)
item.setText(_translate("MainWindow", "EDDN Sent", None))
self.zoom_button.setText(_translate("MainWindow", "Zoom", None))
self.clear_table.setText(_translate("MainWindow", "Clear Table", None))
self.export_button.setText(_translate("MainWindow", "Export", None))
self.bpc_button.setText(_translate("MainWindow", "Export to BPC", None))
self.eddn_button.setText(_translate("MainWindow", "Export to EDDN", None))
self.menuFile.setTitle(_translate("MainWindow", "File", None))
self.menuSettings.setTitle(_translate("MainWindow", "Settings", None))
self.menuHelp.setTitle(_translate("MainWindow", "Help", None))
self.actionOpen.setText(_translate("MainWindow", "Open", None))
self.actionExit.setText(_translate("MainWindow", "Exit", None))
self.actionPreferences.setText(_translate("MainWindow", "Preferences", None))
self.actionCommodity_Editor.setText(_translate("MainWindow", "Commodity Editor", None))
self.actionPublic_Mode.setText(_translate("MainWindow", "Public Mode", None))
self.actionHelp.setText(_translate("MainWindow", "Help", None))
self.actionUpdate.setText(_translate("MainWindow", "Update", None))
self.actionAbout.setText(_translate("MainWindow", "About", None))
self.actionSetup_Wizard.setText(_translate("MainWindow", "Setup Wizard", None))
self.actionColor_Calibration.setText(_translate("MainWindow", "Color Calibration", None))
self.actionLearning_Wizard.setText(_translate("MainWindow", "Learning Wizard", None))
from customqtablewidget import CustomQTableWidget
import res_rc