forked from seeebek/EliteOCR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
calibrateUI.py
103 lines (95 loc) · 4.98 KB
/
calibrateUI.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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'calibrateUI.ui'
#
# Created: Wed Nov 26 11:54:01 2014
# by: PyQt4 UI code generator 4.11.2
#
# 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_Calibrate(object):
def setupUi(self, Calibrate):
Calibrate.setObjectName(_fromUtf8("Calibrate"))
Calibrate.resize(1113, 567)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/ico/icon.ico")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
Calibrate.setWindowIcon(icon)
self.verticalLayout = QtGui.QVBoxLayout(Calibrate)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.label = QtGui.QLabel(Calibrate)
self.label.setObjectName(_fromUtf8("label"))
self.verticalLayout.addWidget(self.label)
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.example = QtGui.QGraphicsView(Calibrate)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(3)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.example.sizePolicy().hasHeightForWidth())
self.example.setSizePolicy(sizePolicy)
self.example.setObjectName(_fromUtf8("example"))
self.horizontalLayout.addWidget(self.example)
self.clickarea = QtGui.QGraphicsView(Calibrate)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(5)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.clickarea.sizePolicy().hasHeightForWidth())
self.clickarea.setSizePolicy(sizePolicy)
self.clickarea.setAlignment(QtCore.Qt.AlignCenter)
self.clickarea.setDragMode(QtGui.QGraphicsView.NoDrag)
self.clickarea.setObjectName(_fromUtf8("clickarea"))
self.horizontalLayout.addWidget(self.clickarea)
self.verticalLayout.addLayout(self.horizontalLayout)
self.horizontalLayout_2 = QtGui.QHBoxLayout()
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.horizontalLayout_2.addItem(spacerItem)
self.label_y = QtGui.QLabel(Calibrate)
self.label_y.setObjectName(_fromUtf8("label_y"))
self.horizontalLayout_2.addWidget(self.label_y)
self.prev = QtGui.QPushButton(Calibrate)
self.prev.setObjectName(_fromUtf8("prev"))
self.horizontalLayout_2.addWidget(self.prev)
self.next = QtGui.QPushButton(Calibrate)
self.next.setObjectName(_fromUtf8("next"))
self.horizontalLayout_2.addWidget(self.next)
self.verticalLayout.addLayout(self.horizontalLayout_2)
self.line = QtGui.QFrame(Calibrate)
self.line.setFrameShape(QtGui.QFrame.HLine)
self.line.setFrameShadow(QtGui.QFrame.Sunken)
self.line.setObjectName(_fromUtf8("line"))
self.verticalLayout.addWidget(self.line)
self.horizontalLayout_3 = QtGui.QHBoxLayout()
self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.horizontalLayout_3.addItem(spacerItem1)
self.save = QtGui.QPushButton(Calibrate)
self.save.setObjectName(_fromUtf8("save"))
self.horizontalLayout_3.addWidget(self.save)
self.cancel = QtGui.QPushButton(Calibrate)
self.cancel.setObjectName(_fromUtf8("cancel"))
self.horizontalLayout_3.addWidget(self.cancel)
self.verticalLayout.addLayout(self.horizontalLayout_3)
self.retranslateUi(Calibrate)
QtCore.QObject.connect(self.cancel, QtCore.SIGNAL(_fromUtf8("clicked()")), Calibrate.close)
QtCore.QMetaObject.connectSlotsByName(Calibrate)
def retranslateUi(self, Calibrate):
Calibrate.setWindowTitle(_translate("Calibrate", "Calibrate", None))
self.label.setText(_translate("Calibrate", "Click on the corresponding place in your screenshot to calibrate the OCR areas", None))
self.label_y.setText(_translate("Calibrate", "y", None))
self.prev.setText(_translate("Calibrate", "Previous", None))
self.next.setText(_translate("Calibrate", "Next", None))
self.save.setText(_translate("Calibrate", "Save", None))
self.cancel.setText(_translate("Calibrate", "Cancel", None))
import res_rc