프로젝트

일반

사용자정보

개정판 41236fa4

ID41236fa45d6a7e78e9f5986e8d01077b239a0e74
상위 872c1e5b
하위 25c7ccf2, 9bdacf41

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

issue #000: add change symbol info on drawing

Change-Id: I023de39495c8215d1c7733464f7d2069e0078688

차이점 보기:

DTI_PID/DTI_PID/SymbolEditorDialog.py
58 58
            self.newSym = None
59 59

  
60 60
            self.setWindowTitle('심볼 편집기')
61
            #self.ui.removeTextButton.setHidden(True)
61
            if self.selectedSymbol is None:
62
                self.ui.checkBoxChange.setEnabled(False)
62 63
        except Exception as ex:
63 64
            from App import App
64 65

  
65 66
            message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)
66 67
            App.mainWnd().addMessage.emit(MessageType.Error, message)
67 68

  
69
    def changeSymbolInfo(self):
70
        ''' 
71
            @brief      change base and additional symbol info for already created on drawing
72
            @author     euisung
73
            @date       2019.04.23
74
        '''
75
        from App import App
76
        from SymbolSvgItem import SymbolSvgItem
77

  
78
        mainScene = App.mainWnd().graphicsView
79
        if not mainScene.hasImage():
80
            return
81
        symbols = [item for item in mainScene.items() if issubclass(type(item), SymbolSvgItem) and item.name == self.selectedSymbol.getName()]
82
        newBase = self.ui.baseSymbolComboBox.currentText()
83
        newAddition = self.makeAdditionalSymbolListString()
84
        newType = self.ui.typeComboBox.currentText()
85
        for symbol in symbols:
86
            symbol.type = newType
87
            symbol.parentSymbol = newBase
88
            symbol.childSymbol = newAddition
89

  
90

  
68 91
    ''' 
69 92
        @brief      hilight pressed connector item
70 93
        @author     humkyung
......
466 489
                        #if self.ui.makeFlipCheckBox.isChecked():
467 490
                        #    potrace.convertImageToSvg(imagePath + '_Flip', os.path.join(svgLocation + "/" + fileName + "_Flip.svg"), normalColor=normal_color, hoverColor=hover_color)
468 491
                        self.isAccepted = True
492
                        if self.ui.checkBoxChange.isChecked():
493
                            self.changeSymbolInfo()
469 494
                        QDialog.accept(self)
470 495
                except:
471 496
                    if self.selectedSymbol is None:

내보내기 Unified diff

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