개정판 d935939c
edit issue #581: Line No Configuration 화면 수정
DTI_PID/DTI_PID/ConfigurationDialog.py | ||
---|---|---|
48 | 48 |
Jeongwoo 2018.06.05 read Text Area Detection Method |
49 | 49 |
humkyung 2018.06.20 add expand,shrink and merge size for recognizing text |
50 | 50 |
humkyung 2018.06.29 add line type table |
51 |
kyouho 2018.07.04 add self.delimeter = '"' |
|
51 | 52 |
''' |
52 | 53 |
def __init__(self, parent): |
53 | 54 |
QDialog.__init__(self, parent) |
... | ... | |
59 | 60 |
self.ui.horizontalLayout_3.addWidget(self.ui.listViewProperties) |
60 | 61 |
self.isAccepted = False |
61 | 62 |
self.itemModel = QStandardItemModel() |
63 |
self.delimeter = '"' |
|
62 | 64 |
|
63 | 65 |
docData = AppDocData.instance() |
64 | 66 |
configs = docData.getConfigs('Text Area', 'Text Area') |
... | ... | |
121 | 123 |
|
122 | 124 |
configs = docData.getConfigs('Line No', 'Configuration') |
123 | 125 |
if len(configs) == 1: |
124 |
for value in configs[0].value.split(self.ui.lineEdit.text()): |
|
126 |
for value in configs[0].value.split(self.delimeter): |
|
127 |
#for value in configs[0].value.split(self.ui.lineEdit.text()): |
|
125 | 128 |
self.itemModel.appendRow(QStandardItem(value)) |
126 | 129 |
self.ui.listViewProperties.setModel(self.itemModel) |
127 | 130 |
|
... | ... | |
192 | 195 |
# connect signals and slots |
193 | 196 |
self.ui.pushButtonAddProperty.clicked.connect(self.addLineProperty) |
194 | 197 |
self.ui.radioButtonFixedSize.toggled.connect(self.onFixedSizeToggled) |
198 |
self.ui.pushButtonAddDelimiter.clicked.connect(self.addDelimiter) |
|
199 |
|
|
200 |
''' |
|
201 |
@brief add delimiter |
|
202 |
@author kyouho |
|
203 |
@date 2018.07.04 |
|
204 |
''' |
|
205 |
def addDelimiter(self): |
|
206 |
text = self.ui.lineEdit.text() |
|
207 |
if text != self.delimeter: |
|
208 |
self.itemModel.appendRow(QStandardItem(text)) |
|
209 |
else: |
|
210 |
pass |
|
195 | 211 |
|
196 | 212 |
''' |
197 | 213 |
@brief add line property |
... | ... | |
224 | 240 |
Jeongwoo 2018.06.04 save Min/Max Text Size |
225 | 241 |
Jeongwoo 2018.06.05 save Text Area Detection Method |
226 | 242 |
humkyung 2018.06.20 save Expand and Shrink size for recognizing text |
243 |
kyouho 2018.07.04 edit cofiguration new delimiter (self.delimeter) |
|
227 | 244 |
''' |
228 | 245 |
def accept(self): |
229 | 246 |
try: |
... | ... | |
263 | 280 |
style = self.ui.tableWidgetLineTypes.cellWidget(row, 2).currentText() |
264 | 281 |
configs.append(Config('LineTypes', lineType, '{},{}'.format(width, style))) |
265 | 282 |
|
283 |
#Configuration |
|
266 | 284 |
configuration = None |
267 | 285 |
self.ui.listViewProperties.model() |
268 | 286 |
for i in range(self.itemModel.rowCount()): |
... | ... | |
270 | 288 |
if configuration is None: |
271 | 289 |
configuration = item |
272 | 290 |
else: |
273 |
configuration += self.ui.lineEdit.text() + item |
|
291 |
configuration += self.delimeter + item |
|
292 |
#configuration += self.ui.lineEdit.text() + item |
|
274 | 293 |
configs.append(Config('Line No', 'Configuration', configuration)) |
275 | 294 |
|
276 | 295 |
font = self.ui.fontComboBox.currentFont() |
DTI_PID/DTI_PID/Configuration_UI.py | ||
---|---|---|
1 | 1 |
# -*- coding: utf-8 -*- |
2 | 2 |
|
3 |
# Form implementation generated from reading ui file '.\ui\Configuration.ui'
|
|
3 |
# Form implementation generated from reading ui file './UI/Configuration.ui'
|
|
4 | 4 |
# |
5 |
# Created by: PyQt5 UI code generator 5.10.1
|
|
5 |
# Created by: PyQt5 UI code generator 5.9.2
|
|
6 | 6 |
# |
7 | 7 |
# WARNING! All changes made in this file will be lost! |
8 | 8 |
|
... | ... | |
24 | 24 |
self.Recognition.setObjectName("Recognition") |
25 | 25 |
self.gridLayout_2 = QtWidgets.QGridLayout(self.Recognition) |
26 | 26 |
self.gridLayout_2.setObjectName("gridLayout_2") |
27 |
self.groupBoxAttribute = QtWidgets.QGroupBox(self.Recognition) |
|
28 |
self.groupBoxAttribute.setObjectName("groupBoxAttribute") |
|
29 |
self.gridLayout_6 = QtWidgets.QGridLayout(self.groupBoxAttribute) |
|
30 |
self.gridLayout_6.setObjectName("gridLayout_6") |
|
31 |
self.verticalLayout_3 = QtWidgets.QVBoxLayout() |
|
32 |
self.verticalLayout_3.setObjectName("verticalLayout_3") |
|
33 |
self.horizontalLayout_8 = QtWidgets.QHBoxLayout() |
|
34 |
self.horizontalLayout_8.setObjectName("horizontalLayout_8") |
|
35 |
self.label_6 = QtWidgets.QLabel(self.groupBoxAttribute) |
|
36 |
self.label_6.setObjectName("label_6") |
|
37 |
self.horizontalLayout_8.addWidget(self.label_6, 0, QtCore.Qt.AlignVCenter) |
|
38 |
self.lineEditSizeDelimiter = QtWidgets.QLineEdit(self.groupBoxAttribute) |
|
39 |
self.lineEditSizeDelimiter.setObjectName("lineEditSizeDelimiter") |
|
40 |
self.horizontalLayout_8.addWidget(self.lineEditSizeDelimiter, 0, QtCore.Qt.AlignVCenter) |
|
41 |
self.verticalLayout_3.addLayout(self.horizontalLayout_8) |
|
42 |
self.gridLayout_6.addLayout(self.verticalLayout_3, 0, 0, 1, 1) |
|
43 |
self.gridLayout_2.addWidget(self.groupBoxAttribute, 1, 1, 1, 1) |
|
44 |
self.groupBox = QtWidgets.QGroupBox(self.Recognition) |
|
45 |
self.groupBox.setObjectName("groupBox") |
|
46 |
self.gridLayout_5 = QtWidgets.QGridLayout(self.groupBox) |
|
47 |
self.gridLayout_5.setObjectName("gridLayout_5") |
|
48 |
self.horizontalLayout_6 = QtWidgets.QHBoxLayout() |
|
49 |
self.horizontalLayout_6.setObjectName("horizontalLayout_6") |
|
50 |
self.label_4 = QtWidgets.QLabel(self.groupBox) |
|
51 |
self.label_4.setObjectName("label_4") |
|
52 |
self.horizontalLayout_6.addWidget(self.label_4) |
|
53 |
self.spinBoxMinArea = QtWidgets.QSpinBox(self.groupBox) |
|
54 |
self.spinBoxMinArea.setObjectName("spinBoxMinArea") |
|
55 |
self.horizontalLayout_6.addWidget(self.spinBoxMinArea) |
|
56 |
self.label_5 = QtWidgets.QLabel(self.groupBox) |
|
57 |
self.label_5.setObjectName("label_5") |
|
58 |
self.horizontalLayout_6.addWidget(self.label_5, 0, QtCore.Qt.AlignHCenter) |
|
59 |
self.spinBoxMaxArea = QtWidgets.QSpinBox(self.groupBox) |
|
60 |
self.spinBoxMaxArea.setObjectName("spinBoxMaxArea") |
|
61 |
self.horizontalLayout_6.addWidget(self.spinBoxMaxArea) |
|
62 |
self.gridLayout_5.addLayout(self.horizontalLayout_6, 2, 0, 1, 1) |
|
63 |
self.horizontalLayout = QtWidgets.QHBoxLayout() |
|
64 |
self.horizontalLayout.setSizeConstraint(QtWidgets.QLayout.SetNoConstraint) |
|
65 |
self.horizontalLayout.setObjectName("horizontalLayout") |
|
66 |
self.label = QtWidgets.QLabel(self.groupBox) |
|
67 |
self.label.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) |
|
68 |
self.label.setObjectName("label") |
|
69 |
self.horizontalLayout.addWidget(self.label) |
|
70 |
self.spinBoxWidth = QtWidgets.QSpinBox(self.groupBox) |
|
71 |
self.spinBoxWidth.setObjectName("spinBoxWidth") |
|
72 |
self.horizontalLayout.addWidget(self.spinBoxWidth) |
|
73 |
self.spinBoxHeight = QtWidgets.QSpinBox(self.groupBox) |
|
74 |
self.spinBoxHeight.setObjectName("spinBoxHeight") |
|
75 |
self.horizontalLayout.addWidget(self.spinBoxHeight) |
|
76 |
self.gridLayout_5.addLayout(self.horizontalLayout, 3, 0, 1, 1) |
|
77 |
self.horizontalLayout_12 = QtWidgets.QHBoxLayout() |
|
78 |
self.horizontalLayout_12.setObjectName("horizontalLayout_12") |
|
79 |
self.label_16 = QtWidgets.QLabel(self.groupBox) |
|
80 |
self.label_16.setObjectName("label_16") |
|
81 |
self.horizontalLayout_12.addWidget(self.label_16) |
|
82 |
self.smallLineMinLengthSpinBox = QtWidgets.QSpinBox(self.groupBox) |
|
83 |
self.smallLineMinLengthSpinBox.setObjectName("smallLineMinLengthSpinBox") |
|
84 |
self.horizontalLayout_12.addWidget(self.smallLineMinLengthSpinBox) |
|
85 |
self.gridLayout_5.addLayout(self.horizontalLayout_12, 4, 0, 1, 1) |
|
86 |
self.gridLayout_2.addWidget(self.groupBox, 2, 1, 1, 1) |
|
87 |
self.groupBoxLineNo = QtWidgets.QGroupBox(self.Recognition) |
|
88 |
self.groupBoxLineNo.setObjectName("groupBoxLineNo") |
|
89 |
self.gridLayout_3 = QtWidgets.QGridLayout(self.groupBoxLineNo) |
|
90 |
self.gridLayout_3.setObjectName("gridLayout_3") |
|
91 |
self.verticalLayout_2 = QtWidgets.QVBoxLayout() |
|
92 |
self.verticalLayout_2.setObjectName("verticalLayout_2") |
|
93 |
self.horizontalLayout_7 = QtWidgets.QHBoxLayout() |
|
94 |
self.horizontalLayout_7.setObjectName("horizontalLayout_7") |
|
95 |
self.label_3 = QtWidgets.QLabel(self.groupBoxLineNo) |
|
96 |
self.label_3.setObjectName("label_3") |
|
97 |
self.horizontalLayout_7.addWidget(self.label_3) |
|
98 |
self.radioButtonMetric = QtWidgets.QRadioButton(self.groupBoxLineNo) |
|
99 |
self.radioButtonMetric.setObjectName("radioButtonMetric") |
|
100 |
self.horizontalLayout_7.addWidget(self.radioButtonMetric) |
|
101 |
self.radioButtonInch = QtWidgets.QRadioButton(self.groupBoxLineNo) |
|
102 |
self.radioButtonInch.setObjectName("radioButtonInch") |
|
103 |
self.horizontalLayout_7.addWidget(self.radioButtonInch) |
|
104 |
self.verticalLayout_2.addLayout(self.horizontalLayout_7) |
|
105 |
self.horizontalLayout_5 = QtWidgets.QHBoxLayout() |
|
106 |
self.horizontalLayout_5.setObjectName("horizontalLayout_5") |
|
107 |
self.label_2 = QtWidgets.QLabel(self.groupBoxLineNo) |
|
108 |
self.label_2.setObjectName("label_2") |
|
109 |
self.horizontalLayout_5.addWidget(self.label_2) |
|
110 |
self.lineEdit = QtWidgets.QLineEdit(self.groupBoxLineNo) |
|
111 |
self.lineEdit.setObjectName("lineEdit") |
|
112 |
self.horizontalLayout_5.addWidget(self.lineEdit) |
|
113 |
self.verticalLayout_2.addLayout(self.horizontalLayout_5) |
|
114 |
self.horizontalLayout_2 = QtWidgets.QHBoxLayout() |
|
115 |
self.horizontalLayout_2.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint) |
|
116 |
self.horizontalLayout_2.setObjectName("horizontalLayout_2") |
|
117 |
self.horizontalLayout_4 = QtWidgets.QHBoxLayout() |
|
118 |
self.horizontalLayout_4.setObjectName("horizontalLayout_4") |
|
119 |
self.horizontalLayout_2.addLayout(self.horizontalLayout_4) |
|
120 |
self.comboBoxProperties = QtWidgets.QComboBox(self.groupBoxLineNo) |
|
121 |
self.comboBoxProperties.setObjectName("comboBoxProperties") |
|
122 |
self.horizontalLayout_2.addWidget(self.comboBoxProperties) |
|
123 |
self.pushButtonAddProperty = QtWidgets.QPushButton(self.groupBoxLineNo) |
|
124 |
self.pushButtonAddProperty.setMinimumSize(QtCore.QSize(50, 0)) |
|
125 |
self.pushButtonAddProperty.setMaximumSize(QtCore.QSize(50, 16777215)) |
|
126 |
self.pushButtonAddProperty.setDefault(False) |
|
127 |
self.pushButtonAddProperty.setObjectName("pushButtonAddProperty") |
|
128 |
self.horizontalLayout_2.addWidget(self.pushButtonAddProperty) |
|
129 |
self.verticalLayout_2.addLayout(self.horizontalLayout_2) |
|
130 |
self.horizontalLayout_3 = QtWidgets.QHBoxLayout() |
|
131 |
self.horizontalLayout_3.setObjectName("horizontalLayout_3") |
|
132 |
self.verticalLayout_2.addLayout(self.horizontalLayout_3) |
|
133 |
self.gridLayout_3.addLayout(self.verticalLayout_2, 6, 0, 1, 1) |
|
134 |
self.gridLayout_2.addWidget(self.groupBoxLineNo, 3, 1, 1, 1) |
|
135 | 27 |
self.groupBoxText = QtWidgets.QGroupBox(self.Recognition) |
136 | 28 |
self.groupBoxText.setObjectName("groupBoxText") |
137 | 29 |
self.gridLayout_14 = QtWidgets.QGridLayout(self.groupBoxText) |
... | ... | |
255 | 147 |
self.verticalLayout_5.addLayout(self.horizontalLayout_20) |
256 | 148 |
self.gridLayout_14.addLayout(self.verticalLayout_5, 0, 0, 1, 1) |
257 | 149 |
self.gridLayout_2.addWidget(self.groupBoxText, 0, 1, 1, 1) |
150 |
self.groupBoxAttribute = QtWidgets.QGroupBox(self.Recognition) |
|
151 |
self.groupBoxAttribute.setObjectName("groupBoxAttribute") |
|
152 |
self.gridLayout_6 = QtWidgets.QGridLayout(self.groupBoxAttribute) |
|
153 |
self.gridLayout_6.setObjectName("gridLayout_6") |
|
154 |
self.verticalLayout_3 = QtWidgets.QVBoxLayout() |
|
155 |
self.verticalLayout_3.setObjectName("verticalLayout_3") |
|
156 |
self.horizontalLayout_8 = QtWidgets.QHBoxLayout() |
|
157 |
self.horizontalLayout_8.setObjectName("horizontalLayout_8") |
|
158 |
self.label_6 = QtWidgets.QLabel(self.groupBoxAttribute) |
|
159 |
self.label_6.setObjectName("label_6") |
|
160 |
self.horizontalLayout_8.addWidget(self.label_6, 0, QtCore.Qt.AlignVCenter) |
|
161 |
self.lineEditSizeDelimiter = QtWidgets.QLineEdit(self.groupBoxAttribute) |
|
162 |
self.lineEditSizeDelimiter.setObjectName("lineEditSizeDelimiter") |
|
163 |
self.horizontalLayout_8.addWidget(self.lineEditSizeDelimiter, 0, QtCore.Qt.AlignVCenter) |
|
164 |
self.verticalLayout_3.addLayout(self.horizontalLayout_8) |
|
165 |
self.gridLayout_6.addLayout(self.verticalLayout_3, 0, 0, 1, 1) |
|
166 |
self.gridLayout_2.addWidget(self.groupBoxAttribute, 1, 1, 1, 1) |
|
167 |
self.groupBox = QtWidgets.QGroupBox(self.Recognition) |
|
168 |
self.groupBox.setObjectName("groupBox") |
|
169 |
self.gridLayout_5 = QtWidgets.QGridLayout(self.groupBox) |
|
170 |
self.gridLayout_5.setObjectName("gridLayout_5") |
|
171 |
self.horizontalLayout_6 = QtWidgets.QHBoxLayout() |
|
172 |
self.horizontalLayout_6.setObjectName("horizontalLayout_6") |
|
173 |
self.label_4 = QtWidgets.QLabel(self.groupBox) |
|
174 |
self.label_4.setObjectName("label_4") |
|
175 |
self.horizontalLayout_6.addWidget(self.label_4) |
|
176 |
self.spinBoxMinArea = QtWidgets.QSpinBox(self.groupBox) |
|
177 |
self.spinBoxMinArea.setObjectName("spinBoxMinArea") |
|
178 |
self.horizontalLayout_6.addWidget(self.spinBoxMinArea) |
|
179 |
self.label_5 = QtWidgets.QLabel(self.groupBox) |
|
180 |
self.label_5.setObjectName("label_5") |
|
181 |
self.horizontalLayout_6.addWidget(self.label_5, 0, QtCore.Qt.AlignHCenter) |
|
182 |
self.spinBoxMaxArea = QtWidgets.QSpinBox(self.groupBox) |
|
183 |
self.spinBoxMaxArea.setObjectName("spinBoxMaxArea") |
|
184 |
self.horizontalLayout_6.addWidget(self.spinBoxMaxArea) |
|
185 |
self.gridLayout_5.addLayout(self.horizontalLayout_6, 2, 0, 1, 1) |
|
186 |
self.horizontalLayout = QtWidgets.QHBoxLayout() |
|
187 |
self.horizontalLayout.setSizeConstraint(QtWidgets.QLayout.SetNoConstraint) |
|
188 |
self.horizontalLayout.setObjectName("horizontalLayout") |
|
189 |
self.label = QtWidgets.QLabel(self.groupBox) |
|
190 |
self.label.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) |
|
191 |
self.label.setObjectName("label") |
|
192 |
self.horizontalLayout.addWidget(self.label) |
|
193 |
self.spinBoxWidth = QtWidgets.QSpinBox(self.groupBox) |
|
194 |
self.spinBoxWidth.setObjectName("spinBoxWidth") |
|
195 |
self.horizontalLayout.addWidget(self.spinBoxWidth) |
|
196 |
self.spinBoxHeight = QtWidgets.QSpinBox(self.groupBox) |
|
197 |
self.spinBoxHeight.setObjectName("spinBoxHeight") |
|
198 |
self.horizontalLayout.addWidget(self.spinBoxHeight) |
|
199 |
self.gridLayout_5.addLayout(self.horizontalLayout, 3, 0, 1, 1) |
|
200 |
self.horizontalLayout_12 = QtWidgets.QHBoxLayout() |
|
201 |
self.horizontalLayout_12.setObjectName("horizontalLayout_12") |
|
202 |
self.label_16 = QtWidgets.QLabel(self.groupBox) |
|
203 |
self.label_16.setObjectName("label_16") |
|
204 |
self.horizontalLayout_12.addWidget(self.label_16) |
|
205 |
self.smallLineMinLengthSpinBox = QtWidgets.QSpinBox(self.groupBox) |
|
206 |
self.smallLineMinLengthSpinBox.setObjectName("smallLineMinLengthSpinBox") |
|
207 |
self.horizontalLayout_12.addWidget(self.smallLineMinLengthSpinBox) |
|
208 |
self.gridLayout_5.addLayout(self.horizontalLayout_12, 4, 0, 1, 1) |
|
209 |
self.gridLayout_2.addWidget(self.groupBox, 2, 1, 1, 1) |
|
210 |
self.groupBoxLineNo = QtWidgets.QGroupBox(self.Recognition) |
|
211 |
self.groupBoxLineNo.setObjectName("groupBoxLineNo") |
|
212 |
self.gridLayout_3 = QtWidgets.QGridLayout(self.groupBoxLineNo) |
|
213 |
self.gridLayout_3.setObjectName("gridLayout_3") |
|
214 |
self.verticalLayout_2 = QtWidgets.QVBoxLayout() |
|
215 |
self.verticalLayout_2.setObjectName("verticalLayout_2") |
|
216 |
self.horizontalLayout_7 = QtWidgets.QHBoxLayout() |
|
217 |
self.horizontalLayout_7.setObjectName("horizontalLayout_7") |
|
218 |
self.label_3 = QtWidgets.QLabel(self.groupBoxLineNo) |
|
219 |
self.label_3.setObjectName("label_3") |
|
220 |
self.horizontalLayout_7.addWidget(self.label_3) |
|
221 |
self.radioButtonMetric = QtWidgets.QRadioButton(self.groupBoxLineNo) |
|
222 |
self.radioButtonMetric.setObjectName("radioButtonMetric") |
|
223 |
self.horizontalLayout_7.addWidget(self.radioButtonMetric) |
|
224 |
self.radioButtonInch = QtWidgets.QRadioButton(self.groupBoxLineNo) |
|
225 |
self.radioButtonInch.setObjectName("radioButtonInch") |
|
226 |
self.horizontalLayout_7.addWidget(self.radioButtonInch) |
|
227 |
self.verticalLayout_2.addLayout(self.horizontalLayout_7) |
|
228 |
self.horizontalLayout_5 = QtWidgets.QHBoxLayout() |
|
229 |
self.horizontalLayout_5.setObjectName("horizontalLayout_5") |
|
230 |
self.label_2 = QtWidgets.QLabel(self.groupBoxLineNo) |
|
231 |
self.label_2.setObjectName("label_2") |
|
232 |
self.horizontalLayout_5.addWidget(self.label_2) |
|
233 |
self.lineEdit = QtWidgets.QLineEdit(self.groupBoxLineNo) |
|
234 |
self.lineEdit.setMaxLength(1) |
|
235 |
self.lineEdit.setObjectName("lineEdit") |
|
236 |
self.horizontalLayout_5.addWidget(self.lineEdit) |
|
237 |
self.pushButtonAddDelimiter = QtWidgets.QPushButton(self.groupBoxLineNo) |
|
238 |
self.pushButtonAddDelimiter.setMinimumSize(QtCore.QSize(50, 0)) |
|
239 |
self.pushButtonAddDelimiter.setMaximumSize(QtCore.QSize(50, 16777215)) |
|
240 |
self.pushButtonAddDelimiter.setObjectName("pushButtonAddDelimiter") |
|
241 |
self.horizontalLayout_5.addWidget(self.pushButtonAddDelimiter) |
|
242 |
self.verticalLayout_2.addLayout(self.horizontalLayout_5) |
|
243 |
self.horizontalLayout_2 = QtWidgets.QHBoxLayout() |
|
244 |
self.horizontalLayout_2.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint) |
|
245 |
self.horizontalLayout_2.setObjectName("horizontalLayout_2") |
|
246 |
self.horizontalLayout_4 = QtWidgets.QHBoxLayout() |
|
247 |
self.horizontalLayout_4.setObjectName("horizontalLayout_4") |
|
248 |
self.horizontalLayout_2.addLayout(self.horizontalLayout_4) |
|
249 |
self.comboBoxProperties = QtWidgets.QComboBox(self.groupBoxLineNo) |
|
250 |
self.comboBoxProperties.setObjectName("comboBoxProperties") |
|
251 |
self.horizontalLayout_2.addWidget(self.comboBoxProperties) |
|
252 |
self.pushButtonAddProperty = QtWidgets.QPushButton(self.groupBoxLineNo) |
|
253 |
self.pushButtonAddProperty.setMinimumSize(QtCore.QSize(50, 0)) |
|
254 |
self.pushButtonAddProperty.setMaximumSize(QtCore.QSize(50, 16777215)) |
|
255 |
self.pushButtonAddProperty.setDefault(False) |
|
256 |
self.pushButtonAddProperty.setObjectName("pushButtonAddProperty") |
|
257 |
self.horizontalLayout_2.addWidget(self.pushButtonAddProperty) |
|
258 |
self.verticalLayout_2.addLayout(self.horizontalLayout_2) |
|
259 |
self.horizontalLayout_3 = QtWidgets.QHBoxLayout() |
|
260 |
self.horizontalLayout_3.setObjectName("horizontalLayout_3") |
|
261 |
self.verticalLayout_2.addLayout(self.horizontalLayout_3) |
|
262 |
self.gridLayout_3.addLayout(self.verticalLayout_2, 6, 0, 1, 1) |
|
263 |
self.gridLayout_2.addWidget(self.groupBoxLineNo, 3, 1, 1, 1) |
|
258 | 264 |
self.tabWidget.addTab(self.Recognition, "") |
259 | 265 |
self.tabTagNoRule = QtWidgets.QWidget() |
260 | 266 |
self.tabTagNoRule.setObjectName("tabTagNoRule") |
... | ... | |
435 | 441 |
def retranslateUi(self, ConfigurationDialog): |
436 | 442 |
_translate = QtCore.QCoreApplication.translate |
437 | 443 |
ConfigurationDialog.setWindowTitle(_translate("ConfigurationDialog", "Configuration")) |
444 |
self.groupBoxText.setTitle(_translate("ConfigurationDialog", "텍스트 검출")) |
|
445 |
self.label_19.setText(_translate("ConfigurationDialog", "텍스트 영역 검출 방식 : ")) |
|
446 |
self.textAreaTypeARadioButton.setText(_translate("ConfigurationDialog", "Type A")) |
|
447 |
self.textAreaTypeBRadioButton.setText(_translate("ConfigurationDialog", "Type B")) |
|
448 |
self.label_20.setText(_translate("ConfigurationDialog", "팽창 크기 : ")) |
|
449 |
self.label_21.setText(_translate("ConfigurationDialog", "침식 크기 : ")) |
|
450 |
self.label_17.setText(_translate("ConfigurationDialog", "Minimum Text Size : ")) |
|
451 |
self.label_18.setText(_translate("ConfigurationDialog", "Maximum Text Size : ")) |
|
452 |
self.label_22.setText(_translate("ConfigurationDialog", "병합 크기 : ")) |
|
453 |
self.checkBoxRemoveWhiteSpace.setText(_translate("ConfigurationDialog", "공백 제거")) |
|
454 |
self.label_23.setText(_translate("ConfigurationDialog", "Replace")) |
|
455 |
self.label_24.setText(_translate("ConfigurationDialog", "with")) |
|
438 | 456 |
self.groupBoxAttribute.setTitle(_translate("ConfigurationDialog", "속성 검출")) |
439 | 457 |
self.label_6.setText(_translate("ConfigurationDialog", "Size Delimiter : ")) |
440 | 458 |
self.groupBox.setTitle(_translate("ConfigurationDialog", "라인 검출")) |
... | ... | |
447 | 465 |
self.radioButtonMetric.setText(_translate("ConfigurationDialog", "Metric")) |
448 | 466 |
self.radioButtonInch.setText(_translate("ConfigurationDialog", "Inch")) |
449 | 467 |
self.label_2.setText(_translate("ConfigurationDialog", "Delimiter : ")) |
468 |
self.pushButtonAddDelimiter.setText(_translate("ConfigurationDialog", "추가")) |
|
450 | 469 |
self.pushButtonAddProperty.setText(_translate("ConfigurationDialog", "추가")) |
451 |
self.groupBoxText.setTitle(_translate("ConfigurationDialog", "텍스트 검출")) |
|
452 |
self.label_19.setText(_translate("ConfigurationDialog", "텍스트 영역 검출 방식 : ")) |
|
453 |
self.textAreaTypeARadioButton.setText(_translate("ConfigurationDialog", "Type A")) |
|
454 |
self.textAreaTypeBRadioButton.setText(_translate("ConfigurationDialog", "Type B")) |
|
455 |
self.label_20.setText(_translate("ConfigurationDialog", "팽창 크기 : ")) |
|
456 |
self.label_21.setText(_translate("ConfigurationDialog", "침식 크기 : ")) |
|
457 |
self.label_17.setText(_translate("ConfigurationDialog", "Minimum Text Size : ")) |
|
458 |
self.label_18.setText(_translate("ConfigurationDialog", "Maximum Text Size : ")) |
|
459 |
self.label_22.setText(_translate("ConfigurationDialog", "병합 크기 : ")) |
|
460 |
self.checkBoxRemoveWhiteSpace.setText(_translate("ConfigurationDialog", "공백 제거")) |
|
461 |
self.label_23.setText(_translate("ConfigurationDialog", "Replace")) |
|
462 |
self.label_24.setText(_translate("ConfigurationDialog", "with")) |
|
463 | 470 |
self.tabWidget.setTabText(self.tabWidget.indexOf(self.Recognition), _translate("ConfigurationDialog", "인식")) |
464 | 471 |
self.groupBox_2.setTitle(_translate("ConfigurationDialog", "Instrument Tag No Rule")) |
465 | 472 |
self.label_8.setText(_translate("ConfigurationDialog", "Measured Variable Code")) |
DTI_PID/DTI_PID/DTI_PID.py | ||
---|---|---|
987 | 987 |
|
988 | 988 |
global MIN_TEXT_SIZE |
989 | 989 |
for textInfo in textInfoList: |
990 |
|
|
990 | 991 |
if textInfo.getW() >= MIN_TEXT_SIZE or textInfo.getH() >= MIN_TEXT_SIZE: |
991 | 992 |
removeText(srcGray, (textInfo.getX(), textInfo.getY()), srcGray[textInfo.getY():textInfo.getY()+textInfo.getH(), textInfo.getX():textInfo.getX()+textInfo.getW()]) |
992 | 993 |
|
DTI_PID/DTI_PID/TextItemFactory.py | ||
---|---|---|
41 | 41 |
if self.isNoteNoText(text): |
42 | 42 |
item = QEngineeringNoteItem() |
43 | 43 |
elif (delimiter != '' and lineNoConfig != '') and self.isLineNo(text, delimiter, lineNoConfig): |
44 |
print(text) |
|
44 | 45 |
item = QEngineeringLineNoTextItem() |
45 | 46 |
# set color |
46 | 47 |
colorCount = len(docData.colors) |
DTI_PID/DTI_PID/UI/Configuration.ui | ||
---|---|---|
32 | 32 |
<string>인식</string> |
33 | 33 |
</attribute> |
34 | 34 |
<layout class="QGridLayout" name="gridLayout_2"> |
35 |
<item row="1" column="1"> |
|
36 |
<widget class="QGroupBox" name="groupBoxAttribute"> |
|
37 |
<property name="title"> |
|
38 |
<string>속성 검출</string> |
|
39 |
</property> |
|
40 |
<layout class="QGridLayout" name="gridLayout_6"> |
|
41 |
<item row="0" column="0"> |
|
42 |
<layout class="QVBoxLayout" name="verticalLayout_3"> |
|
43 |
<item> |
|
44 |
<layout class="QHBoxLayout" name="horizontalLayout_8"> |
|
45 |
<item alignment="Qt::AlignVCenter"> |
|
46 |
<widget class="QLabel" name="label_6"> |
|
47 |
<property name="text"> |
|
48 |
<string>Size Delimiter : </string> |
|
49 |
</property> |
|
50 |
</widget> |
|
51 |
</item> |
|
52 |
<item alignment="Qt::AlignVCenter"> |
|
53 |
<widget class="QLineEdit" name="lineEditSizeDelimiter"/> |
|
54 |
</item> |
|
55 |
</layout> |
|
56 |
</item> |
|
57 |
</layout> |
|
58 |
</item> |
|
59 |
</layout> |
|
60 |
</widget> |
|
61 |
</item> |
|
62 |
<item row="2" column="1"> |
|
63 |
<widget class="QGroupBox" name="groupBox"> |
|
64 |
<property name="title"> |
|
65 |
<string>라인 검출</string> |
|
66 |
</property> |
|
67 |
<layout class="QGridLayout" name="gridLayout_5"> |
|
68 |
<item row="2" column="0"> |
|
69 |
<layout class="QHBoxLayout" name="horizontalLayout_6"> |
|
70 |
<item> |
|
71 |
<widget class="QLabel" name="label_4"> |
|
72 |
<property name="text"> |
|
73 |
<string>Small Object Size : </string> |
|
74 |
</property> |
|
75 |
</widget> |
|
76 |
</item> |
|
77 |
<item> |
|
78 |
<widget class="QSpinBox" name="spinBoxMinArea"/> |
|
79 |
</item> |
|
80 |
<item alignment="Qt::AlignHCenter"> |
|
81 |
<widget class="QLabel" name="label_5"> |
|
82 |
<property name="text"> |
|
83 |
<string> < Area < </string> |
|
84 |
</property> |
|
85 |
</widget> |
|
86 |
</item> |
|
87 |
<item> |
|
88 |
<widget class="QSpinBox" name="spinBoxMaxArea"/> |
|
89 |
</item> |
|
90 |
</layout> |
|
91 |
</item> |
|
92 |
<item row="3" column="0"> |
|
93 |
<layout class="QHBoxLayout" name="horizontalLayout"> |
|
94 |
<property name="sizeConstraint"> |
|
95 |
<enum>QLayout::SetNoConstraint</enum> |
|
96 |
</property> |
|
97 |
<item> |
|
98 |
<widget class="QLabel" name="label"> |
|
99 |
<property name="text"> |
|
100 |
<string>Sliding Window Size(WxH) : </string> |
|
101 |
</property> |
|
102 |
<property name="alignment"> |
|
103 |
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> |
|
104 |
</property> |
|
105 |
</widget> |
|
106 |
</item> |
|
107 |
<item> |
|
108 |
<widget class="QSpinBox" name="spinBoxWidth"/> |
|
109 |
</item> |
|
110 |
<item> |
|
111 |
<widget class="QSpinBox" name="spinBoxHeight"/> |
|
112 |
</item> |
|
113 |
</layout> |
|
114 |
</item> |
|
115 |
<item row="4" column="0"> |
|
116 |
<layout class="QHBoxLayout" name="horizontalLayout_12"> |
|
117 |
<item> |
|
118 |
<widget class="QLabel" name="label_16"> |
|
119 |
<property name="text"> |
|
120 |
<string>Small Line Minimum Length</string> |
|
121 |
</property> |
|
122 |
</widget> |
|
123 |
</item> |
|
124 |
<item> |
|
125 |
<widget class="QSpinBox" name="smallLineMinLengthSpinBox"/> |
|
126 |
</item> |
|
127 |
</layout> |
|
128 |
</item> |
|
129 |
</layout> |
|
130 |
</widget> |
|
131 |
</item> |
|
132 |
<item row="3" column="1"> |
|
133 |
<widget class="QGroupBox" name="groupBoxLineNo"> |
|
134 |
<property name="title"> |
|
135 |
<string>Line No</string> |
|
136 |
</property> |
|
137 |
<layout class="QGridLayout" name="gridLayout_3"> |
|
138 |
<item row="6" column="0"> |
|
139 |
<layout class="QVBoxLayout" name="verticalLayout_2"> |
|
140 |
<item> |
|
141 |
<layout class="QHBoxLayout" name="horizontalLayout_7"> |
|
142 |
<item> |
|
143 |
<widget class="QLabel" name="label_3"> |
|
144 |
<property name="text"> |
|
145 |
<string>Size Unit : </string> |
|
146 |
</property> |
|
147 |
</widget> |
|
148 |
</item> |
|
149 |
<item> |
|
150 |
<widget class="QRadioButton" name="radioButtonMetric"> |
|
151 |
<property name="text"> |
|
152 |
<string>Metric</string> |
|
153 |
</property> |
|
154 |
</widget> |
|
155 |
</item> |
|
156 |
<item> |
|
157 |
<widget class="QRadioButton" name="radioButtonInch"> |
|
158 |
<property name="text"> |
|
159 |
<string>Inch</string> |
|
160 |
</property> |
|
161 |
</widget> |
|
162 |
</item> |
|
163 |
</layout> |
|
164 |
</item> |
|
165 |
<item> |
|
166 |
<layout class="QHBoxLayout" name="horizontalLayout_5"> |
|
167 |
<item> |
|
168 |
<widget class="QLabel" name="label_2"> |
|
169 |
<property name="text"> |
|
170 |
<string>Delimiter : </string> |
|
171 |
</property> |
|
172 |
</widget> |
|
173 |
</item> |
|
174 |
<item> |
|
175 |
<widget class="QLineEdit" name="lineEdit"/> |
|
176 |
</item> |
|
177 |
</layout> |
|
178 |
</item> |
|
179 |
<item> |
|
180 |
<layout class="QHBoxLayout" name="horizontalLayout_2"> |
|
181 |
<property name="sizeConstraint"> |
|
182 |
<enum>QLayout::SetDefaultConstraint</enum> |
|
183 |
</property> |
|
184 |
<item> |
|
185 |
<layout class="QHBoxLayout" name="horizontalLayout_4"/> |
|
186 |
</item> |
|
187 |
<item> |
|
188 |
<widget class="QComboBox" name="comboBoxProperties"/> |
|
189 |
</item> |
|
190 |
<item> |
|
191 |
<widget class="QPushButton" name="pushButtonAddProperty"> |
|
192 |
<property name="minimumSize"> |
|
193 |
<size> |
|
194 |
<width>50</width> |
|
195 |
<height>0</height> |
|
196 |
</size> |
|
197 |
</property> |
|
198 |
<property name="maximumSize"> |
|
199 |
<size> |
|
200 |
<width>50</width> |
|
201 |
<height>16777215</height> |
|
202 |
</size> |
|
203 |
</property> |
|
204 |
<property name="text"> |
|
205 |
<string>추가</string> |
|
206 |
</property> |
|
207 |
<property name="default"> |
|
208 |
<bool>false</bool> |
|
209 |
</property> |
|
210 |
</widget> |
|
211 |
</item> |
|
212 |
</layout> |
|
213 |
</item> |
|
214 |
<item> |
|
215 |
<layout class="QHBoxLayout" name="horizontalLayout_3"/> |
|
216 |
</item> |
|
217 |
</layout> |
|
218 |
</item> |
|
219 |
</layout> |
|
220 |
</widget> |
|
221 |
</item> |
|
222 | 35 |
<item row="0" column="1"> |
223 | 36 |
<widget class="QGroupBox" name="groupBoxText"> |
224 | 37 |
<property name="title"> |
... | ... | |
438 | 251 |
</layout> |
439 | 252 |
</widget> |
440 | 253 |
</item> |
254 |
<item row="1" column="1"> |
|
255 |
<widget class="QGroupBox" name="groupBoxAttribute"> |
|
256 |
<property name="title"> |
|
257 |
<string>속성 검출</string> |
|
258 |
</property> |
|
259 |
<layout class="QGridLayout" name="gridLayout_6"> |
|
260 |
<item row="0" column="0"> |
|
261 |
<layout class="QVBoxLayout" name="verticalLayout_3"> |
|
262 |
<item> |
|
263 |
<layout class="QHBoxLayout" name="horizontalLayout_8"> |
|
264 |
<item alignment="Qt::AlignVCenter"> |
|
265 |
<widget class="QLabel" name="label_6"> |
|
266 |
<property name="text"> |
|
267 |
<string>Size Delimiter : </string> |
|
268 |
</property> |
|
269 |
</widget> |
|
270 |
</item> |
|
271 |
<item alignment="Qt::AlignVCenter"> |
|
272 |
<widget class="QLineEdit" name="lineEditSizeDelimiter"/> |
|
273 |
</item> |
|
274 |
</layout> |
|
275 |
</item> |
|
276 |
</layout> |
|
277 |
</item> |
|
278 |
</layout> |
|
279 |
</widget> |
|
280 |
</item> |
|
281 |
<item row="2" column="1"> |
|
282 |
<widget class="QGroupBox" name="groupBox"> |
|
283 |
<property name="title"> |
|
284 |
<string>라인 검출</string> |
|
285 |
</property> |
|
286 |
<layout class="QGridLayout" name="gridLayout_5"> |
|
287 |
<item row="2" column="0"> |
|
288 |
<layout class="QHBoxLayout" name="horizontalLayout_6"> |
|
289 |
<item> |
|
290 |
<widget class="QLabel" name="label_4"> |
|
291 |
<property name="text"> |
|
292 |
<string>Small Object Size : </string> |
|
293 |
</property> |
|
294 |
</widget> |
|
295 |
</item> |
|
296 |
<item> |
|
297 |
<widget class="QSpinBox" name="spinBoxMinArea"/> |
|
298 |
</item> |
|
299 |
<item alignment="Qt::AlignHCenter"> |
|
300 |
<widget class="QLabel" name="label_5"> |
|
301 |
<property name="text"> |
|
302 |
<string> < Area < </string> |
|
303 |
</property> |
|
304 |
</widget> |
|
305 |
</item> |
|
306 |
<item> |
|
307 |
<widget class="QSpinBox" name="spinBoxMaxArea"/> |
|
308 |
</item> |
|
309 |
</layout> |
|
310 |
</item> |
|
311 |
<item row="3" column="0"> |
|
312 |
<layout class="QHBoxLayout" name="horizontalLayout"> |
|
313 |
<property name="sizeConstraint"> |
|
314 |
<enum>QLayout::SetNoConstraint</enum> |
|
315 |
</property> |
|
316 |
<item> |
|
317 |
<widget class="QLabel" name="label"> |
|
318 |
<property name="text"> |
|
319 |
<string>Sliding Window Size(WxH) : </string> |
|
320 |
</property> |
|
321 |
<property name="alignment"> |
|
322 |
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> |
|
323 |
</property> |
|
324 |
</widget> |
|
325 |
</item> |
|
326 |
<item> |
|
327 |
<widget class="QSpinBox" name="spinBoxWidth"/> |
|
328 |
</item> |
|
329 |
<item> |
|
330 |
<widget class="QSpinBox" name="spinBoxHeight"/> |
|
331 |
</item> |
|
332 |
</layout> |
|
333 |
</item> |
|
334 |
<item row="4" column="0"> |
|
335 |
<layout class="QHBoxLayout" name="horizontalLayout_12"> |
|
336 |
<item> |
|
337 |
<widget class="QLabel" name="label_16"> |
|
338 |
<property name="text"> |
|
339 |
<string>Small Line Minimum Length</string> |
|
340 |
</property> |
|
341 |
</widget> |
|
342 |
</item> |
|
343 |
<item> |
|
344 |
<widget class="QSpinBox" name="smallLineMinLengthSpinBox"/> |
|
345 |
</item> |
|
346 |
</layout> |
|
347 |
</item> |
|
348 |
</layout> |
|
349 |
</widget> |
|
350 |
</item> |
|
351 |
<item row="3" column="1"> |
|
352 |
<widget class="QGroupBox" name="groupBoxLineNo"> |
|
353 |
<property name="title"> |
|
354 |
<string>Line No</string> |
|
355 |
</property> |
|
356 |
<layout class="QGridLayout" name="gridLayout_3"> |
|
357 |
<item row="6" column="0"> |
|
358 |
<layout class="QVBoxLayout" name="verticalLayout_2"> |
|
359 |
<item> |
|
360 |
<layout class="QHBoxLayout" name="horizontalLayout_7"> |
|
361 |
<item> |
|
362 |
<widget class="QLabel" name="label_3"> |
|
363 |
<property name="text"> |
|
364 |
<string>Size Unit : </string> |
|
365 |
</property> |
|
366 |
</widget> |
|
367 |
</item> |
|
368 |
<item> |
|
369 |
<widget class="QRadioButton" name="radioButtonMetric"> |
|
370 |
<property name="text"> |
|
371 |
<string>Metric</string> |
|
372 |
</property> |
|
373 |
</widget> |
|
374 |
</item> |
|
375 |
<item> |
|
376 |
<widget class="QRadioButton" name="radioButtonInch"> |
|
377 |
<property name="text"> |
|
378 |
<string>Inch</string> |
|
379 |
</property> |
|
380 |
</widget> |
|
381 |
</item> |
|
382 |
</layout> |
|
383 |
</item> |
|
384 |
<item> |
|
385 |
<layout class="QHBoxLayout" name="horizontalLayout_5"> |
|
386 |
<item> |
|
387 |
<widget class="QLabel" name="label_2"> |
|
388 |
<property name="text"> |
|
389 |
<string>Delimiter : </string> |
|
390 |
</property> |
|
391 |
</widget> |
|
392 |
</item> |
|
393 |
<item> |
|
394 |
<widget class="QLineEdit" name="lineEdit"> |
|
395 |
<property name="maxLength"> |
|
396 |
<number>1</number> |
|
397 |
</property> |
|
398 |
</widget> |
|
399 |
</item> |
|
400 |
<item> |
|
401 |
<widget class="QPushButton" name="pushButtonAddDelimiter"> |
|
402 |
<property name="minimumSize"> |
|
403 |
<size> |
|
404 |
<width>50</width> |
|
405 |
<height>0</height> |
|
406 |
</size> |
|
407 |
</property> |
|
408 |
<property name="maximumSize"> |
|
409 |
<size> |
|
410 |
<width>50</width> |
|
411 |
<height>16777215</height> |
|
412 |
</size> |
|
413 |
</property> |
|
414 |
<property name="text"> |
|
415 |
<string>추가</string> |
|
416 |
</property> |
|
417 |
</widget> |
|
418 |
</item> |
|
419 |
</layout> |
|
420 |
</item> |
|
421 |
<item> |
|
422 |
<layout class="QHBoxLayout" name="horizontalLayout_2"> |
|
423 |
<property name="sizeConstraint"> |
|
424 |
<enum>QLayout::SetDefaultConstraint</enum> |
|
425 |
</property> |
|
426 |
<item> |
|
427 |
<layout class="QHBoxLayout" name="horizontalLayout_4"/> |
|
428 |
</item> |
|
429 |
<item> |
|
430 |
<widget class="QComboBox" name="comboBoxProperties"/> |
|
431 |
</item> |
|
432 |
<item> |
|
433 |
<widget class="QPushButton" name="pushButtonAddProperty"> |
|
434 |
<property name="minimumSize"> |
|
435 |
<size> |
|
436 |
<width>50</width> |
|
437 |
<height>0</height> |
|
438 |
</size> |
|
439 |
</property> |
|
440 |
<property name="maximumSize"> |
|
441 |
<size> |
|
442 |
<width>50</width> |
|
443 |
<height>16777215</height> |
|
444 |
</size> |
|
445 |
</property> |
|
446 |
<property name="text"> |
|
447 |
<string>추가</string> |
|
448 |
</property> |
|
449 |
<property name="default"> |
|
450 |
<bool>false</bool> |
|
451 |
</property> |
|
452 |
</widget> |
|
453 |
</item> |
|
454 |
</layout> |
|
455 |
</item> |
|
456 |
<item> |
|
457 |
<layout class="QHBoxLayout" name="horizontalLayout_3"/> |
|
458 |
</item> |
|
459 |
</layout> |
|
460 |
</item> |
|
461 |
</layout> |
|
462 |
</widget> |
|
463 |
</item> |
|
441 | 464 |
</layout> |
442 | 465 |
</widget> |
443 | 466 |
<widget class="QWidget" name="tabTagNoRule"> |
내보내기 Unified diff