프로젝트

일반

사용자정보

개정판 270d3519

ID270d351980bb635271ef2b93c5b42ad657e7b893
상위 38eca06a
하위 79d21218

함의성이(가) 10달 전에 추가함

scale ongoing

Change-Id: Ia91b54cc877ef2192c50553b2f6a80380ad7a7a7

차이점 보기:

DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py
757 757
                convertOriginalPoint = convertOriginalPoint.split(',')
758 758
                self.symbolConvertingOrigin = [float(convertOriginalPoint[0]), float(convertOriginalPoint[1])]
759 759
            if type(self) is QEngineeringEquipmentItem:
760
                if scale == 1.0:
761
                    scale = [1.0, 1.0]
760 762
                transform = QTransform().translate(self.symbolOrigin[0], self.symbolOrigin[1])
761 763
                transform.scale(scale[0], scale[1])
762 764
                transform.translate(-self.symbolOrigin[0], -self.symbolOrigin[1])
......
1254 1256
        from EngineeringErrorItem import QEngineeringErrorItem
1255 1257
        from RotateSymbolDialog import QRotateSymbolDialog
1256 1258
        from EngineeringEndBreakItem import QEngineeringEndBreakItem
1259
        from EngineeringEquipmentItem import QEngineeringEquipmentItem
1257 1260
        from RotateCommand import RotateCommand
1258 1261

  
1259 1262
        modifiers = QApplication.keyboardModifiers()
......
1325 1328
            #self.origin[0] = self.origin[0] + delta
1326 1329
            self.moveBy(delta, 0)
1327 1330
        elif event.key() == Qt.Key_Plus or event.key() == 61:
1328
            #self.setScale(self.scale() + 0.1)
1329
            #'''
1330
            transform = QTransform().translate(self.symbolOrigin[0], self.symbolOrigin[1])
1331
            if modifiers == Qt.ControlModifier:
1332
                transform.scale(self.transform().m11() + 0.1, self.transform().m22())
1333
            elif modifiers == Qt.AltModifier:
1334
                transform.scale(self.transform().m11(), self.transform().m22() + 0.1)
1331
            if type(self) is QEngineeringEquipmentItem:
1332
                transform = QTransform().translate(self.symbolOrigin[0], self.symbolOrigin[1])
1333
                if modifiers == Qt.ControlModifier:
1334
                    transform.scale(self.transform().m11() + 0.1, self.transform().m22())
1335
                elif modifiers == Qt.ShiftModifier:
1336
                    transform.scale(self.transform().m11(), self.transform().m22() + 0.1)
1337
                else:
1338
                    transform.scale(self.transform().m11() + 0.1, self.transform().m22() + 0.1)
1339
                transform.translate(-self.symbolOrigin[0], -self.symbolOrigin[1])
1340
                self.setTransform(transform)
1335 1341
            else:
1336
                transform.scale(self.transform().m11() + 0.1, self.transform().m22() + 0.1)
1337
            transform.translate(-self.symbolOrigin[0], -self.symbolOrigin[1])
1338
            self.setTransform(transform)
1339
            #'''
1342
                self.setScale(self.scale() + 0.1)
1340 1343
        elif event.key() == Qt.Key_Minus:
1341
            #self.setScale(self.scale() - 0.1 if self.scale() - 0.1 > 0.3 else 0.3)
1342
            #'''
1343
            transform = QTransform().translate(self.symbolOrigin[0], self.symbolOrigin[1])
1344
            if modifiers == Qt.ControlModifier:
1345
                transform.scale(self.transform().m11() - 0.1 if self.transform().m11() - 0.1 > 0.3 else 0.3, self.transform().m22())
1346
            elif modifiers == Qt.AltModifier:
1347
                transform.scale(self.transform().m11(), self.transform().m22() - 0.1 if self.transform().m22() - 0.1 > 0.3 else 0.3)
1344
            if type(self) is QEngineeringEquipmentItem:
1345
                transform = QTransform().translate(self.symbolOrigin[0], self.symbolOrigin[1])
1346
                if modifiers == Qt.ControlModifier:
1347
                    transform.scale(self.transform().m11() - 0.1 if self.transform().m11() - 0.1 > 0.3 else 0.3, self.transform().m22())
1348
                elif modifiers == Qt.ShiftModifier:
1349
                    transform.scale(self.transform().m11(), self.transform().m22() - 0.1 if self.transform().m22() - 0.1 > 0.3 else 0.3)
1350
                else:
1351
                    transform.scale(self.transform().m11() - 0.1 if self.transform().m11() - 0.1 > 0.3 else 0.3, self.transform().m22() - 0.1 if self.transform().m22() - 0.1 > 0.3 else 0.3)
1352
                transform.translate(-self.symbolOrigin[0], -self.symbolOrigin[1])
1353
                self.setTransform(transform)
1348 1354
            else:
1349
                transform.scale(self.transform().m11() - 0.1 if self.transform().m11() - 0.1 > 0.3 else 0.3, self.transform().m22() - 0.1 if self.transform().m22() - 0.1 > 0.3 else 0.3)
1350
            transform.translate(-self.symbolOrigin[0], -self.symbolOrigin[1])
1351
            self.setTransform(transform)
1352
            #'''
1355
                self.setScale(self.scale() - 0.1 if self.scale() - 0.1 > 0.3 else 0.3)
1353 1356
        elif event.key() == Qt.Key_I or event.key() == Qt.Key_J or event.key() == Qt.Key_Q or event.key() == Qt.Key_Insert or event.key() == Qt.Key_M: #or event.key() == Qt.Key_X 
1354 1357
            from App import App 
1355 1358

  

내보내기 Unified diff

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