프로젝트

일반

사용자정보

개정판 a64f92c8

IDa64f92c824056967d56792b19ed39bf707404820
상위 c7d9dc59
하위 4a566679

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

issue #570: improve line place, type

Change-Id: I180619baf3b7e4abe14b5eb46d7fd812db727c13

차이점 보기:

DTI_PID/DTI_PID/MainWindow.py
1769 1769

  
1770 1770
                detector = LineDetector(None)
1771 1771

  
1772
                line_type = self.actionLine.tag.line_type if self.actionLine.tag.line_type else \
1773
                    self.lineComboBox.currentText()
1772
                if not self.actionLine.tag.line_type:
1773
                    line_type = self.lineComboBox.currentText()
1774
                else:
1775
                    if not (QEngineeringLineItem.check_piping(self.actionLine.tag.line_type) ^ QEngineeringLineItem.check_piping(self.lineComboBox.currentText())):
1776
                        line_type = self.lineComboBox.currentText()
1777
                    else:
1778
                        line_type = self.actionLine.tag.line_type
1774 1779
                for index in range(count - 1):
1775 1780
                    start = self.actionLine.tag._polyline._vertices[index]
1776 1781
                    end = self.actionLine.tag._polyline._vertices[index + 1]
DTI_PID/DTI_PID/Shapes/EngineeringLineItem.py
626 626
            return self._lineType == 'Primary' or self._lineType == 'Secondary' or \
627 627
                   self._lineType == 'Connect To Process'
628 628

  
629
    @staticmethod
630
    def check_piping(lineType, strong=False):
631
        """ return true if piping line """
632
        if strong:
633
            return lineType == 'Primary' or lineType == 'Secondary'
634
        else:
635
            return lineType == 'Primary' or lineType == 'Secondary' or \
636
                   lineType == 'Connect To Process'
637

  
638

  
629 639
    '''
630 640
        @brief      check if two lines are extendable
631 641
        @author     humkyung
DTI_PID/DTI_PID/TrainingSymbolEditorDialog.py
13 13
import numpy as np
14 14
from PIL import Image
15 15
import AreaZoomCommand
16
import PlaceLineCommand
17 16
from xml.etree.ElementTree import Element, SubElement, dump, ElementTree, parse
18 17

  
19 18
class QTrainingSymbolEditorDialog(QDialog):

내보내기 Unified diff

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