프로젝트

일반

사용자정보

개정판 6d59f069

ID6d59f06972a32c7fe253e59cadef1649edca9da5
상위 f36aedff
하위 35eb686f, 97c72ace

함의성이(가) 약 5년 전에 추가함

issue #663: add symbol training ui

Change-Id: I34fb54a49b002de0d1f0b98070b6f7491f0fb844

차이점 보기:

DTI_PID/DTI_PID/TrainingSymbolEditor_UI.py
1
# -*- coding: utf-8 -*-
2

  
3
# Form implementation generated from reading ui file './UI/TrainingSymbolEditor.ui'
4
#
5
# Created by: PyQt5 UI code generator 5.11.3
6
#
7
# WARNING! All changes made in this file will be lost!
8

  
9
from PyQt5 import QtCore, QtGui, QtWidgets
10

  
11
class Ui_TrainingEditorDialog(object):
12
    def setupUi(self, TrainingEditorDialog):
13
        TrainingEditorDialog.setObjectName("TrainingEditorDialog")
14
        TrainingEditorDialog.resize(1088, 780)
15
        self.gridLayout = QtWidgets.QGridLayout(TrainingEditorDialog)
16
        self.gridLayout.setObjectName("gridLayout")
17
        self.verticalLayout_6 = QtWidgets.QVBoxLayout()
18
        self.verticalLayout_6.setObjectName("verticalLayout_6")
19
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
20
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
21
        self.horizontalLayout = QtWidgets.QHBoxLayout()
22
        self.horizontalLayout.setObjectName("horizontalLayout")
23
        self.pushButtonZoom = QtWidgets.QPushButton(TrainingEditorDialog)
24
        self.pushButtonZoom.setMinimumSize(QtCore.QSize(64, 32))
25
        self.pushButtonZoom.setMaximumSize(QtCore.QSize(64, 32))
26
        self.pushButtonZoom.setCheckable(True)
27
        self.pushButtonZoom.setAutoDefault(False)
28
        self.pushButtonZoom.setObjectName("pushButtonZoom")
29
        self.horizontalLayout.addWidget(self.pushButtonZoom)
30
        self.pushButtonAdd = QtWidgets.QPushButton(TrainingEditorDialog)
31
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum)
32
        sizePolicy.setHorizontalStretch(0)
33
        sizePolicy.setVerticalStretch(0)
34
        sizePolicy.setHeightForWidth(self.pushButtonAdd.sizePolicy().hasHeightForWidth())
35
        self.pushButtonAdd.setSizePolicy(sizePolicy)
36
        self.pushButtonAdd.setMinimumSize(QtCore.QSize(64, 32))
37
        self.pushButtonAdd.setMaximumSize(QtCore.QSize(64, 32))
38
        self.pushButtonAdd.setAutoDefault(False)
39
        self.pushButtonAdd.setObjectName("pushButtonAdd")
40
        self.horizontalLayout.addWidget(self.pushButtonAdd)
41
        self.pushButtonDelete = QtWidgets.QPushButton(TrainingEditorDialog)
42
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum)
43
        sizePolicy.setHorizontalStretch(0)
44
        sizePolicy.setVerticalStretch(0)
45
        sizePolicy.setHeightForWidth(self.pushButtonDelete.sizePolicy().hasHeightForWidth())
46
        self.pushButtonDelete.setSizePolicy(sizePolicy)
47
        self.pushButtonDelete.setMinimumSize(QtCore.QSize(64, 32))
48
        self.pushButtonDelete.setMaximumSize(QtCore.QSize(64, 32))
49
        self.pushButtonDelete.setAutoDefault(False)
50
        self.pushButtonDelete.setObjectName("pushButtonDelete")
51
        self.horizontalLayout.addWidget(self.pushButtonDelete)
52
        self.pushButtonSplit = QtWidgets.QPushButton(TrainingEditorDialog)
53
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum)
54
        sizePolicy.setHorizontalStretch(0)
55
        sizePolicy.setVerticalStretch(0)
56
        sizePolicy.setHeightForWidth(self.pushButtonSplit.sizePolicy().hasHeightForWidth())
57
        self.pushButtonSplit.setSizePolicy(sizePolicy)
58
        self.pushButtonSplit.setMinimumSize(QtCore.QSize(64, 32))
59
        self.pushButtonSplit.setMaximumSize(QtCore.QSize(64, 32))
60
        self.pushButtonSplit.setAutoDefault(False)
61
        self.pushButtonSplit.setObjectName("pushButtonSplit")
62
        self.horizontalLayout.addWidget(self.pushButtonSplit)
63
        self.horizontalLayout_2.addLayout(self.horizontalLayout)
64
        spacerItem = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
65
        self.horizontalLayout_2.addItem(spacerItem)
66
        self.verticalLayout_6.addLayout(self.horizontalLayout_2)
67
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
68
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
69
        self.centralWidget = QtWidgets.QWidget(TrainingEditorDialog)
70
        self.centralWidget.setObjectName("centralWidget")
71
        self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.centralWidget)
72
        self.verticalLayout_5.setObjectName("verticalLayout_5")
73
        self.verticalLayoutTrainingDrawing = QtWidgets.QVBoxLayout()
74
        self.verticalLayoutTrainingDrawing.setObjectName("verticalLayoutTrainingDrawing")
75
        self.verticalLayout_5.addLayout(self.verticalLayoutTrainingDrawing)
76
        spacerItem1 = QtWidgets.QSpacerItem(4000, 0, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
77
        self.verticalLayout_5.addItem(spacerItem1)
78
        self.horizontalLayout_4.addWidget(self.centralWidget)
79
        self.leftSideWidget = QtWidgets.QWidget(TrainingEditorDialog)
80
        self.leftSideWidget.setObjectName("leftSideWidget")
81
        self.sideWidget = QtWidgets.QVBoxLayout(self.leftSideWidget)
82
        self.sideWidget.setObjectName("sideWidget")
83
        self.horizontalLayoutZoomDrawing = QtWidgets.QHBoxLayout()
84
        self.horizontalLayoutZoomDrawing.setObjectName("horizontalLayoutZoomDrawing")
85
        spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
86
        self.horizontalLayoutZoomDrawing.addItem(spacerItem2)
87
        self.sideWidget.addLayout(self.horizontalLayoutZoomDrawing)
88
        self.verticalLayout_7 = QtWidgets.QVBoxLayout()
89
        self.verticalLayout_7.setObjectName("verticalLayout_7")
90
        self.gridLayout_2 = QtWidgets.QGridLayout()
91
        self.gridLayout_2.setObjectName("gridLayout_2")
92
        self.spinBoxWidth = QtWidgets.QSpinBox(self.leftSideWidget)
93
        self.spinBoxWidth.setMinimumSize(QtCore.QSize(80, 0))
94
        self.spinBoxWidth.setMaximumSize(QtCore.QSize(80, 16777215))
95
        self.spinBoxWidth.setMaximum(999999)
96
        self.spinBoxWidth.setObjectName("spinBoxWidth")
97
        self.gridLayout_2.addWidget(self.spinBoxWidth, 1, 1, 1, 1)
98
        spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
99
        self.gridLayout_2.addItem(spacerItem3, 2, 3, 1, 1)
100
        self.spinBoxLeft = QtWidgets.QSpinBox(self.leftSideWidget)
101
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
102
        sizePolicy.setHorizontalStretch(0)
103
        sizePolicy.setVerticalStretch(0)
104
        sizePolicy.setHeightForWidth(self.spinBoxLeft.sizePolicy().hasHeightForWidth())
105
        self.spinBoxLeft.setSizePolicy(sizePolicy)
106
        self.spinBoxLeft.setMinimumSize(QtCore.QSize(80, 0))
107
        self.spinBoxLeft.setMaximumSize(QtCore.QSize(80, 16777215))
108
        self.spinBoxLeft.setMaximum(999999)
109
        self.spinBoxLeft.setObjectName("spinBoxLeft")
110
        self.gridLayout_2.addWidget(self.spinBoxLeft, 0, 1, 1, 1)
111
        spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
112
        self.gridLayout_2.addItem(spacerItem4, 2, 4, 1, 1)
113
        self.lineEditChar = QtWidgets.QLineEdit(self.leftSideWidget)
114
        self.lineEditChar.setMinimumSize(QtCore.QSize(80, 0))
115
        self.lineEditChar.setMaximumSize(QtCore.QSize(80, 16777215))
116
        font = QtGui.QFont()
117
        font.setFamily("Consolas")
118
        self.lineEditChar.setFont(font)
119
        self.lineEditChar.setMaxLength(1)
120
        self.lineEditChar.setObjectName("lineEditChar")
121
        self.gridLayout_2.addWidget(self.lineEditChar, 2, 1, 1, 1)
122
        self.label_6 = QtWidgets.QLabel(self.leftSideWidget)
123
        self.label_6.setObjectName("label_6")
124
        self.gridLayout_2.addWidget(self.label_6, 0, 3, 1, 1)
125
        self.label_7 = QtWidgets.QLabel(self.leftSideWidget)
126
        self.label_7.setObjectName("label_7")
127
        self.gridLayout_2.addWidget(self.label_7, 1, 3, 1, 1)
128
        self.label_3 = QtWidgets.QLabel(self.leftSideWidget)
129
        self.label_3.setObjectName("label_3")
130
        self.gridLayout_2.addWidget(self.label_3, 0, 0, 1, 1)
131
        self.spinBoxHeight = QtWidgets.QSpinBox(self.leftSideWidget)
132
        self.spinBoxHeight.setMinimumSize(QtCore.QSize(80, 0))
133
        self.spinBoxHeight.setMaximumSize(QtCore.QSize(80, 16777215))
134
        self.spinBoxHeight.setMaximum(999999)
135
        self.spinBoxHeight.setObjectName("spinBoxHeight")
136
        self.gridLayout_2.addWidget(self.spinBoxHeight, 1, 4, 1, 1)
137
        self.spinBoxTop = QtWidgets.QSpinBox(self.leftSideWidget)
138
        self.spinBoxTop.setMinimumSize(QtCore.QSize(80, 0))
139
        self.spinBoxTop.setMaximumSize(QtCore.QSize(80, 16777215))
140
        self.spinBoxTop.setMaximum(999999)
141
        self.spinBoxTop.setObjectName("spinBoxTop")
142
        self.gridLayout_2.addWidget(self.spinBoxTop, 0, 4, 1, 1)
143
        self.label_4 = QtWidgets.QLabel(self.leftSideWidget)
144
        self.label_4.setObjectName("label_4")
145
        self.gridLayout_2.addWidget(self.label_4, 2, 0, 1, 1)
146
        self.label_5 = QtWidgets.QLabel(self.leftSideWidget)
147
        self.label_5.setObjectName("label_5")
148
        self.gridLayout_2.addWidget(self.label_5, 1, 0, 1, 1)
149
        spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
150
        self.gridLayout_2.addItem(spacerItem5, 0, 2, 1, 1)
151
        self.verticalLayout_7.addLayout(self.gridLayout_2)
152
        spacerItem6 = QtWidgets.QSpacerItem(20, 30, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
153
        self.verticalLayout_7.addItem(spacerItem6)
154
        spacerItem7 = QtWidgets.QSpacerItem(400, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
155
        self.verticalLayout_7.addItem(spacerItem7)
156
        self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
157
        self.horizontalLayout_5.setObjectName("horizontalLayout_5")
158
        spacerItem8 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
159
        self.horizontalLayout_5.addItem(spacerItem8)
160
        self.pushButtonSave = QtWidgets.QPushButton(self.leftSideWidget)
161
        self.pushButtonSave.setMaximumSize(QtCore.QSize(80, 16777215))
162
        self.pushButtonSave.setObjectName("pushButtonSave")
163
        self.horizontalLayout_5.addWidget(self.pushButtonSave)
164
        self.pushButtonCancel = QtWidgets.QPushButton(self.leftSideWidget)
165
        self.pushButtonCancel.setMaximumSize(QtCore.QSize(80, 16777215))
166
        self.pushButtonCancel.setObjectName("pushButtonCancel")
167
        self.horizontalLayout_5.addWidget(self.pushButtonCancel)
168
        self.verticalLayout_7.addLayout(self.horizontalLayout_5)
169
        self.sideWidget.addLayout(self.verticalLayout_7)
170
        self.horizontalLayout_4.addWidget(self.leftSideWidget)
171
        self.verticalLayout_6.addLayout(self.horizontalLayout_4)
172
        self.gridLayout.addLayout(self.verticalLayout_6, 0, 0, 1, 1)
173

  
174
        self.retranslateUi(TrainingEditorDialog)
175
        QtCore.QMetaObject.connectSlotsByName(TrainingEditorDialog)
176

  
177
    def retranslateUi(self, TrainingEditorDialog):
178
        _translate = QtCore.QCoreApplication.translate
179
        TrainingEditorDialog.setWindowTitle(_translate("TrainingEditorDialog", "Training Editor"))
180
        self.pushButtonZoom.setText(_translate("TrainingEditorDialog", "Zoom"))
181
        self.pushButtonAdd.setText(_translate("TrainingEditorDialog", "Add"))
182
        self.pushButtonDelete.setText(_translate("TrainingEditorDialog", "Delete"))
183
        self.pushButtonSplit.setText(_translate("TrainingEditorDialog", "Divide"))
184
        self.label_6.setText(_translate("TrainingEditorDialog", "Top"))
185
        self.label_7.setText(_translate("TrainingEditorDialog", "Height"))
186
        self.label_3.setText(_translate("TrainingEditorDialog", "Left"))
187
        self.label_4.setText(_translate("TrainingEditorDialog", "Character"))
188
        self.label_5.setText(_translate("TrainingEditorDialog", "Width"))
189
        self.pushButtonSave.setText(_translate("TrainingEditorDialog", "Save"))
190
        self.pushButtonCancel.setText(_translate("TrainingEditorDialog", "Close"))
191

  
192

  
193
if __name__ == "__main__":
194
    import sys
195
    app = QtWidgets.QApplication(sys.argv)
196
    TrainingEditorDialog = QtWidgets.QDialog()
197
    ui = Ui_TrainingEditorDialog()
198
    ui.setupUi(TrainingEditorDialog)
199
    TrainingEditorDialog.show()
200
    sys.exit(app.exec_())
201

  
DTI_PID/DTI_PID/TrainingSymbolImageList_UI.py
1
# -*- coding: utf-8 -*-
2

  
3
# Form implementation generated from reading ui file './UI/TrainingSymbolImageList.ui'
4
#
5
# Created by: PyQt5 UI code generator 5.11.3
6
#
7
# WARNING! All changes made in this file will be lost!
8

  
9
from PyQt5 import QtCore, QtGui, QtWidgets
10

  
11
class Ui_TraingingSymbolImageListDialog(object):
12
    def setupUi(self, TraingingSymbolImageListDialog):
13
        TraingingSymbolImageListDialog.setObjectName("TraingingSymbolImageListDialog")
14
        TraingingSymbolImageListDialog.resize(1556, 707)
15
        font = QtGui.QFont()
16
        font.setFamily("맑은 고딕")
17
        font.setBold(True)
18
        font.setWeight(75)
19
        TraingingSymbolImageListDialog.setFont(font)
20
        icon = QtGui.QIcon()
21
        icon.addPixmap(QtGui.QPixmap(":/newPrefix/OCR.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
22
        TraingingSymbolImageListDialog.setWindowIcon(icon)
23
        self.gridLayout = QtWidgets.QGridLayout(TraingingSymbolImageListDialog)
24
        self.gridLayout.setObjectName("gridLayout")
25
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
26
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
27
        self.pushButtonDeleteBatchLabel = QtWidgets.QPushButton(TraingingSymbolImageListDialog)
28
        self.pushButtonDeleteBatchLabel.setObjectName("pushButtonDeleteBatchLabel")
29
        self.horizontalLayout_4.addWidget(self.pushButtonDeleteBatchLabel)
30
        self.lineEditTargetChar = QtWidgets.QLineEdit(TraingingSymbolImageListDialog)
31
        self.lineEditTargetChar.setMaximumSize(QtCore.QSize(20, 16777215))
32
        self.lineEditTargetChar.setMaxLength(1)
33
        self.lineEditTargetChar.setObjectName("lineEditTargetChar")
34
        self.horizontalLayout_4.addWidget(self.lineEditTargetChar)
35
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
36
        self.horizontalLayout_4.addItem(spacerItem)
37
        self.pushButtonImageDelete = QtWidgets.QPushButton(TraingingSymbolImageListDialog)
38
        self.pushButtonImageDelete.setMinimumSize(QtCore.QSize(90, 0))
39
        self.pushButtonImageDelete.setAutoDefault(False)
40
        self.pushButtonImageDelete.setObjectName("pushButtonImageDelete")
41
        self.horizontalLayout_4.addWidget(self.pushButtonImageDelete)
42
        self.pushButtonLabelDelete = QtWidgets.QPushButton(TraingingSymbolImageListDialog)
43
        self.pushButtonLabelDelete.setMinimumSize(QtCore.QSize(90, 0))
44
        self.pushButtonLabelDelete.setAutoDefault(False)
45
        self.pushButtonLabelDelete.setObjectName("pushButtonLabelDelete")
46
        self.horizontalLayout_4.addWidget(self.pushButtonLabelDelete)
47
        self.gridLayout.addLayout(self.horizontalLayout_4, 0, 0, 1, 1)
48
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
49
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
50
        self.label = QtWidgets.QLabel(TraingingSymbolImageListDialog)
51
        self.label.setMaximumSize(QtCore.QSize(100, 16777215))
52
        font = QtGui.QFont()
53
        font.setBold(False)
54
        font.setWeight(50)
55
        self.label.setFont(font)
56
        self.label.setObjectName("label")
57
        self.horizontalLayout_3.addWidget(self.label)
58
        self.spinBox = QtWidgets.QSpinBox(TraingingSymbolImageListDialog)
59
        self.spinBox.setMaximum(2048)
60
        self.spinBox.setProperty("value", 600)
61
        self.spinBox.setObjectName("spinBox")
62
        self.horizontalLayout_3.addWidget(self.spinBox)
63
        self.label_2 = QtWidgets.QLabel(TraingingSymbolImageListDialog)
64
        self.label_2.setObjectName("label_2")
65
        self.horizontalLayout_3.addWidget(self.label_2)
66
        self.spinBox_2 = QtWidgets.QSpinBox(TraingingSymbolImageListDialog)
67
        self.spinBox_2.setMaximum(2024)
68
        self.spinBox_2.setProperty("value", 1024)
69
        self.spinBox_2.setObjectName("spinBox_2")
70
        self.horizontalLayout_3.addWidget(self.spinBox_2)
71
        spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
72
        self.horizontalLayout_3.addItem(spacerItem1)
73
        self.gridLayout.addLayout(self.horizontalLayout_3, 1, 0, 1, 1)
74
        self.horizontalLayout = QtWidgets.QHBoxLayout()
75
        self.horizontalLayout.setObjectName("horizontalLayout")
76
        self.pushButtonLabel = QtWidgets.QPushButton(TraingingSymbolImageListDialog)
77
        self.pushButtonLabel.setAutoDefault(False)
78
        self.pushButtonLabel.setObjectName("pushButtonLabel")
79
        self.horizontalLayout.addWidget(self.pushButtonLabel)
80
        self.pushButtonMakeTrainingImage = QtWidgets.QPushButton(TraingingSymbolImageListDialog)
81
        self.pushButtonMakeTrainingImage.setAutoDefault(False)
82
        self.pushButtonMakeTrainingImage.setObjectName("pushButtonMakeTrainingImage")
83
        self.horizontalLayout.addWidget(self.pushButtonMakeTrainingImage)
84
        self.progressBar = QtWidgets.QProgressBar(TraingingSymbolImageListDialog)
85
        self.progressBar.setProperty("value", 0)
86
        self.progressBar.setObjectName("progressBar")
87
        self.horizontalLayout.addWidget(self.progressBar)
88
        self.pushButtonClose = QtWidgets.QPushButton(TraingingSymbolImageListDialog)
89
        self.pushButtonClose.setAutoDefault(False)
90
        self.pushButtonClose.setObjectName("pushButtonClose")
91
        self.horizontalLayout.addWidget(self.pushButtonClose)
92
        self.gridLayout.addLayout(self.horizontalLayout, 3, 0, 1, 1)
93
        self.splitter = QtWidgets.QSplitter(TraingingSymbolImageListDialog)
94
        self.splitter.setOrientation(QtCore.Qt.Vertical)
95
        self.splitter.setObjectName("splitter")
96
        self.tableWidgetList = QtWidgets.QTableWidget(self.splitter)
97
        self.tableWidgetList.setMinimumSize(QtCore.QSize(0, 400))
98
        self.tableWidgetList.setColumnCount(1)
99
        self.tableWidgetList.setObjectName("tableWidgetList")
100
        self.tableWidgetList.setRowCount(0)
101
        self.tableWidgetList.horizontalHeader().setSortIndicatorShown(True)
102
        self.tableWidgetList.verticalHeader().setVisible(False)
103
        self.horizontalLayoutWidget = QtWidgets.QWidget(self.splitter)
104
        self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
105
        self.horizontalLayoutChart = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget)
106
        self.horizontalLayoutChart.setContentsMargins(0, 0, 0, 0)
107
        self.horizontalLayoutChart.setObjectName("horizontalLayoutChart")
108
        self.gridLayout.addWidget(self.splitter, 2, 0, 1, 1)
109

  
110
        self.retranslateUi(TraingingSymbolImageListDialog)
111
        QtCore.QMetaObject.connectSlotsByName(TraingingSymbolImageListDialog)
112

  
113
    def retranslateUi(self, TraingingSymbolImageListDialog):
114
        _translate = QtCore.QCoreApplication.translate
115
        TraingingSymbolImageListDialog.setWindowTitle(_translate("TraingingSymbolImageListDialog", "Symbol Training Image List"))
116
        self.pushButtonDeleteBatchLabel.setText(_translate("TraingingSymbolImageListDialog", "Delete Batch Label "))
117
        self.pushButtonImageDelete.setText(_translate("TraingingSymbolImageListDialog", "Del Image"))
118
        self.pushButtonLabelDelete.setText(_translate("TraingingSymbolImageListDialog", "Del Label Data"))
119
        self.label.setText(_translate("TraingingSymbolImageListDialog", "Min Size : "))
120
        self.label_2.setText(_translate("TraingingSymbolImageListDialog", "Max Size : "))
121
        self.pushButtonLabel.setText(_translate("TraingingSymbolImageListDialog", "Edit Label"))
122
        self.pushButtonMakeTrainingImage.setText(_translate("TraingingSymbolImageListDialog", "Generate Training Image"))
123
        self.pushButtonClose.setText(_translate("TraingingSymbolImageListDialog", "Close"))
124
        self.tableWidgetList.setSortingEnabled(True)
125

  
126
import MainWindow_rc
127

  
128
if __name__ == "__main__":
129
    import sys
130
    app = QtWidgets.QApplication(sys.argv)
131
    TraingingSymbolImageListDialog = QtWidgets.QDialog()
132
    ui = Ui_TraingingSymbolImageListDialog()
133
    ui.setupUi(TraingingSymbolImageListDialog)
134
    TraingingSymbolImageListDialog.show()
135
    sys.exit(app.exec_())
136

  
DTI_PID/DTI_PID/TrainingSymbolListDialog.py
1
import sys
2
import os
3
from PyQt5.QtCore import *
4
from PyQt5.QtGui import *
5
from PyQt5.QtWidgets import *
6
from AppDocData import AppDocData, Source
7
import pytesseract
8
import TrainingList_UI
9

  
10

  
11
pytesseract.pytesseract.tesseract_cmd = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'Tesseract-OCR', 'tesseract.exe')
12
tesseract_cmd = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'Tesseract-OCR', 'tesseract.exe')
13

  
14
DEFAULT_CONF = """
15
    --psm 6 -c tessedit_char_whitelist=ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-~.,/!@#$%&*(){}[]<>:;+=?\\"\\'
16
"""
17

  
18
class QTrainingListDialog(QDialog):
19

  
20
    trainingDataNumber = 0
21

  
22
    def __init__(self, parent):
23
        QDialog.__init__(self, parent)
24

  
25
        self.ui = TrainingList_UI.Ui_TraingingListDialog()
26
        self.ui.setupUi(self)
27

  
28
        # for List 
29
        self.ui.tableWidgetList.setSelectionMode(QAbstractItemView.SingleSelection) 
30
        self.ui.tableWidgetList.setColumnCount(2)
31
        self.ui.tableWidgetList.setSortingEnabled(True)
32

  
33
        docData = AppDocData.instance()
34
        dataList = docData.getDrawingFileList()
35
        self.ui.tableWidgetList.setRowCount(len(dataList))
36

  
37
        ## column header 명 설정
38
        headerLabel = docData.getCurrentProject().getName()
39
        self.ui.tableWidgetList.setHorizontalHeaderLabels(['No.', headerLabel])
40
        self.ui.tableWidgetList.horizontalHeaderItem(1).setToolTip('도면 이름') # header tooltip
41
        self.ui.tableWidgetList.horizontalHeaderItem(1).setSizeHint(QSize(30, 30))
42
        self.ui.tableWidgetList.horizontalHeader().setSectionResizeMode(0, QHeaderView.ResizeToContents)
43
        self.ui.tableWidgetList.horizontalHeader().setSectionResizeMode(1, QHeaderView.Stretch)
44
        self.ui.tableWidgetList.setEditTriggers(QAbstractItemView.NoEditTriggers)
45
        
46
        row = 0
47
        for data in dataList:
48
            self.ui.tableWidgetList.setItem(row, 0, QTableWidgetItem(str(row + 1)))
49
            self.ui.tableWidgetList.setItem(row, 1, QTableWidgetItem(data))
50
            row += 1
51

  
52
        # for Selected
53
        self.ui.tableWidgetSelected.setSelectionMode(QAbstractItemView.SingleSelection) 
54
        self.ui.tableWidgetSelected.setColumnCount(3)
55

  
56
        ## column header 명 설정
57
        headerLabel = docData.getCurrentProject().getName()
58
        self.ui.tableWidgetSelected.setHorizontalHeaderLabels(['No.', headerLabel, '작업 상태'])
59
        self.ui.tableWidgetSelected.horizontalHeaderItem(1).setToolTip('도면 이름') # header tooltip
60
        self.ui.tableWidgetSelected.horizontalHeaderItem(2).setToolTip('작업 상태') # header tooltip
61
        self.ui.tableWidgetSelected.horizontalHeaderItem(1).setSizeHint(QSize(30, 30))
62
        self.ui.tableWidgetSelected.horizontalHeader().setSectionResizeMode(0, QHeaderView.ResizeToContents)
63
        self.ui.tableWidgetSelected.horizontalHeader().setSectionResizeMode(1, QHeaderView.Stretch)
64
        self.ui.tableWidgetSelected.setEditTriggers(QAbstractItemView.NoEditTriggers)
65

  
66
        # connect signals and slots
67
        self.ui.tableWidgetList.cellDoubleClicked.connect(self.listCellDoubleClicked)
68
        self.ui.pushButtonAddList.clicked.connect(self.addListClicked)
69
        self.ui.pushButtonMakeTrainingData.clicked.connect(self.makeTrainingDataClicked)
70

  
71

  
72
    '''
73
        @brief      make training data(text image + Box file) by button click
74
        @author     euisung
75
        @date       2018.09.28
76
    '''        
77
    def makeTrainingDataClicked(self):
78
        from TextDetector import TextDetector
79
        from PIL import Image
80
        import cv2, math
81
        import numpy as np
82

  
83
        try:
84
            row = self.ui.tableWidgetSelected.selectedIndexes()[0].row()
85
            col = self.ui.tableWidgetSelected.selectedIndexes()[0].column()
86
            drawingName = self.ui.tableWidgetSelected.item(row, 1).text()
87
        except:
88
            return
89

  
90
        try:
91
            appDocData = AppDocData.instance()
92
            project = appDocData.getCurrentProject()
93
            textDetector = TextDetector()
94

  
95
            drawingPath = os.path.join(project.getDrawingFilePath(), drawingName)
96
            drawing = Source(Image.open(drawingPath))
97

  
98
            _imgSrc = cv2.cvtColor(cv2.imread(drawingPath), cv2.COLOR_BGR2GRAY)
99
            blur = cv2.GaussianBlur(_imgSrc , (5,5),0)
100
            _imgSrc = cv2.threshold(_imgSrc , 0, 255, cv2.THRESH_BINARY+cv2.THRESH_OTSU)[1]
101

  
102
            textAreas = textDetector.detectTextAreas(_imgSrc , (0,0))
103

  
104
            areasNumber = len(textAreas)
105
            print('total text areas : ' + str(areasNumber))
106
            maxW, maxH, sumW, sumH, count = 0, 0, 0, 0, 0
107
            for textArea in textAreas:
108
                areaW = textArea.getW()
109
                areaH = textArea.getH()
110
                areaA = textArea.getAngle()
111
                if areaA is 90:
112
                    areaW, areaH = areaH, areaW
113
                if areaA is not 0 and areaA is not 90:
114
                    continue
115
                count += 1
116
                sumW += areaW
117
                sumH += areaH
118
                if maxW < areaW:
119
                    maxW = areaW
120
                if maxH < areaH:
121
                    maxH = areaH
122
            
123
            print('count : ' + str(count))
124
            print('max width : ' + str(maxW) + ', max height : ' + str(maxH))
125
            argW = sumW / count
126
            argH = sumH / count
127
            print('arg width : ' + str(argW) + ', arg height : ' + str(argH))
128
            totalArea = math.ceil(argW * argH * count)
129
            totalBaseWidth = math.ceil(math.sqrt(totalArea))
130
            print('total area theory : ' + str(totalArea) + ', total width : ' + str(totalBaseWidth))
131

  
132
            maxLineH, lineW, totalHeight = 0, 0, 0
133
            for index in range(0, areasNumber):
134
                areaW = textAreas[index].getW()
135
                areaH = textAreas[index].getH()
136
                areaA = textAreas[index].getAngle()
137
                if areaA is 90:
138
                    areaW, areaH = areaH, areaW
139
                if areaA is not 0 and areaA is not 90:
140
                    continue
141

  
142
                if maxLineH < areaH:
143
                    maxLineH = areaH
144
                if lineW + areaW < totalBaseWidth:
145
                    lineW += areaW
146
                else:
147
                    lineW = areaW
148
                    totalHeight += maxLineH
149
            totalHeight += maxLineH
150
            print('total area real : ' + str(totalBaseWidth * totalHeight) +', total width : ' + str(totalBaseWidth) + ', total height : ' + str(totalHeight) + ', ratio : ' + str(totalHeight / totalBaseWidth))
151

  
152
            trainingTextImg = Image.new("RGB", (totalBaseWidth, totalHeight), (256,256,256))
153
            maxLineH, lineW, totalHeight, currentX, currentY = 0, 0, 0, 0, 0
154
            for index in range(0, areasNumber):
155
                #print(index)
156
                areaW = textAreas[index].getW()
157
                areaH = textAreas[index].getH()
158
                areaA = textAreas[index].getAngle()
159

  
160
                textAreaImg = drawing.source.crop((textAreas[index].getX(), textAreas[index].getY(), textAreas[index].getX() + areaW, textAreas[index].getY() + areaH))
161

  
162
                if areaA is 90:
163
                    areaW, areaH = areaH, areaW
164
                    textAreaImg = textAreaImg.transpose(Image.ROTATE_270)
165
                if areaA is not 0 and areaA is not 90:
166
                    continue
167

  
168
                if maxLineH < areaH:
169
                    maxLineH = areaH
170
                if lineW + areaW < totalBaseWidth:
171
                    lineW += areaW
172
                    trainingTextImg.paste(textAreaImg, (currentX, currentY, currentX + areaW, currentY + areaH))
173
                    currentX = lineW
174
                else:
175
                    lineW = areaW
176
                    totalHeight += maxLineH
177
                    currentX = 0
178
                    currentY = totalHeight
179
                    trainingTextImg.paste(textAreaImg, (currentX, currentY, currentX + areaW, currentY + areaH))
180
                    currentX = areaW
181
               #trainingTextImg.show()
182
            #trainingTextImg.show()
183
            boundaryOcrData = pytesseract.image_to_boxes(trainingTextImg, config=DEFAULT_CONF, lang='seed+eng')
184

  
185
            trainingImgPath = os.path.join(project.getTrainingFilePath(), 'seed.seedF.exp0.tif')
186
            trainingBoxPath = os.path.join(project.getTrainingFilePath(), 'seed.seedF.exp0.box')
187

  
188
            trainingTextImg.save(trainingImgPath, compression='tiff_lzw')
189
            fw = open(trainingBoxPath, 'w') #파일 있으면 새로 만듬 예외 처리 안됨, 임시
190
            fw.write(boundaryOcrData)
191
            fw.close()
192
            
193
        except Exception as ex:
194
            print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno))
195
        return
196

  
197
    '''
198
        @brief      add drawing to Selected by button click
199
        @author     euisung
200
        @date       2018.09.28
201
    '''        
202
    def addListClicked(self):
203
        try:
204
            row = self.ui.tableWidgetList.selectedIndexes()[0].row()
205
            col = self.ui.tableWidgetList.selectedIndexes()[0].column()
206
            self.listCellDoubleClicked(row, col)
207
        except Exception as ex:
208
            pass
209
        return
210

  
211

  
212
    '''
213
        @brief      add drawing to Selected by cell double click
214
        @author     euisung
215
        @date       2018.09.28
216
    '''
217
    def listCellDoubleClicked(self, row, col):
218
        #print('row : ' + str(row) + ', col : ' + str(col))
219
        rowPosition = self.ui.tableWidgetSelected.rowCount()
220
        self.ui.tableWidgetSelected.setRowCount(rowPosition + 1)
221

  
222
        drawingName = self.ui.tableWidgetList.item(row, 1).text()
223
        #print(drawingName)
224
        self.trainingDataNumber = self.trainingDataNumber + 1
225
        self.ui.tableWidgetSelected.setItem(rowPosition, 0, QTableWidgetItem(str(self.trainingDataNumber)))
226
        self.ui.tableWidgetSelected.setItem(rowPosition, 1, QTableWidgetItem(drawingName))
227
        self.ui.tableWidgetSelected.setItem(rowPosition, 2, QTableWidgetItem('신규'))
228

  
229
        return
230

  
231

  
232
        
DTI_PID/DTI_PID/UI/TrainingSymbolEditor.ui
1
<?xml version="1.0" encoding="UTF-8"?>
2
<ui version="4.0">
3
 <class>TrainingEditorDialog</class>
4
 <widget class="QDialog" name="TrainingEditorDialog">
5
  <property name="geometry">
6
   <rect>
7
    <x>0</x>
8
    <y>0</y>
9
    <width>1088</width>
10
    <height>780</height>
11
   </rect>
12
  </property>
13
  <property name="windowTitle">
14
   <string>Training Editor</string>
15
  </property>
16
  <layout class="QGridLayout" name="gridLayout">
17
   <item row="0" column="0">
18
    <layout class="QVBoxLayout" name="verticalLayout_6">
19
     <item>
20
      <layout class="QHBoxLayout" name="horizontalLayout_2">
21
       <item>
22
        <layout class="QHBoxLayout" name="horizontalLayout">
23
         <item>
24
          <widget class="QPushButton" name="pushButtonZoom">
25
           <property name="minimumSize">
26
            <size>
27
             <width>64</width>
28
             <height>32</height>
29
            </size>
30
           </property>
31
           <property name="maximumSize">
32
            <size>
33
             <width>64</width>
34
             <height>32</height>
35
            </size>
36
           </property>
37
           <property name="text">
38
            <string>Zoom</string>
39
           </property>
40
           <property name="checkable">
41
            <bool>true</bool>
42
           </property>
43
           <property name="autoDefault">
44
            <bool>false</bool>
45
           </property>
46
          </widget>
47
         </item>
48
         <item>
49
          <widget class="QPushButton" name="pushButtonAdd">
50
           <property name="sizePolicy">
51
            <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
52
             <horstretch>0</horstretch>
53
             <verstretch>0</verstretch>
54
            </sizepolicy>
55
           </property>
56
           <property name="minimumSize">
57
            <size>
58
             <width>64</width>
59
             <height>32</height>
60
            </size>
61
           </property>
62
           <property name="maximumSize">
63
            <size>
64
             <width>64</width>
65
             <height>32</height>
66
            </size>
67
           </property>
68
           <property name="text">
69
            <string>Add</string>
70
           </property>
71
           <property name="autoDefault">
72
            <bool>false</bool>
73
           </property>
74
          </widget>
75
         </item>
76
         <item>
77
          <widget class="QPushButton" name="pushButtonDelete">
78
           <property name="sizePolicy">
79
            <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
80
             <horstretch>0</horstretch>
81
             <verstretch>0</verstretch>
82
            </sizepolicy>
83
           </property>
84
           <property name="minimumSize">
85
            <size>
86
             <width>64</width>
87
             <height>32</height>
88
            </size>
89
           </property>
90
           <property name="maximumSize">
91
            <size>
92
             <width>64</width>
93
             <height>32</height>
94
            </size>
95
           </property>
96
           <property name="text">
97
            <string>Delete</string>
98
           </property>
99
           <property name="autoDefault">
100
            <bool>false</bool>
101
           </property>
102
          </widget>
103
         </item>
104
         <item>
105
          <widget class="QPushButton" name="pushButtonSplit">
106
           <property name="sizePolicy">
107
            <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
108
             <horstretch>0</horstretch>
109
             <verstretch>0</verstretch>
110
            </sizepolicy>
111
           </property>
112
           <property name="minimumSize">
113
            <size>
114
             <width>64</width>
115
             <height>32</height>
116
            </size>
117
           </property>
118
           <property name="maximumSize">
119
            <size>
120
             <width>64</width>
121
             <height>32</height>
122
            </size>
123
           </property>
124
           <property name="text">
125
            <string>Divide</string>
126
           </property>
127
           <property name="autoDefault">
128
            <bool>false</bool>
129
           </property>
130
          </widget>
131
         </item>
132
        </layout>
133
       </item>
134
       <item>
135
        <spacer name="horizontalSpacer">
136
         <property name="orientation">
137
          <enum>Qt::Horizontal</enum>
138
         </property>
139
         <property name="sizeType">
140
          <enum>QSizePolicy::Expanding</enum>
141
         </property>
142
         <property name="sizeHint" stdset="0">
143
          <size>
144
           <width>20</width>
145
           <height>20</height>
146
          </size>
147
         </property>
148
        </spacer>
149
       </item>
150
      </layout>
151
     </item>
152
     <item>
153
      <layout class="QHBoxLayout" name="horizontalLayout_4">
154
       <item>
155
        <widget class="QWidget" name="centralWidget" native="true">
156
         <layout class="QVBoxLayout" name="verticalLayout_5">
157
          <item>
158
           <layout class="QVBoxLayout" name="verticalLayoutTrainingDrawing"/>
159
          </item>
160
          <item>
161
           <spacer name="horizontalSpacer_3">
162
            <property name="orientation">
163
             <enum>Qt::Horizontal</enum>
164
            </property>
165
            <property name="sizeType">
166
             <enum>QSizePolicy::Expanding</enum>
167
            </property>
168
            <property name="sizeHint" stdset="0">
169
             <size>
170
              <width>4000</width>
171
              <height>0</height>
172
             </size>
173
            </property>
174
           </spacer>
175
          </item>
176
         </layout>
177
        </widget>
178
       </item>
179
       <item>
180
        <widget class="QWidget" name="leftSideWidget" native="true">
181
         <layout class="QVBoxLayout" name="sideWidget">
182
          <item>
183
           <layout class="QHBoxLayout" name="horizontalLayoutZoomDrawing">
184
            <item>
185
             <spacer name="verticalSpacer_2">
186
              <property name="orientation">
187
               <enum>Qt::Vertical</enum>
188
              </property>
189
              <property name="sizeHint" stdset="0">
190
               <size>
191
                <width>20</width>
192
                <height>40</height>
193
               </size>
194
              </property>
195
             </spacer>
196
            </item>
197
           </layout>
198
          </item>
199
          <item>
200
           <layout class="QVBoxLayout" name="verticalLayout_7">
201
            <item>
202
             <layout class="QGridLayout" name="gridLayout_2">
203
              <item row="1" column="1">
204
               <widget class="QSpinBox" name="spinBoxWidth">
205
                <property name="minimumSize">
206
                 <size>
207
                  <width>80</width>
208
                  <height>0</height>
209
                 </size>
210
                </property>
211
                <property name="maximumSize">
212
                 <size>
213
                  <width>80</width>
214
                  <height>16777215</height>
215
                 </size>
216
                </property>
217
                <property name="maximum">
218
                 <number>999999</number>
219
                </property>
220
               </widget>
221
              </item>
222
              <item row="2" column="3">
223
               <spacer name="horizontalSpacer_5">
224
                <property name="orientation">
225
                 <enum>Qt::Horizontal</enum>
226
                </property>
227
                <property name="sizeHint" stdset="0">
228
                 <size>
229
                  <width>40</width>
230
                  <height>20</height>
231
                 </size>
232
                </property>
233
               </spacer>
234
              </item>
235
              <item row="0" column="1">
236
               <widget class="QSpinBox" name="spinBoxLeft">
237
                <property name="sizePolicy">
238
                 <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
239
                  <horstretch>0</horstretch>
240
                  <verstretch>0</verstretch>
241
                 </sizepolicy>
242
                </property>
243
                <property name="minimumSize">
244
                 <size>
245
                  <width>80</width>
246
                  <height>0</height>
247
                 </size>
248
                </property>
249
                <property name="maximumSize">
250
                 <size>
251
                  <width>80</width>
252
                  <height>16777215</height>
253
                 </size>
254
                </property>
255
                <property name="maximum">
256
                 <number>999999</number>
257
                </property>
258
               </widget>
259
              </item>
260
              <item row="2" column="4">
261
               <spacer name="horizontalSpacer_6">
262
                <property name="orientation">
263
                 <enum>Qt::Horizontal</enum>
264
                </property>
265
                <property name="sizeHint" stdset="0">
266
                 <size>
267
                  <width>40</width>
268
                  <height>20</height>
269
                 </size>
270
                </property>
271
               </spacer>
272
              </item>
273
              <item row="2" column="1">
274
               <widget class="QLineEdit" name="lineEditChar">
275
                <property name="minimumSize">
276
                 <size>
277
                  <width>80</width>
278
                  <height>0</height>
279
                 </size>
280
                </property>
281
                <property name="maximumSize">
282
                 <size>
283
                  <width>80</width>
284
                  <height>16777215</height>
285
                 </size>
286
                </property>
287
                <property name="font">
288
                 <font>
289
                  <family>Consolas</family>
290
                 </font>
291
                </property>
292
                <property name="maxLength">
293
                 <number>1</number>
294
                </property>
295
               </widget>
296
              </item>
297
              <item row="0" column="3">
298
               <widget class="QLabel" name="label_6">
299
                <property name="text">
300
                 <string>Top</string>
301
                </property>
302
               </widget>
303
              </item>
304
              <item row="1" column="3">
305
               <widget class="QLabel" name="label_7">
306
                <property name="text">
307
                 <string>Height</string>
308
                </property>
309
               </widget>
310
              </item>
311
              <item row="0" column="0">
312
               <widget class="QLabel" name="label_3">
313
                <property name="text">
314
                 <string>Left</string>
315
                </property>
316
               </widget>
317
              </item>
318
              <item row="1" column="4">
319
               <widget class="QSpinBox" name="spinBoxHeight">
320
                <property name="minimumSize">
321
                 <size>
322
                  <width>80</width>
323
                  <height>0</height>
324
                 </size>
325
                </property>
326
                <property name="maximumSize">
327
                 <size>
328
                  <width>80</width>
329
                  <height>16777215</height>
330
                 </size>
331
                </property>
332
                <property name="maximum">
333
                 <number>999999</number>
334
                </property>
335
               </widget>
336
              </item>
337
              <item row="0" column="4">
338
               <widget class="QSpinBox" name="spinBoxTop">
339
                <property name="minimumSize">
340
                 <size>
341
                  <width>80</width>
342
                  <height>0</height>
343
                 </size>
344
                </property>
345
                <property name="maximumSize">
346
                 <size>
347
                  <width>80</width>
348
                  <height>16777215</height>
349
                 </size>
350
                </property>
351
                <property name="maximum">
352
                 <number>999999</number>
353
                </property>
354
               </widget>
355
              </item>
356
              <item row="2" column="0">
357
               <widget class="QLabel" name="label_4">
358
                <property name="text">
359
                 <string>Character</string>
360
                </property>
361
               </widget>
362
              </item>
363
              <item row="1" column="0">
364
               <widget class="QLabel" name="label_5">
365
                <property name="text">
366
                 <string>Width</string>
367
                </property>
368
               </widget>
369
              </item>
370
              <item row="0" column="2">
371
               <spacer name="horizontalSpacer_7">
372
                <property name="orientation">
373
                 <enum>Qt::Horizontal</enum>
374
                </property>
375
                <property name="sizeHint" stdset="0">
376
                 <size>
377
                  <width>40</width>
378
                  <height>20</height>
379
                 </size>
380
                </property>
381
               </spacer>
382
              </item>
383
             </layout>
384
            </item>
385
            <item>
386
             <spacer name="verticalSpacer_3">
387
              <property name="orientation">
388
               <enum>Qt::Vertical</enum>
389
              </property>
390
              <property name="sizeType">
391
               <enum>QSizePolicy::Fixed</enum>
392
              </property>
393
              <property name="sizeHint" stdset="0">
394
               <size>
395
                <width>20</width>
396
                <height>30</height>
397
               </size>
398
              </property>
399
             </spacer>
400
            </item>
401
            <item>
402
             <spacer name="horizontalSpacer_4">
403
              <property name="orientation">
404
               <enum>Qt::Horizontal</enum>
405
              </property>
406
              <property name="sizeType">
407
               <enum>QSizePolicy::Fixed</enum>
408
              </property>
409
              <property name="sizeHint" stdset="0">
410
               <size>
411
                <width>400</width>
412
                <height>20</height>
413
               </size>
414
              </property>
415
             </spacer>
416
            </item>
417
            <item>
418
             <layout class="QHBoxLayout" name="horizontalLayout_5">
419
              <item>
420
               <spacer name="horizontalSpacer_2">
421
                <property name="orientation">
422
                 <enum>Qt::Horizontal</enum>
423
                </property>
424
                <property name="sizeHint" stdset="0">
425
                 <size>
426
                  <width>40</width>
427
                  <height>20</height>
428
                 </size>
429
                </property>
430
               </spacer>
431
              </item>
432
              <item>
433
               <widget class="QPushButton" name="pushButtonSave">
434
                <property name="maximumSize">
435
                 <size>
436
                  <width>80</width>
437
                  <height>16777215</height>
438
                 </size>
439
                </property>
440
                <property name="text">
441
                 <string>Save</string>
442
                </property>
443
               </widget>
444
              </item>
445
              <item>
446
               <widget class="QPushButton" name="pushButtonCancel">
447
                <property name="maximumSize">
448
                 <size>
449
                  <width>80</width>
450
                  <height>16777215</height>
451
                 </size>
452
                </property>
453
                <property name="text">
454
                 <string>Close</string>
455
                </property>
456
               </widget>
457
              </item>
458
             </layout>
459
            </item>
460
           </layout>
461
          </item>
462
         </layout>
463
        </widget>
464
       </item>
465
      </layout>
466
     </item>
467
    </layout>
468
   </item>
469
  </layout>
470
 </widget>
471
 <resources/>
472
 <connections/>
473
</ui>
DTI_PID/DTI_PID/UI/TrainingSymbolImageList.ui
1
<?xml version="1.0" encoding="UTF-8"?>
2
<ui version="4.0">
3
 <class>TraingingSymbolImageListDialog</class>
4
 <widget class="QDialog" name="TraingingSymbolImageListDialog">
5
  <property name="geometry">
6
   <rect>
7
    <x>0</x>
8
    <y>0</y>
9
    <width>1556</width>
10
    <height>707</height>
11
   </rect>
12
  </property>
13
  <property name="font">
14
   <font>
15
    <family>맑은 고딕</family>
16
    <weight>75</weight>
17
    <bold>true</bold>
18
   </font>
19
  </property>
20
  <property name="windowTitle">
21
   <string>Symbol Training Image List</string>
22
  </property>
23
  <property name="windowIcon">
24
   <iconset resource="../res/MainWindow.qrc">
25
    <normaloff>:/newPrefix/OCR.png</normaloff>:/newPrefix/OCR.png</iconset>
26
  </property>
27
  <layout class="QGridLayout" name="gridLayout">
28
   <item row="0" column="0">
29
    <layout class="QHBoxLayout" name="horizontalLayout_4">
30
     <item>
31
      <widget class="QPushButton" name="pushButtonDeleteBatchLabel">
32
       <property name="text">
33
        <string>Delete Batch Label </string>
34
       </property>
35
      </widget>
36
     </item>
37
     <item>
38
      <widget class="QLineEdit" name="lineEditTargetChar">
39
       <property name="maximumSize">
40
        <size>
41
         <width>20</width>
42
         <height>16777215</height>
43
        </size>
44
       </property>
45
       <property name="maxLength">
46
        <number>1</number>
47
       </property>
48
      </widget>
49
     </item>
50
     <item>
51
      <spacer name="horizontalSpacer_2">
52
       <property name="orientation">
53
        <enum>Qt::Horizontal</enum>
54
       </property>
55
       <property name="sizeHint" stdset="0">
56
        <size>
57
         <width>40</width>
58
         <height>20</height>
59
        </size>
60
       </property>
61
      </spacer>
62
     </item>
63
     <item>
64
      <widget class="QPushButton" name="pushButtonImageDelete">
65
       <property name="minimumSize">
66
        <size>
67
         <width>90</width>
68
         <height>0</height>
69
        </size>
70
       </property>
71
       <property name="text">
72
        <string>Del Image</string>
73
       </property>
74
       <property name="autoDefault">
75
        <bool>false</bool>
76
       </property>
77
      </widget>
78
     </item>
79
     <item>
80
      <widget class="QPushButton" name="pushButtonLabelDelete">
81
       <property name="minimumSize">
82
        <size>
83
         <width>90</width>
84
         <height>0</height>
85
        </size>
86
       </property>
87
       <property name="text">
88
        <string>Del Label Data</string>
89
       </property>
90
       <property name="autoDefault">
91
        <bool>false</bool>
92
       </property>
93
      </widget>
94
     </item>
95
    </layout>
96
   </item>
97
   <item row="1" column="0">
98
    <layout class="QHBoxLayout" name="horizontalLayout_3">
99
     <item>
100
      <widget class="QLabel" name="label">
101
       <property name="maximumSize">
102
        <size>
103
         <width>100</width>
104
         <height>16777215</height>
105
        </size>
106
       </property>
107
       <property name="font">
108
        <font>
109
         <weight>50</weight>
110
         <bold>false</bold>
111
        </font>
112
       </property>
113
       <property name="text">
114
        <string>Min Size : </string>
115
       </property>
116
      </widget>
117
     </item>
118
     <item>
119
      <widget class="QSpinBox" name="spinBox">
120
       <property name="maximum">
121
        <number>2048</number>
122
       </property>
123
       <property name="value">
124
        <number>600</number>
125
       </property>
126
      </widget>
127
     </item>
128
     <item>
129
      <widget class="QLabel" name="label_2">
130
       <property name="text">
131
        <string>Max Size : </string>
132
       </property>
133
      </widget>
134
     </item>
135
     <item>
136
      <widget class="QSpinBox" name="spinBox_2">
137
       <property name="maximum">
138
        <number>2024</number>
139
       </property>
140
       <property name="value">
141
        <number>1024</number>
142
       </property>
143
      </widget>
144
     </item>
145
     <item>
146
      <spacer name="horizontalSpacer">
147
       <property name="orientation">
148
        <enum>Qt::Horizontal</enum>
149
       </property>
150
       <property name="sizeHint" stdset="0">
151
        <size>
152
         <width>40</width>
153
         <height>20</height>
154
        </size>
155
       </property>
156
      </spacer>
157
     </item>
158
    </layout>
159
   </item>
160
   <item row="3" column="0">
161
    <layout class="QHBoxLayout" name="horizontalLayout">
162
     <item>
163
      <widget class="QPushButton" name="pushButtonLabel">
164
       <property name="text">
165
        <string>Edit Label</string>
166
       </property>
167
       <property name="autoDefault">
168
        <bool>false</bool>
169
       </property>
170
      </widget>
171
     </item>
172
     <item>
173
      <widget class="QPushButton" name="pushButtonMakeTrainingImage">
174
       <property name="text">
175
        <string>Generate Training Image</string>
176
       </property>
177
       <property name="autoDefault">
178
        <bool>false</bool>
179
       </property>
180
      </widget>
181
     </item>
182
     <item>
183
      <widget class="QProgressBar" name="progressBar">
184
       <property name="value">
185
        <number>0</number>
186
       </property>
187
      </widget>
188
     </item>
189
     <item>
190
      <widget class="QPushButton" name="pushButtonClose">
191
       <property name="text">
192
        <string>Close</string>
193
       </property>
194
       <property name="autoDefault">
195
        <bool>false</bool>
196
       </property>
197
      </widget>
198
     </item>
199
    </layout>
200
   </item>
201
   <item row="2" column="0">
202
    <widget class="QSplitter" name="splitter">
203
     <property name="orientation">
204
      <enum>Qt::Vertical</enum>
205
     </property>
206
     <widget class="QTableWidget" name="tableWidgetList">
207
      <property name="minimumSize">
208
       <size>
209
        <width>0</width>
210
        <height>400</height>
211
       </size>
212
      </property>
213
      <property name="sortingEnabled">
214
       <bool>true</bool>
215
      </property>
216
      <property name="columnCount">
217
       <number>1</number>
218
      </property>
219
      <attribute name="horizontalHeaderShowSortIndicator" stdset="0">
220
       <bool>true</bool>
221
      </attribute>
222
      <attribute name="verticalHeaderVisible">
223
       <bool>false</bool>
224
      </attribute>
225
      <column/>
226
     </widget>
227
     <widget class="QWidget" name="horizontalLayoutWidget">
228
      <layout class="QHBoxLayout" name="horizontalLayoutChart"/>
229
     </widget>
230
    </widget>
231
   </item>
232
  </layout>
233
 </widget>
234
 <resources>
235
  <include location="../res/MainWindow.qrc"/>
236
 </resources>
237
 <connections/>
238
</ui>

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)