프로젝트

일반

사용자정보

개정판 206eb105

ID206eb105afd53017f64ad2f0fc03c2aa42169130
상위 5397f65f
하위 4502efac

백흠경이(가) 5년 이상 전에 추가함

issue #1052: 스트림 라인 태그 형상을 기존 HYTOS와 유사하게 수정

Change-Id: I9dd2972bb8a9ee5a1e9ab20e6e6de7e27673170d

차이점 보기:

HYTOS/HYTOS/AirFinCooler.py
31 31
        self.set_controls(item)
32 32
        self.load_data()
33 33
        
34
        self.exec_()
34
        return self.exec_()
35 35

  
36 36
    def initialize(self):
37 37
        self.ui.label_Img.setVisible(False)
HYTOS/HYTOS/Ball.py
57 57
        self.set_controls(item)
58 58
        self.load_data()
59 59

  
60
        self.exec_()
60
        return self.exec_()
61 61

  
62 62
    def initialize(self):        
63 63
        '''
HYTOS/HYTOS/BatteryLimit.py
31 31
        self.set_controls(item)
32 32
        self.load_data()
33 33

  
34
        self.exec_()
34
        return self.exec_()
35 35

  
36 36
    def initialize(self):
37 37
        
HYTOS/HYTOS/Coil.py
32 32
        self.set_controls(item)
33 33
        self.load_data()
34 34

  
35
        self.exec_()
35
        return self.exec_()
36 36

  
37 37
    def initialize(self):
38 38
        self.ui.label_Img.setVisible(False)
HYTOS/HYTOS/Compressor.py
35 35
        self.set_controls(item)
36 36
        self.load_data()
37 37

  
38
        self.exec_()
38
        return self.exec_()
39 39

  
40 40
    def initialize(self):
41 41
        self.ui.label_Img_In.setVisible(False)
HYTOS/HYTOS/ConeRoof.py
51 51
        self.set_controls(item)
52 52
        self.load_data()
53 53

  
54
        self.exec_()
54
        return self.exec_()
55 55

  
56 56
    def initialize(self):
57 57
        # To do : 이름으로 Control 찾아오기
HYTOS/HYTOS/DP_Equipment.py
36 36
        self.set_controls(item)
37 37
        self.load_data()
38 38
        
39
        self.exec_()
39
        return self.exec_()
40 40

  
41 41
    def initialize(self):
42 42
        self.ui.label_Img_Horizontal_In.setVisible(False)
HYTOS/HYTOS/DomeRoof.py
50 50
        self.set_controls(item)
51 51
        self.load_data()
52 52

  
53
        self.exec_()
53
        return self.exec_()
54 54

  
55 55
    def initialize(self):
56 56
        # To do : 이름으로 Control 찾아오기
HYTOS/HYTOS/Drum_Horizontal.py
52 52
        self.set_controls(item)
53 53
        self.load_data()
54 54
        
55
        self.exec_()
55
        return self.exec_()
56 56

  
57 57
    def initialize(self):
58 58
        # To do : 이름으로 Control 찾아오기
HYTOS/HYTOS/Drum_Vertical.py
56 56
        self.set_controls(item)
57 57
        self.load_data()
58 58

  
59
        self.exec_()
59
        return self.exec_()
60 60

  
61 61
    def initialize(self):
62 62
        # To do : 이름으로 Control 찾아오기
HYTOS/HYTOS/DualPacked.py
57 57
        self.set_controls(item)
58 58
        self.load_data()
59 59
        
60
        self.exec_()
60
        return self.exec_()
61 61

  
62 62
    def initialize(self):
63 63
        # To do : 이름으로 Control 찾아오기
HYTOS/HYTOS/Equipment.py
56 56
        self.set_controls(item)
57 57
        self.load_data()
58 58

  
59
        self.exec_()
59
        return self.exec_()
60 60

  
61 61
    def initialize(self):
62 62
        # To do : 이름으로 Control 찾아오기
HYTOS/HYTOS/Filter.py
31 31
        self.set_controls(item)
32 32
        self.load_data()
33 33

  
34
        self.exec_()
34
        return self.exec_()
35 35

  
36 36
    def initialize(self):
37 37
        self.ui.label_Img.setVisible(False)
HYTOS/HYTOS/Flowmeter.py
31 31
        self.set_controls(item)
32 32
        self.load_data()
33 33

  
34
        self.exec_()
34
        return self.exec_()
35 35

  
36 36
    def initialize(self):
37 37
        self.ui.label_Img.setVisible(False)
HYTOS/HYTOS/LineSplitter.py
33 33
        self.set_controls(item)
34 34
        self.load_data()
35 35

  
36
        self.exec_()
36
        return self.exec_()
37 37

  
38 38
    def initialize(self):
39 39
        self.ui.label_Img_Up.setVisible(False)
HYTOS/HYTOS/PlateHeatExchanger.py
35 35
        self.set_controls(item)
36 36
        self.load_data()
37 37

  
38
        self.exec_()
38
        return self.exec_()
39 39

  
40 40
    def initialize(self):
41 41
        self.ui.label_Img_1.setVisible(False)
HYTOS/HYTOS/Pump.py
34 34
        self.set_controls(item)
35 35
        self.load_data()
36 36

  
37
        self.exec_()
37
        return self.exec_()
38 38

  
39 39
    def initialize(self):
40 40
        self.ui.label_Img.setVisible(False)
HYTOS/HYTOS/Reactor.py
39 39
        self.set_controls(item)
40 40
        self.load_data()
41 41
        
42
        self.exec_()
42
        return self.exec_()
43 43

  
44 44
    def initialize(self):
45 45
        # To do : 이름으로 Control 찾아오기
HYTOS/HYTOS/Reducer.py
34 34
        self.set_controls(item)
35 35
        self.load_data()
36 36

  
37
        self.exec_()
37
        return self.exec_()
38 38

  
39 39
    def initialize(self):
40 40
        self.ui.label_Img.setVisible(False)
HYTOS/HYTOS/Shapes/EngineeringStreamNoTextItem.py
6 6
import copy
7 7
try:
8 8
    from PyQt5.QtCore import Qt, QPointF, QRectF, pyqtSignal, QT_VERSION_STR, QRect
9
    from PyQt5.QtGui import QImage, QPixmap, QPainterPath, QBrush, QPen, QTransform, QFont
9
    from PyQt5.QtGui import QImage, QPixmap, QPainterPath, QPainter, QPolygonF, QBrush, QPen, QTransform, QFont
10 10
    from PyQt5.QtWidgets import QGraphicsView, QGraphicsScene, QFileDialog, QGraphicsItem, QAbstractGraphicsShapeItem, QGraphicsTextItem
11 11
except ImportError:
12 12
    try:
......
31 31
        self.type = 'STREAM NO'
32 32

  
33 33
        font = QFont('Arial', 15)
34
        font.setPointSizeF(5)
34
        font.setPointSizeF(4)
35 35
        self.setFont(font)
36

  
37
    def paint(self, painter, option, widget):
38
        """ override paint method """
39

  
40
        painter.setPen(QPen(Qt.black, 1))
41
        painter.drawPolygon(self.create_poly(4, 7, 0))
42
        QGraphicsTextItem.paint(self, painter, option, widget)
43

  
44
    def create_poly(self, n, r, s):
45
        import math
46

  
47
        rect = self.boundingRect()
48
        polygon = QPolygonF()
49
        w = 360 / n  # angle per step
50
        for i in range(n):  # add the points of polygon
51
            t = w * i + s
52
            x = r * math.cos(math.radians(t))
53
            y = r * math.sin(math.radians(t))
54
            polygon.append(QPointF(rect.width()*0.5 + x, rect.height()*0.5 + y))
55

  
56
        return polygon
HYTOS/HYTOS/Shapes/EngineeringStreamlineItem.py
79 79
        from EngineeringStreamNoTextItem import QEngineeringStreamNoTextItem
80 80

  
81 81
        self._stream_no = value
82
        self._stream_no_text = QEngineeringStreamNoTextItem('<{}>'.format(self._stream_no), self)
82
        self._stream_no_text = QEngineeringStreamNoTextItem(f"{self._stream_no}", self)
83 83
        self.build_path()
84 84
        
85 85
    @property
......
541 541
                        x = (max_length_line[0][0] + max_length_line[1][0] - self._stream_no_text.textWidth())*0.5
542 542
                        y = (max_length_line[0][1] + max_length_line[1][1])*0.5
543 543
                        self._stream_no_text.setPos(QPointF(x, y))
544
                        self._stream_no_text.setRotation(0)
545 544
                    else:
546 545
                        x = (max_length_line[0][0] + max_length_line[1][0]) * 0.5
547 546
                        y = (max_length_line[0][1] + max_length_line[1][1] - self._stream_no_text.textWidth()) * 0.5
548 547
                        self._stream_no_text.setPos(QPointF(x, y))
549
                        self._stream_no_text.setRotation(90)
550 548

  
551 549
            self.update_arrow()
552 550
        except Exception as ex:
HYTOS/HYTOS/Shapes/SymbolSvgItem.py
205 205
            maxX = minX + rect.width() + margin
206 206
            maxY = minY + rect.height() + margin
207 207

  
208
        # print([minX, minY, maxX, maxY])
209

  
210 208
        return True if (pt[0] >= minX and pt[0] <= maxX and pt[1] >= minY and pt[1] <= maxY) else False
211 209

  
212 210
    def toSql(self):
213 211
        """ convert valve data to sql query """
214
        import uuid
215
        from AppDocData import AppDocData
216 212

  
217 213
        res = []
218 214

  
HYTOS/HYTOS/ShlTubHeatExchanger.py
35 35
        self.set_controls(item)
36 36
        self.load_data()
37 37

  
38
        self.exec_()
38
        return self.exec_()
39 39
    
40 40
    def initialize(self):
41 41
        self.ui.label_Img_Tub1.setVisible(False)
HYTOS/HYTOS/SinglePacked.py
53 53
        self.set_controls(item)
54 54
        self.load_data()
55 55

  
56
        self.exec_()
56
        return self.exec_()
57 57

  
58 58
    def initialize(self):
59 59
        # To do : 이름으로 Control 찾아오기
HYTOS/HYTOS/Strainer_T.py
32 32
        self.set_controls(item)
33 33
        self.load_data()
34 34

  
35
        self.exec_()
35
        return self.exec_()
36 36

  
37 37
    def initialize(self):
38 38
        self.ui.label_Img.setVisible(False)
HYTOS/HYTOS/Strainer_Y.py
31 31
        self.set_controls(item)
32 32
        self.load_data()
33 33

  
34
        self.exec_()
34
        return self.exec_()
35 35

  
36 36
    def initialize(self):
37 37
        self.ui.label_Img.setVisible(False)
HYTOS/HYTOS/Tray.py
56 56
        self.set_controls(item)
57 57
        self.load_data()
58 58

  
59
        self.exec_()
59
        return self.exec_()
60 60

  
61 61
    def initialize(self):
62 62
        # To do : 이름으로 Control 찾아오기
HYTOS/HYTOS/Valve_Manual.py
31 31
        self.set_controls(item)
32 32
        self.load_data()
33 33

  
34
        self.exec_()
34
        return self.exec_()
35 35

  
36 36
    def initialize(self):
37 37
        self.ui.label_Img.setVisible(False)

내보내기 Unified diff