프로젝트

일반

사용자정보

개정판 98b01134

ID98b01134e71568df690f1a16b127a6a06bb7e9c3
상위 120d1104
하위 471b049e

김정우 이(가) 6년 이상 전에 추가함

MainWindow 에서 이미지 미선택 시 MessageBox 출력

차이점 보기:

DTI_PID/DTI_PID/MainWindow.py
134 134
        @author     Jeongwoo
135 135
        @date       18.04.18
136 136
        @history    2018.05.02  Jeongwoo    Change graphicsView.command by actionOCR checked state
137
                                            Show MessageBox when imageviewer doesn't have image
137 138
    '''
138 139
    def areaOcr(self):
140
        if not self.graphicsView.hasImage():
141
            self.showImageSelectionMessageBox()
142
            return
143

  
139 144
        if self.actionOCR.isChecked():
140 145
            self.graphicsView.command = AreaOcrCommand.AreaOcrCommand(self.graphicsView)
141 146
        else:
......
160 165
        self.dlgConfiguration = QConfigurationDialog(self)
161 166
        self.dlgConfiguration.show()
162 167
        self.dlgConfiguration.exec_()
168

  
169
    '''
170
        @brief  Show Image Selection Guide MessageBox
171
        @author Jeongwoo
172
        @date   2018.05.02
173
    '''
174
    def showImageSelectionMessageBox(self):
175
        QMessageBox.about(self.graphicsView, "알림", "이미지를 선택하신 후 시도해주세요.")
163 176
        
164 177
    '''
165 178
        @brief  Open image drawing file and then display it
......
306 319
        from QRecognitionDialog import QRecognitionDialog
307 320

  
308 321
        if not self.graphicsView.hasImage():
309
            QMessageBox.about(self.graphicsView, "알림", "이미지를 선택하신 후 시도해주세요.")
322
            self.showImageSelectionMessageBox()
310 323
            return
311 324

  
312 325
        try:
......
356 369
        @date       2018.04.19
357 370
        @history    2018.04.26 Jeongwoo Variable name changed (texts → lineNos)
358 371
                                        TextItem type changed (QEngineeringTextItem → QEngineeringLineNoTextItem)
359
        @history    humkyung 2018.04.26 remove small objects before recognizing line
372
        @history    2018.04.26 humkyung remove small objects before recognizing line
373
                    2018.05.02 Jeongwoo Show MessageBox when imageviewer doesn't have image
374
                    
360 375
    '''
361 376
    def recognizeLine(self, MainWindow):
362 377
        from LineDetector import LineDetector
363 378
        from LineNoTracer import LineNoTracer
364 379

  
380
        if not self.graphicsView.hasImage():
381
            self.showImageSelectionMessageBox()
382
            return
383

  
365 384
        try:
366 385
            #remove already existing line item
367 386
            items = [item for item in self.graphicsView.scene.items() if type(item) is QEngineeringLineItem]
......
549 568
        @brief  generate output xml file
550 569
        @author humkyung
551 570
        @date   2018.04.23
571
        @history    2018.05.02  Jeongwoo    Show MessageBox when imageviewer doesn't have image
552 572
    '''
553 573
    def generateOutput(self):
554 574
        import XmlGenerator as xg
555 575

  
576
        if not self.graphicsView.hasImage():
577
            self.showImageSelectionMessageBox()
578
            return
579

  
556 580
        try:
557 581
            docData = AppDocData.instance()
558 582
            xg.writeOutputXml(docData.imgName, docData.imgWidth, docData.imgHeight)

내보내기 Unified diff

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