개정판 e416b230
eq scale
Change-Id: I491347b41712e85320f16d0d470178a1fc472b56
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py | ||
---|---|---|
1334 | 1334 |
elif event.key() == Qt.Key_Up: # translate up/down/left/right symbol |
1335 | 1335 |
if modifiers == Qt.AltModifier and type(self) is QEngineeringEquipmentItem: |
1336 | 1336 |
transform = QTransform().translate(self.symbolOrigin[0], self.symbolOrigin[1]) |
1337 |
transform.scale(self.transform().m11(), self.transform().m22() + 0.05)
|
|
1337 |
transform.scale(self.transform().m11(), self.transform().m22() + 0.01)
|
|
1338 | 1338 |
transform.translate(-self.symbolOrigin[0], -self.symbolOrigin[1]) |
1339 | 1339 |
self.setTransform(transform) |
1340 | 1340 |
else: |
... | ... | |
1346 | 1346 |
elif event.key() == Qt.Key_Down: |
1347 | 1347 |
if modifiers == Qt.AltModifier and type(self) is QEngineeringEquipmentItem: |
1348 | 1348 |
transform = QTransform().translate(self.symbolOrigin[0], self.symbolOrigin[1]) |
1349 |
transform.scale(self.transform().m11(), self.transform().m22() - 0.05 if self.transform().m22() - 0.05 > 0.3 else 0.3)
|
|
1349 |
transform.scale(self.transform().m11(), self.transform().m22() - 0.01 if self.transform().m22() - 0.01 > 0.3 else 0.3)
|
|
1350 | 1350 |
transform.translate(-self.symbolOrigin[0], -self.symbolOrigin[1]) |
1351 | 1351 |
self.setTransform(transform) |
1352 | 1352 |
else: |
... | ... | |
1359 | 1359 |
if modifiers == Qt.AltModifier and type(self) is QEngineeringEquipmentItem: |
1360 | 1360 |
transform = QTransform().translate(self.symbolOrigin[0], self.symbolOrigin[1]) |
1361 | 1361 |
if self.flip == 1: |
1362 |
transform.scale(self.transform().m11() + 0.05 if self.transform().m11() + 0.05 < -0.3 else -0.3, self.transform().m22())
|
|
1362 |
transform.scale(self.transform().m11() + 0.01 if self.transform().m11() + 0.01 < -0.3 else -0.3, self.transform().m22())
|
|
1363 | 1363 |
else: |
1364 |
transform.scale(self.transform().m11() - 0.05 if self.transform().m11() - 0.05 > 0.3 else 0.3, self.transform().m22())
|
|
1364 |
transform.scale(self.transform().m11() - 0.01 if self.transform().m11() - 0.01 > 0.3 else 0.3, self.transform().m22())
|
|
1365 | 1365 |
transform.translate(-self.symbolOrigin[0], -self.symbolOrigin[1]) |
1366 | 1366 |
self.setTransform(transform) |
1367 | 1367 |
else: |
... | ... | |
1374 | 1374 |
if modifiers == Qt.AltModifier and type(self) is QEngineeringEquipmentItem: |
1375 | 1375 |
transform = QTransform().translate(self.symbolOrigin[0], self.symbolOrigin[1]) |
1376 | 1376 |
if self.flip == 1: |
1377 |
transform.scale(self.transform().m11() - 0.05, self.transform().m22())
|
|
1377 |
transform.scale(self.transform().m11() - 0.01, self.transform().m22())
|
|
1378 | 1378 |
else: |
1379 |
transform.scale(self.transform().m11() + 0.05, self.transform().m22())
|
|
1379 |
transform.scale(self.transform().m11() + 0.01, self.transform().m22())
|
|
1380 | 1380 |
transform.translate(-self.symbolOrigin[0], -self.symbolOrigin[1]) |
1381 | 1381 |
self.setTransform(transform) |
1382 | 1382 |
else: |
내보내기 Unified diff