프로젝트

일반

사용자정보

개정판 02643b52

ID02643b52ac51808cf9cf377f8c2fcd73ebaa94fc
상위 d89b1f19
하위 25071e8d

백흠경이(가) 약 6년 전에 추가함

issue #578:
- save recognized time to database

차이점 보기:

DTI_PID/DTI_PID/ConfigurationAreaDialog.py
272 272
            width, height = round(width), round(height)
273 273

  
274 274
            boundingBox = QGraphicsBoundingBoxItem(x, y, width, height)
275
            boundingBox.transfer.onSizeChanged.connect(self.onSizeChanged)
275
            #boundingBox.transfer.onSizeChanged.connect(self.onSizeChanged)
276 276
            boundingBox.setPen(QPen(Qt.darkGray, THICKNESS, Qt.SolidLine))
277 277
            self.parent().graphicsView.scene.addItem(boundingBox)
278 278

  
......
434 434
            self.parent().graphicsView.scene.removeItem(self.ui.lineEditRevNo.tag)
435 435

  
436 436
        for row in range(self.ui.tableWidgetEquipmentDescArea.rowCount()):
437
            area = self.ui.tableWidgetEquipmentDescArea.item(row, 1).text()
438
            self.removeEquipmentDescArea(area)
437
            area = Area('Equipment Desc.')
438
            area.parse(self.ui.tableWidgetEquipmentDescArea.item(row, 1).text())
439
            self.removeEquipmentDescArea(area.toString())
439 440

  
440 441
        QDialog.reject(self)
DTI_PID/DTI_PID/MainWindow.py
1062 1062
                    2018.05.25  Jeongwoo    Add parameter on QRecognitionDialog.__init__() and Move thread to QRecognitionDialog
1063 1063
                                            Remove codes below if self.dlg.isAccepted == True
1064 1064
                    2018.05.29  Jeongwoo    Remove connects and comments
1065
                    humkyung 2018.11.05 save working date-time
1065 1066
    '''
1066 1067
    def recognize(self, MainWindow):
1068
        from datetime import datetime
1067 1069
        from RecognitionDialog import QRecognitionDialog
1068 1070

  
1069 1071
        if not self.graphicsView.hasImage():
......
1085 1087
            self.dlg.exec_()
1086 1088
            if self.dlg.isAccepted == True:
1087 1089
                '''DO NOTHING'''
1090
                
1091
            # save working date-time
1092
            drawings = appDocData.getDrawings()
1093
            drawing = [drawing for drawing in drawings if appDocData.imgName == os.path.splitext(drawing[1])[0]]
1094
            if drawing[0]:
1095
                drawing[0][2] = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
1096
                appDocData.saveDrawings(drawing)
1097
            # up to here
1088 1098
        except Exception as ex:
1089 1099
            message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)
1090 1100
            self.addMessage.emit(MessageType.Error, message)
......
1164 1174
    '''
1165 1175
    def drawDetectedItems(self, symbolList, textInfoList, otherTextInfoList):
1166 1176
        appDocData = AppDocData.instance()
1167
        #print(appDocData.activeDrawing.name
1168 1177

  
1169 1178
        QApplication.processEvents()
1170 1179
        self.drawDetectedSymbolItem(symbolList)
DTI_PID/DTI_PID/pagefold.qss
110 110
}
111 111

  
112 112
QMenuBar::item::selected {
113
    background-color: black;
113
    background-color: grey;
114 114
    color: white;
115 115
}
116 116

  
117 117
QMenu::item::selected {
118
    background-color: black;
118
    background-color: grey;
119 119
    color: white;
120 120
}
121 121

  
DTI_PID/DTI_PID/tesseract_ocr_module.py
193 193
        textInfoList = []
194 194

  
195 195
        docData = AppDocData.instance()
196
        prj_trained_data = os.path.join(tesseract_path, docData.getCurrentProject().getName()+'.traineddata')
197
        oCRLang = docData.getCurrentProject().getName() + '+eng' if os.path.isfile(prj_trained_data) else 'eng'
196
        prj_trained_data = os.path.join(tesseract_path, 'tessdata', docData.getCurrentProject().getName()+'.traineddata')
197
        oCRLang = docData.getCurrentProject().getName() if os.path.isfile(prj_trained_data) else 'eng'
198
        #oCRLang = 'eng'
198 199
        configs = docData.getConfigs('Text Size', 'Min Text Size')
199 200
        minSize = int(configs[0].value) if 1 == len(configs) else 30
200 201
        configs = docData.getConfigs('Text Size', 'Max Text Size')

내보내기 Unified diff

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