프로젝트

일반

사용자정보

개정판 e7e6914b

IDe7e6914b0b77f0162e33c9149815e9b74f466f11
상위 17e67b4f
하위 61d2ee2b, 2e702ded

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

issue #505: improve zoom ongoing

Change-Id: I51204fb162c0d090842000783712418b1a5a215c

차이점 보기:

DTI_PID/DTI_PID/Commands/AreaZoomCommand.py
59 59
                if event.button() == Qt.LeftButton:
60 60
                    self.isLeftClicked = False
61 61
                if self.imageViewer.canZoom and event.button() == Qt.LeftButton:
62
                    if not self.imageViewer.zoomStack:
63
                        self.imageViewer.zoomStack.append(self.imageViewer.sceneRect())
64

  
62 65
                    self._rubberBand.hide()
63 66
                    topLeft = self.imageViewer.mapToScene(self._rubberBand.geometry().topLeft())
64 67
                    bottomRight = self.imageViewer.mapToScene(self._rubberBand.geometry().bottomRight())
65 68
                    rect = QRectF(topLeft.x(), topLeft.y(),
66 69
                                  bottomRight.x() - topLeft.x(), bottomRight.y() - topLeft.y())
70

  
71
                    current_rect = self.imageViewer.zoomStack[-1]
72
                    current_area = current_rect.width() * current_rect.height()
73
                    new_area = rect.width() * rect.height()
74
                    area_ratio = 100 - (new_area / current_area * 100)
75
                    zoomStack_count = int(area_ratio / 25)
76
                    if zoomStack_count > 0:
77
                        current_center = current_rect.center()
78
                        new_center = rect.center()
79

  
80
                        dx = new_center.x() - current_center.x()
81
                        dy = new_center.y() - current_center.y()
82
                        ddx = dx / (zoomStack_count + 1)
83
                        ddy = dy / (zoomStack_count + 1)
84

  
85
                        dw = current_rect.width() - rect.width()
86
                        dh = current_rect.height() - rect.height()
87
                        ddw = dw / (zoomStack_count + 1)
88
                        ddh = dh / (zoomStack_count + 1)
89
                        
90
                        for index in range(zoomStack_count):
91
                            add_center = QPointF(current_center.x() + (index + 1) * ddx, current_center.y() + (index + 1) * ddy)
92
                            add_width = current_rect.width() - (index + 1) * ddw
93
                            add_height = current_rect.height() - (index + 1) * ddh
94
                            
95
                            x1 = add_center.x() - add_width / 2
96
                            y1 = add_center.y() - add_height / 2
97
                            x2 = add_center.x() + add_width / 2
98
                            y2 = add_center.y() + add_height / 2
99

  
100
                            add_stack = QRectF(x1, y1, x2,y2)
101
                            self.imageViewer.zoomStack.append(add_stack)
102

  
67 103
                    self.imageViewer.zoomStack.append(rect)
68 104
                    self.imageViewer.updateViewer(rect)
69 105
                elif Qt.RightButton == event.button():
DTI_PID/DTI_PID/Commands/HighlightCommand.py
33 33
        from EngineeringLineNoTextItem import QEngineeringLineNoTextItem
34 34

  
35 35
        self.isTreated = False
36
        FIT_WINDOW_SIZE = 300
36
        FIT_WINDOW_SIZE = 500
37 37

  
38 38
        if param is not None:
39 39
            if type(param) is QEngineeringRunItem:
DTI_PID/DTI_PID/Scripts/MSSQL/ID2.sql
53 53
VALUES(11, 'Equipment Components', 'Mechanical Components');
54 54
INSERT INTO SymbolType
55 55
(UID, Category, "Type")
56
VALUES(12, 'Equipment Components', 'Nozzles');
56
VALUES(12, 'Piping', 'Nozzles');
57 57
INSERT INTO SymbolType
58 58
(UID, Category, "Type")
59 59
VALUES(13, 'Equipment Components', 'Trays');
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py
1694 1694
                item = QEngineeringEquipmentItem(path, uid, flip=flip)
1695 1695
            elif cateogry == 'Instrumentation':
1696 1696
                item = QEngineeringInstrumentItem(path, uid, flip=flip)
1697
            # elif type == 'Nozzles':
1698
            #    item = QEngineeringNozzleItem(path, uid, flip=flip)
1697
            elif type == 'Nozzles':
1698
                item = QEngineeringNozzleItem(path, uid, flip=flip)
1699 1699
            elif type == 'Segment Breaks':
1700 1700
                item = QEngineeringSpecBreakItem(path, uid, flip=flip)
1701 1701
            elif type == 'Reducers':

내보내기 Unified diff

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